From b9717b03e7c4d3b7855fd3886e7da45a124a0206 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gu=C3=B0ni=20M=C3=A1r=20Gilbert?= Date: Sun, 29 Jan 2023 14:16:44 +0000 Subject: [PATCH] Make bFilament variables static and move to top of file --- Firmware/ultralcd.cpp | 10 +++++----- Firmware/ultralcd.h | 2 -- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index 95e39b092..0bf805c88 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -57,6 +57,11 @@ static void lcd_mesh_bed_leveling_settings(); static void lcd_backlight_menu(); #endif +FilamentAction eFilamentAction=FilamentAction::None; // must be initialized as 'non-autoLoad' +static bool bFilamentPreheatState; +static bool bFilamentAction = false; +static bool bFilamentWaitingFlag = false; + int8_t ReInitLCD = 0; uint8_t scrollstuff = 0; @@ -1756,11 +1761,6 @@ void lcd_cutter_enabled() } #endif //MMU_HAS_CUTTER -FilamentAction eFilamentAction=FilamentAction::None; // must be initialized as 'non-autoLoad' -bool bFilamentPreheatState; -bool bFilamentAction=false; -static bool bFilamentWaitingFlag=false; - bool shouldPreheatOnlyNozzle() { uint8_t eeprom_setting = eeprom_read_byte((uint8_t*)EEPROM_HEAT_BED_ON_LOAD_FILAMENT); if (eeprom_setting != 0) diff --git a/Firmware/ultralcd.h b/Firmware/ultralcd.h index 833e2c835..04ac697f1 100755 --- a/Firmware/ultralcd.h +++ b/Firmware/ultralcd.h @@ -194,8 +194,6 @@ enum class FilamentAction : uint_least8_t }; extern FilamentAction eFilamentAction; -extern bool bFilamentPreheatState; -extern bool bFilamentAction; void mFilamentItem(uint16_t nTemp,uint16_t nTempBed); void lcd_generic_preheat_menu(); void unload_filament(float unloadLength);