From eb5375002888d4c04dbdeb0e15d77803a5c870f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gu=C3=B0ni=20M=C3=A1r=20Gilbert?= Date: Fri, 18 Nov 2022 20:23:29 +0000 Subject: [PATCH] optimisation: compiler should not inline SetFilamentLoaded Change in memory: Flash: -130 bytes SRAM: 0 bytes --- src/modules/globals.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/globals.h b/src/modules/globals.h index 5f52917..93eaea6 100644 --- a/src/modules/globals.h +++ b/src/modules/globals.h @@ -44,7 +44,7 @@ public: /// Sets the filament loaded flag value, usually after some command/operation. /// Also updates the EEPROM records accordingly /// @param newFilamentLoaded new state - void SetFilamentLoaded(uint8_t slot, FilamentLoadState newFilamentLoaded); + void __attribute__((noinline)) SetFilamentLoaded(uint8_t slot, FilamentLoadState newFilamentLoaded); /// @returns the total number of MMU errors so far /// Errors are stored in the EEPROM