From 19dc05597dc113ae6acd84f7b19d2aeb6e0fb5fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gu=C3=B0ni=20M=C3=A1r=20Gilbert?= Date: Sat, 5 Feb 2022 11:24:04 +0000 Subject: [PATCH] Fix identation in PR Also combined the if statements that check farm_mode If farm_mode is 0xFF then we can skip the next if statment. No change in memory footprint --- Firmware/Marlin_main.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 5ae899c97..23c517982 100755 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -1103,10 +1103,8 @@ void setup() farm_mode = eeprom_read_byte((uint8_t*)EEPROM_FARM_MODE); if (farm_mode == 0xFF) { farm_mode = false; //if farm_mode has not been stored to eeprom yet and farm number is set to zero or EEPROM is fresh, deactivate farm mode - eeprom_update_byte((uint8_t*)EEPROM_FARM_MODE, farm_mode); - } - if (farm_mode) - { + eeprom_update_byte((uint8_t*)EEPROM_FARM_MODE, farm_mode); + } else if (farm_mode) { no_response = true; //we need confirmation by recieving PRUSA thx important_status = 8; prusa_statistics(8); @@ -1118,9 +1116,9 @@ void setup() //disabled filament autoload (PFW360) fsensor_autoload_set(false); #endif //FILAMENT_SENSOR - // ~ FanCheck -> on - if(!(eeprom_read_byte((uint8_t*)EEPROM_FAN_CHECK_ENABLED))) - eeprom_update_byte((unsigned char *)EEPROM_FAN_CHECK_ENABLED,true); + // ~ FanCheck -> on + if(!(eeprom_read_byte((uint8_t*)EEPROM_FAN_CHECK_ENABLED))) + eeprom_update_byte((uint8_t*)EEPROM_FAN_CHECK_ENABLED,true); } #ifdef TMC2130