From e71c3eeaabe0261afb5402b42dbd02e372ab95ee Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 18 Nov 2018 23:49:46 -0600 Subject: [PATCH] Replace tabs with spaces --- A10M_marlin1.1.8/Marlin/Marlin_main.cpp | 28 +++---- .../Marlin/configuration_store.cpp | 82 +++++++++---------- A10M_marlin1.1.8/Marlin/configuration_store.h | 10 ++- A10M_marlin1.1.8/Marlin/ultralcd.cpp | 6 +- .../Marlin/Marlin_main.cpp | 30 ++++--- .../Marlin/configuration_store.cpp | 82 +++++++++---------- .../Marlin/configuration_store.h | 10 ++- A10M_marlin1.1.8_3Dtouch/Marlin/ultralcd.cpp | 6 +- A10_marlin1.1.8/Marlin/Marlin_main.cpp | 29 +++---- .../Marlin/configuration_store.cpp | 82 +++++++++---------- A10_marlin1.1.8/Marlin/configuration_store.h | 10 ++- A10_marlin1.1.8/Marlin/ultralcd.cpp | 6 +- .../Marlin/Marlin_main.cpp | 30 ++++--- .../Marlin/configuration_store.cpp | 82 +++++++++---------- .../Marlin/configuration_store.h | 10 ++- A10_marlin1.1.8_3DTtouch/Marlin/ultralcd.cpp | 6 +- A20M_Marlin-1.1.x12864/Marlin/Marlin_main.cpp | 28 +++---- .../Marlin/configuration_store.cpp | 82 +++++++++---------- .../Marlin/configuration_store.h | 10 ++- A20M_Marlin-1.1.x12864/Marlin/ultralcd.cpp | 6 +- .../Marlin/Marlin_main.cpp | 30 ++++--- .../Marlin/configuration_store.cpp | 82 +++++++++---------- .../Marlin/configuration_store.h | 10 ++- .../Marlin/ultralcd.cpp | 6 +- A20_Marlin-1.1.x12864/Marlin/Marlin_main.cpp | 28 +++---- .../Marlin/configuration_store.cpp | 82 +++++++++---------- .../Marlin/configuration_store.h | 10 ++- A20_Marlin-1.1.x12864/Marlin/ultralcd.cpp | 6 +- .../Marlin/Marlin_main.cpp | 30 ++++--- .../Marlin/configuration_store.cpp | 82 +++++++++---------- .../Marlin/configuration_store.h | 10 ++- .../Marlin/ultralcd.cpp | 6 +- 32 files changed, 495 insertions(+), 522 deletions(-) diff --git a/A10M_marlin1.1.8/Marlin/Marlin_main.cpp b/A10M_marlin1.1.8/Marlin/Marlin_main.cpp index d55c3bb6..5fd5030c 100644 --- a/A10M_marlin1.1.8/Marlin/Marlin_main.cpp +++ b/A10M_marlin1.1.8/Marlin/Marlin_main.cpp @@ -11105,15 +11105,15 @@ inline void gcode_M999() { // gcode_LastN = Stopped_gcode_LastN; FlushSerialRequestResend(); } -inline void gcode_M2000(){ +inline void gcode_M2000() { } -inline void gcode_M2009(){ - if (parser.seen('V')) hardware_version = parser.value_celsius(); - //SERIAL_ECHOPAIR("HV...:", hardware_version);//liu - (void)settings.Fixed_parameter_save(); - SERIAL_ECHOLNPGM("HV_set_ok"); +inline void gcode_M2009() { + if (parser.seen('V')) hardware_version = parser.value_celsius(); + //SERIAL_ECHOPAIR("HV...:", hardware_version);//liu + (void)settings.fixed_parameter_save(); + SERIAL_ECHOLNPGM("HV_set_ok"); } @@ -12528,7 +12528,8 @@ void process_parsed_command() { case 999: // M999: Restart after being Stopped gcode_M999(); break; - case 2000: // + + case 2000: // gcode_M2000(); break; case 2009: // @@ -14475,7 +14476,7 @@ void setup() { // Load data from EEPROM if available (or use defaults) // This also updates variables in the planner, elsewhere (void)settings.load(); - (void)settings.Fixed_parameter_load(); + (void)settings.fixed_parameter_load(); #if HAS_M206_COMMAND @@ -14788,12 +14789,11 @@ void loop() { // SERIAL_ECHOLN(tmp_y); // enqueue_and_echo_command(tmp_y); /////// - if(current_position[Z_AXIS]>=5) - { - sprintf_P(tmp_y, PSTR("G28 X")); - //SERIAL_ECHOLN(tmp_y); - enqueue_and_echo_command(tmp_y); - } + if (current_position[Z_AXIS] >= 5) { + sprintf_P(tmp_y, PSTR("G28 X")); + //SERIAL_ECHOLN(tmp_y); + enqueue_and_echo_command(tmp_y); + } powerloss.recovery = Rec_Idle; } endstops.report_state(); diff --git a/A10M_marlin1.1.8/Marlin/configuration_store.cpp b/A10M_marlin1.1.8/Marlin/configuration_store.cpp index 34b7625b..8db7213b 100644 --- a/A10M_marlin1.1.8/Marlin/configuration_store.cpp +++ b/A10M_marlin1.1.8/Marlin/configuration_store.cpp @@ -793,8 +793,6 @@ float hardware_version=0.1; // Filament Runout Sensors EEPROM_READ(filament_runout_enabled); - if(filament_runout_enabled != false) - filament_runout_enabled = true; if (working_crc == stored_crc) { #if ENABLED(EEPROM_CHITCHAT) @@ -811,53 +809,51 @@ float hardware_version=0.1; } } + bool MarlinSettings::fixed_parameter_save() {//liu + uint16_t working_crc = 0; + EEPROM_START(); + eeprom_index = EEPROM_OFFSET_SN_VER; - bool MarlinSettings::Fixed_parameter_save() {//liu + EEPROM_SKIP(working_crc); // Skip the checksum slot + working_crc = 0; + EEPROM_WRITE(hardware_version);//liu - uint16_t working_crc = 0; - EEPROM_START(); - eeprom_index = EEPROM_OFFSET_SN_VER; + const uint16_t final_crc = working_crc; + const int eeprom_size = eeprom_index; + eeprom_index = EEPROM_OFFSET_SN_VER; + EEPROM_WRITE(final_crc); - EEPROM_SKIP(working_crc); // Skip the checksum slot - working_crc = 0; - EEPROM_WRITE(hardware_version);//liu hw ver + #if ENABLED(EEPROM_CHITCHAT) + SERIAL_ECHO_START(); + SERIAL_ECHOPAIR("Fixed parameter (", eeprom_size - EEPROM_OFFSET_SN_VER); + SERIAL_ECHOPAIR(" bytes; crc ", (uint32_t)final_crc); + SERIAL_ECHOLNPGM(")"); + #endif + } - const uint16_t final_crc = working_crc; - const int eeprom_size = eeprom_index; - eeprom_index = EEPROM_OFFSET_SN_VER; - EEPROM_WRITE(final_crc); + bool MarlinSettings::fixed_parameter_load() { + uint16_t working_crc = 0, stored_crc; + EEPROM_START(); + eeprom_index = EEPROM_OFFSET_SN_VER; + EEPROM_READ(stored_crc); + working_crc = 0; - SERIAL_ECHO_START(); - SERIAL_ECHOPAIR("Fixed parameter (", eeprom_size - EEPROM_OFFSET_SN_VER); - SERIAL_ECHOPAIR("Fixed parameter bytes; crc ", (uint32_t)final_crc); - SERIAL_ECHOLNPGM(")"); + EEPROM_READ(hardware_version);//liu + NOLESS(hardware_version, 0.1); + SERIAL_ECHOLNPAIR("Hardware version:", hardware_version);//liu - } - bool MarlinSettings::Fixed_parameter_load(){ - uint16_t working_crc = 0; - uint16_t stored_crc; - EEPROM_START(); - eeprom_index = EEPROM_OFFSET_SN_VER; - EEPROM_READ(stored_crc); - working_crc=0; - EEPROM_READ(hardware_version);//liu hhardware_version - if(hardware_version< 0.1) - { - hardware_version = 0.1; - } - SERIAL_ECHOPAIR(" hardware version:", hardware_version);//liu - if (working_crc == stored_crc) { -#if ENABLED(EEPROM_CHITCHAT) - SERIAL_ECHO_START(); - SERIAL_ECHOPAIR("Fixed parameter (", eeprom_index - EEPROM_OFFSET_SN_VER); - SERIAL_ECHOPAIR(" bytes; crc ", (uint32_t)working_crc); - SERIAL_ECHOLNPGM(")"); -#endif - } - else{ - SERIAL_ECHOPAIR(" \r\nFixed parameter bytes; crc error ", (uint32_t)working_crc); - SERIAL_ECHOPAIR(" \r\Fixed parameter nbytes; crc error ", (uint32_t)stored_crc); - } + if (working_crc == stored_crc) { + #if ENABLED(EEPROM_CHITCHAT) + SERIAL_ECHO_START(); + SERIAL_ECHOPAIR("Fixed parameter (", eeprom_index - EEPROM_OFFSET_SN_VER); + SERIAL_ECHOPAIR(" bytes; crc ", (uint32_t)working_crc); + SERIAL_ECHOLNPGM(")"); + #endif + } + else { + SERIAL_ECHOPAIR("Fixed parameter crc error: ", (uint32_t)working_crc); + SERIAL_ECHOLNPAIR(" != ", (uint32_t)stored_crc); + } } /** diff --git a/A10M_marlin1.1.8/Marlin/configuration_store.h b/A10M_marlin1.1.8/Marlin/configuration_store.h index aee4d707..399fedfe 100644 --- a/A10M_marlin1.1.8/Marlin/configuration_store.h +++ b/A10M_marlin1.1.8/Marlin/configuration_store.h @@ -32,10 +32,12 @@ class MarlinSettings { static bool poweroff_save(); static bool poweroff_load(); - static void reset(); - static bool save(); - static bool Fixed_parameter_save() ; - static bool Fixed_parameter_load() ; + + static void reset(); + static bool save(); + static bool fixed_parameter_save(); + static bool fixed_parameter_load(); + #if ENABLED(EEPROM_SETTINGS) static bool load(); diff --git a/A10M_marlin1.1.8/Marlin/ultralcd.cpp b/A10M_marlin1.1.8/Marlin/ultralcd.cpp index 4a32dbbc..6a252e09 100644 --- a/A10M_marlin1.1.8/Marlin/ultralcd.cpp +++ b/A10M_marlin1.1.8/Marlin/ultralcd.cpp @@ -4187,9 +4187,9 @@ void kill_screen(const char* lcd_msg) { STATIC_ITEM(BOARD_NAME, true, true); // MyPrinterController STATIC_ITEM(MSG_INFO_BAUDRATE ": " STRINGIFY(BAUDRATE), true); // Baud: 250000 - // SERIAL_ECHOPAIR("hardware version:", hardware_version); //liu.. - //STATIC_ITEM(MSG_FW_VER, false, true); - STATIC_ITEM("" MSG_FW_VER, true); + //SERIAL_ECHOPAIR("hardware version:", hardware_version); //liu.. + //STATIC_ITEM(MSG_FW_VER, false, true); + STATIC_ITEM("" MSG_FW_VER, true); STATIC_ITEM(" " MSG_HW_VER,false, false, ftostr12ns(hardware_version));//MSG_HW_VER liu STATIC_ITEM(MSG_INFO_PROTOCOL ": " PROTOCOL_VERSION, true); // Protocol: 1.0 #if POWER_SUPPLY == 0 diff --git a/A10M_marlin1.1.8_3Dtouch/Marlin/Marlin_main.cpp b/A10M_marlin1.1.8_3Dtouch/Marlin/Marlin_main.cpp index d55c3bb6..c3ecfd58 100644 --- a/A10M_marlin1.1.8_3Dtouch/Marlin/Marlin_main.cpp +++ b/A10M_marlin1.1.8_3Dtouch/Marlin/Marlin_main.cpp @@ -11105,19 +11105,17 @@ inline void gcode_M999() { // gcode_LastN = Stopped_gcode_LastN; FlushSerialRequestResend(); } -inline void gcode_M2000(){ +inline void gcode_M2000() { } -inline void gcode_M2009(){ - if (parser.seen('V')) hardware_version = parser.value_celsius(); - //SERIAL_ECHOPAIR("HV...:", hardware_version);//liu - (void)settings.Fixed_parameter_save(); - SERIAL_ECHOLNPGM("HV_set_ok"); +inline void gcode_M2009() { + if (parser.seen('V')) hardware_version = parser.value_celsius(); + //SERIAL_ECHOPAIR("HV...:", hardware_version);//liu + (void)settings.fixed_parameter_save(); + SERIAL_ECHOLNPGM("HV_set_ok"); } - - #if ENABLED(SWITCHING_EXTRUDER) #if EXTRUDERS > 3 #define REQ_ANGLES 4 @@ -12528,7 +12526,8 @@ void process_parsed_command() { case 999: // M999: Restart after being Stopped gcode_M999(); break; - case 2000: // + + case 2000: // gcode_M2000(); break; case 2009: // @@ -14475,7 +14474,7 @@ void setup() { // Load data from EEPROM if available (or use defaults) // This also updates variables in the planner, elsewhere (void)settings.load(); - (void)settings.Fixed_parameter_load(); + (void)settings.fixed_parameter_load(); #if HAS_M206_COMMAND @@ -14788,12 +14787,11 @@ void loop() { // SERIAL_ECHOLN(tmp_y); // enqueue_and_echo_command(tmp_y); /////// - if(current_position[Z_AXIS]>=5) - { - sprintf_P(tmp_y, PSTR("G28 X")); - //SERIAL_ECHOLN(tmp_y); - enqueue_and_echo_command(tmp_y); - } + if (current_position[Z_AXIS] >= 5) { + sprintf_P(tmp_y, PSTR("G28 X")); + //SERIAL_ECHOLN(tmp_y); + enqueue_and_echo_command(tmp_y); + } powerloss.recovery = Rec_Idle; } endstops.report_state(); diff --git a/A10M_marlin1.1.8_3Dtouch/Marlin/configuration_store.cpp b/A10M_marlin1.1.8_3Dtouch/Marlin/configuration_store.cpp index 34b7625b..8db7213b 100644 --- a/A10M_marlin1.1.8_3Dtouch/Marlin/configuration_store.cpp +++ b/A10M_marlin1.1.8_3Dtouch/Marlin/configuration_store.cpp @@ -793,8 +793,6 @@ float hardware_version=0.1; // Filament Runout Sensors EEPROM_READ(filament_runout_enabled); - if(filament_runout_enabled != false) - filament_runout_enabled = true; if (working_crc == stored_crc) { #if ENABLED(EEPROM_CHITCHAT) @@ -811,53 +809,51 @@ float hardware_version=0.1; } } + bool MarlinSettings::fixed_parameter_save() {//liu + uint16_t working_crc = 0; + EEPROM_START(); + eeprom_index = EEPROM_OFFSET_SN_VER; - bool MarlinSettings::Fixed_parameter_save() {//liu + EEPROM_SKIP(working_crc); // Skip the checksum slot + working_crc = 0; + EEPROM_WRITE(hardware_version);//liu - uint16_t working_crc = 0; - EEPROM_START(); - eeprom_index = EEPROM_OFFSET_SN_VER; + const uint16_t final_crc = working_crc; + const int eeprom_size = eeprom_index; + eeprom_index = EEPROM_OFFSET_SN_VER; + EEPROM_WRITE(final_crc); - EEPROM_SKIP(working_crc); // Skip the checksum slot - working_crc = 0; - EEPROM_WRITE(hardware_version);//liu hw ver + #if ENABLED(EEPROM_CHITCHAT) + SERIAL_ECHO_START(); + SERIAL_ECHOPAIR("Fixed parameter (", eeprom_size - EEPROM_OFFSET_SN_VER); + SERIAL_ECHOPAIR(" bytes; crc ", (uint32_t)final_crc); + SERIAL_ECHOLNPGM(")"); + #endif + } - const uint16_t final_crc = working_crc; - const int eeprom_size = eeprom_index; - eeprom_index = EEPROM_OFFSET_SN_VER; - EEPROM_WRITE(final_crc); + bool MarlinSettings::fixed_parameter_load() { + uint16_t working_crc = 0, stored_crc; + EEPROM_START(); + eeprom_index = EEPROM_OFFSET_SN_VER; + EEPROM_READ(stored_crc); + working_crc = 0; - SERIAL_ECHO_START(); - SERIAL_ECHOPAIR("Fixed parameter (", eeprom_size - EEPROM_OFFSET_SN_VER); - SERIAL_ECHOPAIR("Fixed parameter bytes; crc ", (uint32_t)final_crc); - SERIAL_ECHOLNPGM(")"); + EEPROM_READ(hardware_version);//liu + NOLESS(hardware_version, 0.1); + SERIAL_ECHOLNPAIR("Hardware version:", hardware_version);//liu - } - bool MarlinSettings::Fixed_parameter_load(){ - uint16_t working_crc = 0; - uint16_t stored_crc; - EEPROM_START(); - eeprom_index = EEPROM_OFFSET_SN_VER; - EEPROM_READ(stored_crc); - working_crc=0; - EEPROM_READ(hardware_version);//liu hhardware_version - if(hardware_version< 0.1) - { - hardware_version = 0.1; - } - SERIAL_ECHOPAIR(" hardware version:", hardware_version);//liu - if (working_crc == stored_crc) { -#if ENABLED(EEPROM_CHITCHAT) - SERIAL_ECHO_START(); - SERIAL_ECHOPAIR("Fixed parameter (", eeprom_index - EEPROM_OFFSET_SN_VER); - SERIAL_ECHOPAIR(" bytes; crc ", (uint32_t)working_crc); - SERIAL_ECHOLNPGM(")"); -#endif - } - else{ - SERIAL_ECHOPAIR(" \r\nFixed parameter bytes; crc error ", (uint32_t)working_crc); - SERIAL_ECHOPAIR(" \r\Fixed parameter nbytes; crc error ", (uint32_t)stored_crc); - } + if (working_crc == stored_crc) { + #if ENABLED(EEPROM_CHITCHAT) + SERIAL_ECHO_START(); + SERIAL_ECHOPAIR("Fixed parameter (", eeprom_index - EEPROM_OFFSET_SN_VER); + SERIAL_ECHOPAIR(" bytes; crc ", (uint32_t)working_crc); + SERIAL_ECHOLNPGM(")"); + #endif + } + else { + SERIAL_ECHOPAIR("Fixed parameter crc error: ", (uint32_t)working_crc); + SERIAL_ECHOLNPAIR(" != ", (uint32_t)stored_crc); + } } /** diff --git a/A10M_marlin1.1.8_3Dtouch/Marlin/configuration_store.h b/A10M_marlin1.1.8_3Dtouch/Marlin/configuration_store.h index aee4d707..399fedfe 100644 --- a/A10M_marlin1.1.8_3Dtouch/Marlin/configuration_store.h +++ b/A10M_marlin1.1.8_3Dtouch/Marlin/configuration_store.h @@ -32,10 +32,12 @@ class MarlinSettings { static bool poweroff_save(); static bool poweroff_load(); - static void reset(); - static bool save(); - static bool Fixed_parameter_save() ; - static bool Fixed_parameter_load() ; + + static void reset(); + static bool save(); + static bool fixed_parameter_save(); + static bool fixed_parameter_load(); + #if ENABLED(EEPROM_SETTINGS) static bool load(); diff --git a/A10M_marlin1.1.8_3Dtouch/Marlin/ultralcd.cpp b/A10M_marlin1.1.8_3Dtouch/Marlin/ultralcd.cpp index 4a32dbbc..6a252e09 100644 --- a/A10M_marlin1.1.8_3Dtouch/Marlin/ultralcd.cpp +++ b/A10M_marlin1.1.8_3Dtouch/Marlin/ultralcd.cpp @@ -4187,9 +4187,9 @@ void kill_screen(const char* lcd_msg) { STATIC_ITEM(BOARD_NAME, true, true); // MyPrinterController STATIC_ITEM(MSG_INFO_BAUDRATE ": " STRINGIFY(BAUDRATE), true); // Baud: 250000 - // SERIAL_ECHOPAIR("hardware version:", hardware_version); //liu.. - //STATIC_ITEM(MSG_FW_VER, false, true); - STATIC_ITEM("" MSG_FW_VER, true); + //SERIAL_ECHOPAIR("hardware version:", hardware_version); //liu.. + //STATIC_ITEM(MSG_FW_VER, false, true); + STATIC_ITEM("" MSG_FW_VER, true); STATIC_ITEM(" " MSG_HW_VER,false, false, ftostr12ns(hardware_version));//MSG_HW_VER liu STATIC_ITEM(MSG_INFO_PROTOCOL ": " PROTOCOL_VERSION, true); // Protocol: 1.0 #if POWER_SUPPLY == 0 diff --git a/A10_marlin1.1.8/Marlin/Marlin_main.cpp b/A10_marlin1.1.8/Marlin/Marlin_main.cpp index 266ebe6e..34e31434 100644 --- a/A10_marlin1.1.8/Marlin/Marlin_main.cpp +++ b/A10_marlin1.1.8/Marlin/Marlin_main.cpp @@ -11049,19 +11049,17 @@ inline void gcode_M999() { // gcode_LastN = Stopped_gcode_LastN; FlushSerialRequestResend(); } -inline void gcode_M2000(){ +inline void gcode_M2000() { } -inline void gcode_M2009(){ - if (parser.seen('V')) hardware_version = parser.value_celsius(); - //SERIAL_ECHOPAIR("HV...:", hardware_version);//liu - (void)settings.Fixed_parameter_save(); - SERIAL_ECHOLNPGM("HV_set_ok"); +inline void gcode_M2009() { + if (parser.seen('V')) hardware_version = parser.value_celsius(); + //SERIAL_ECHOPAIR("HV...:", hardware_version);//liu + (void)settings.fixed_parameter_save(); + SERIAL_ECHOLNPGM("HV_set_ok"); } - - #if ENABLED(SWITCHING_EXTRUDER) #if EXTRUDERS > 3 #define REQ_ANGLES 4 @@ -12467,7 +12465,7 @@ void process_parsed_command() { case 999: // M999: Restart after being Stopped gcode_M999(); break; - case 2000: // + case 2000: // gcode_M2000(); break; case 2009: // @@ -14415,7 +14413,7 @@ void setup() { // Load data from EEPROM if available (or use defaults) // This also updates variables in the planner, elsewhere (void)settings.load(); - (void)settings.Fixed_parameter_load(); + (void)settings.fixed_parameter_load(); #if HAS_M206_COMMAND @@ -14723,12 +14721,11 @@ void loop() { // SERIAL_ECHOLN(tmp_y); // enqueue_and_echo_command(tmp_y); /////// - if(current_position[Z_AXIS]>=5) - { - sprintf_P(tmp_y, PSTR("G28 X")); - //SERIAL_ECHOLN(tmp_y); - enqueue_and_echo_command(tmp_y); - } + if (current_position[Z_AXIS] >= 5) { + sprintf_P(tmp_y, PSTR("G28 X")); + //SERIAL_ECHOLN(tmp_y); + enqueue_and_echo_command(tmp_y); + } powerloss.recovery = Rec_Idle; } endstops.report_state(); diff --git a/A10_marlin1.1.8/Marlin/configuration_store.cpp b/A10_marlin1.1.8/Marlin/configuration_store.cpp index 648744fe..6b7401c5 100644 --- a/A10_marlin1.1.8/Marlin/configuration_store.cpp +++ b/A10_marlin1.1.8/Marlin/configuration_store.cpp @@ -793,8 +793,6 @@ float hardware_version=0.1; // Filament Runout Sensors EEPROM_READ(filament_runout_enabled); - if(filament_runout_enabled != false) - filament_runout_enabled = true; if (working_crc == stored_crc) { #if ENABLED(EEPROM_CHITCHAT) @@ -811,53 +809,51 @@ float hardware_version=0.1; } } + bool MarlinSettings::fixed_parameter_save() {//liu + uint16_t working_crc = 0; + EEPROM_START(); + eeprom_index = EEPROM_OFFSET_SN_VER; - bool MarlinSettings::Fixed_parameter_save() {//liu + EEPROM_SKIP(working_crc); // Skip the checksum slot + working_crc = 0; + EEPROM_WRITE(hardware_version);//liu - uint16_t working_crc = 0; - EEPROM_START(); - eeprom_index = EEPROM_OFFSET_SN_VER; + const uint16_t final_crc = working_crc; + const int eeprom_size = eeprom_index; + eeprom_index = EEPROM_OFFSET_SN_VER; + EEPROM_WRITE(final_crc); - EEPROM_SKIP(working_crc); // Skip the checksum slot - working_crc = 0; - EEPROM_WRITE(hardware_version);//liu hw ver + #if ENABLED(EEPROM_CHITCHAT) + SERIAL_ECHO_START(); + SERIAL_ECHOPAIR("Fixed parameter (", eeprom_size - EEPROM_OFFSET_SN_VER); + SERIAL_ECHOPAIR(" bytes; crc ", (uint32_t)final_crc); + SERIAL_ECHOLNPGM(")"); + #endif + } - const uint16_t final_crc = working_crc; - const int eeprom_size = eeprom_index; - eeprom_index = EEPROM_OFFSET_SN_VER; - EEPROM_WRITE(final_crc); + bool MarlinSettings::fixed_parameter_load() { + uint16_t working_crc = 0, stored_crc; + EEPROM_START(); + eeprom_index = EEPROM_OFFSET_SN_VER; + EEPROM_READ(stored_crc); + working_crc = 0; - SERIAL_ECHO_START(); - SERIAL_ECHOPAIR("Fixed parameter (", eeprom_size - EEPROM_OFFSET_SN_VER); - SERIAL_ECHOPAIR("Fixed parameter bytes; crc ", (uint32_t)final_crc); - SERIAL_ECHOLNPGM(")"); + EEPROM_READ(hardware_version);//liu + NOLESS(hardware_version, 0.1); + SERIAL_ECHOLNPAIR("hardware version:", hardware_version);//liu - } - bool MarlinSettings::Fixed_parameter_load(){ - uint16_t working_crc = 0; - uint16_t stored_crc; - EEPROM_START(); - eeprom_index = EEPROM_OFFSET_SN_VER; - EEPROM_READ(stored_crc); - working_crc=0; - EEPROM_READ(hardware_version);//liu hhardware_version - if(hardware_version< 0.1) - { - hardware_version = 0.1; - } - SERIAL_ECHOPAIR(" hardware version:", hardware_version);//liu - if (working_crc == stored_crc) { -#if ENABLED(EEPROM_CHITCHAT) - SERIAL_ECHO_START(); - SERIAL_ECHOPAIR("Fixed parameter (", eeprom_index - EEPROM_OFFSET_SN_VER); - SERIAL_ECHOPAIR(" bytes; crc ", (uint32_t)working_crc); - SERIAL_ECHOLNPGM(")"); -#endif - } - else{ - SERIAL_ECHOPAIR(" \r\nFixed parameter bytes; crc error ", (uint32_t)working_crc); - SERIAL_ECHOPAIR(" \r\Fixed parameter nbytes; crc error ", (uint32_t)stored_crc); - } + if (working_crc == stored_crc) { + #if ENABLED(EEPROM_CHITCHAT) + SERIAL_ECHO_START(); + SERIAL_ECHOPAIR("Fixed parameter (", eeprom_index - EEPROM_OFFSET_SN_VER); + SERIAL_ECHOPAIR(" bytes; crc ", (uint32_t)working_crc); + SERIAL_ECHOLNPGM(")"); + #endif + } + else { + SERIAL_ECHOPAIR("Fixed parameter crc error: ", (uint32_t)working_crc); + SERIAL_ECHOLNPAIR(" != ", (uint32_t)stored_crc); + } } /** diff --git a/A10_marlin1.1.8/Marlin/configuration_store.h b/A10_marlin1.1.8/Marlin/configuration_store.h index aee4d707..399fedfe 100644 --- a/A10_marlin1.1.8/Marlin/configuration_store.h +++ b/A10_marlin1.1.8/Marlin/configuration_store.h @@ -32,10 +32,12 @@ class MarlinSettings { static bool poweroff_save(); static bool poweroff_load(); - static void reset(); - static bool save(); - static bool Fixed_parameter_save() ; - static bool Fixed_parameter_load() ; + + static void reset(); + static bool save(); + static bool fixed_parameter_save(); + static bool fixed_parameter_load(); + #if ENABLED(EEPROM_SETTINGS) static bool load(); diff --git a/A10_marlin1.1.8/Marlin/ultralcd.cpp b/A10_marlin1.1.8/Marlin/ultralcd.cpp index 4cc54a1d..e1ab3dd2 100644 --- a/A10_marlin1.1.8/Marlin/ultralcd.cpp +++ b/A10_marlin1.1.8/Marlin/ultralcd.cpp @@ -3952,9 +3952,9 @@ void kill_screen(const char* lcd_msg) { STATIC_ITEM(BOARD_NAME, true, true); // MyPrinterController STATIC_ITEM(MSG_INFO_BAUDRATE ": " STRINGIFY(BAUDRATE), true); // Baud: 250000 - // SERIAL_ECHOPAIR("hardware version:", hardware_version); //liu.. - //STATIC_ITEM(MSG_FW_VER, false, true); - STATIC_ITEM("" MSG_FW_VER, true); + //SERIAL_ECHOPAIR("hardware version:", hardware_version); //liu.. + //STATIC_ITEM(MSG_FW_VER, false, true); + STATIC_ITEM("" MSG_FW_VER, true); STATIC_ITEM(" " MSG_HW_VER,false, false, ftostr12ns(hardware_version));//MSG_HW_VER liu STATIC_ITEM(MSG_INFO_PROTOCOL ": " PROTOCOL_VERSION, true); // Protocol: 1.0 #if POWER_SUPPLY == 0 diff --git a/A10_marlin1.1.8_3DTtouch/Marlin/Marlin_main.cpp b/A10_marlin1.1.8_3DTtouch/Marlin/Marlin_main.cpp index 266ebe6e..0813c9d6 100644 --- a/A10_marlin1.1.8_3DTtouch/Marlin/Marlin_main.cpp +++ b/A10_marlin1.1.8_3DTtouch/Marlin/Marlin_main.cpp @@ -11049,19 +11049,17 @@ inline void gcode_M999() { // gcode_LastN = Stopped_gcode_LastN; FlushSerialRequestResend(); } -inline void gcode_M2000(){ +inline void gcode_M2000() { } -inline void gcode_M2009(){ - if (parser.seen('V')) hardware_version = parser.value_celsius(); - //SERIAL_ECHOPAIR("HV...:", hardware_version);//liu - (void)settings.Fixed_parameter_save(); - SERIAL_ECHOLNPGM("HV_set_ok"); +inline void gcode_M2009() { + if (parser.seen('V')) hardware_version = parser.value_celsius(); + //SERIAL_ECHOPAIR("HV...:", hardware_version);//liu + (void)settings.fixed_parameter_save(); + SERIAL_ECHOLNPGM("HV_set_ok"); } - - #if ENABLED(SWITCHING_EXTRUDER) #if EXTRUDERS > 3 #define REQ_ANGLES 4 @@ -12467,7 +12465,8 @@ void process_parsed_command() { case 999: // M999: Restart after being Stopped gcode_M999(); break; - case 2000: // + + case 2000: // gcode_M2000(); break; case 2009: // @@ -14415,7 +14414,7 @@ void setup() { // Load data from EEPROM if available (or use defaults) // This also updates variables in the planner, elsewhere (void)settings.load(); - (void)settings.Fixed_parameter_load(); + (void)settings.fixed_parameter_load(); #if HAS_M206_COMMAND @@ -14723,12 +14722,11 @@ void loop() { // SERIAL_ECHOLN(tmp_y); // enqueue_and_echo_command(tmp_y); /////// - if(current_position[Z_AXIS]>=5) - { - sprintf_P(tmp_y, PSTR("G28 X")); - //SERIAL_ECHOLN(tmp_y); - enqueue_and_echo_command(tmp_y); - } + if (current_position[Z_AXIS] >= 5) { + sprintf_P(tmp_y, PSTR("G28 X")); + //SERIAL_ECHOLN(tmp_y); + enqueue_and_echo_command(tmp_y); + } powerloss.recovery = Rec_Idle; } endstops.report_state(); diff --git a/A10_marlin1.1.8_3DTtouch/Marlin/configuration_store.cpp b/A10_marlin1.1.8_3DTtouch/Marlin/configuration_store.cpp index 648744fe..f48aa7b2 100644 --- a/A10_marlin1.1.8_3DTtouch/Marlin/configuration_store.cpp +++ b/A10_marlin1.1.8_3DTtouch/Marlin/configuration_store.cpp @@ -793,8 +793,6 @@ float hardware_version=0.1; // Filament Runout Sensors EEPROM_READ(filament_runout_enabled); - if(filament_runout_enabled != false) - filament_runout_enabled = true; if (working_crc == stored_crc) { #if ENABLED(EEPROM_CHITCHAT) @@ -811,53 +809,51 @@ float hardware_version=0.1; } } + bool MarlinSettings::fixed_parameter_save() {//liu + uint16_t working_crc = 0; + EEPROM_START(); + eeprom_index = EEPROM_OFFSET_SN_VER; - bool MarlinSettings::Fixed_parameter_save() {//liu + EEPROM_SKIP(working_crc); // Skip the checksum slot + working_crc = 0; + EEPROM_WRITE(hardware_version);//liu - uint16_t working_crc = 0; - EEPROM_START(); - eeprom_index = EEPROM_OFFSET_SN_VER; + const uint16_t final_crc = working_crc; + const int eeprom_size = eeprom_index; + eeprom_index = EEPROM_OFFSET_SN_VER; + EEPROM_WRITE(final_crc); - EEPROM_SKIP(working_crc); // Skip the checksum slot - working_crc = 0; - EEPROM_WRITE(hardware_version);//liu hw ver + #if ENABLED(EEPROM_CHITCHAT) + SERIAL_ECHO_START(); + SERIAL_ECHOPAIR("Fixed parameter (", eeprom_size - EEPROM_OFFSET_SN_VER); + SERIAL_ECHOPAIR(" bytes; crc ", (uint32_t)final_crc); + SERIAL_ECHOLNPGM(")"); + #endif + } - const uint16_t final_crc = working_crc; - const int eeprom_size = eeprom_index; - eeprom_index = EEPROM_OFFSET_SN_VER; - EEPROM_WRITE(final_crc); + bool MarlinSettings::fixed_parameter_load() { + uint16_t working_crc = 0, stored_crc; + EEPROM_START(); + eeprom_index = EEPROM_OFFSET_SN_VER; + EEPROM_READ(stored_crc); + working_crc = 0; - SERIAL_ECHO_START(); - SERIAL_ECHOPAIR("Fixed parameter (", eeprom_size - EEPROM_OFFSET_SN_VER); - SERIAL_ECHOPAIR("Fixed parameter bytes; crc ", (uint32_t)final_crc); - SERIAL_ECHOLNPGM(")"); + EEPROM_READ(hardware_version);//liu + NOLESS(hardware_version, 0.1); + SERIAL_ECHOLNPAIR("Hardware version:", hardware_version);//liu - } - bool MarlinSettings::Fixed_parameter_load(){ - uint16_t working_crc = 0; - uint16_t stored_crc; - EEPROM_START(); - eeprom_index = EEPROM_OFFSET_SN_VER; - EEPROM_READ(stored_crc); - working_crc=0; - EEPROM_READ(hardware_version);//liu hhardware_version - if(hardware_version< 0.1) - { - hardware_version = 0.1; - } - SERIAL_ECHOPAIR(" hardware version:", hardware_version);//liu - if (working_crc == stored_crc) { -#if ENABLED(EEPROM_CHITCHAT) - SERIAL_ECHO_START(); - SERIAL_ECHOPAIR("Fixed parameter (", eeprom_index - EEPROM_OFFSET_SN_VER); - SERIAL_ECHOPAIR(" bytes; crc ", (uint32_t)working_crc); - SERIAL_ECHOLNPGM(")"); -#endif - } - else{ - SERIAL_ECHOPAIR(" \r\nFixed parameter bytes; crc error ", (uint32_t)working_crc); - SERIAL_ECHOPAIR(" \r\Fixed parameter nbytes; crc error ", (uint32_t)stored_crc); - } + if (working_crc == stored_crc) { + #if ENABLED(EEPROM_CHITCHAT) + SERIAL_ECHO_START(); + SERIAL_ECHOPAIR("Fixed parameter (", eeprom_index - EEPROM_OFFSET_SN_VER); + SERIAL_ECHOPAIR(" bytes; crc ", (uint32_t)working_crc); + SERIAL_ECHOLNPGM(")"); + #endif + } + else { + SERIAL_ECHOPAIR("Fixed parameter crc error: ", (uint32_t)working_crc); + SERIAL_ECHOLNPAIR(" != ", (uint32_t)stored_crc); + } } /** diff --git a/A10_marlin1.1.8_3DTtouch/Marlin/configuration_store.h b/A10_marlin1.1.8_3DTtouch/Marlin/configuration_store.h index aee4d707..399fedfe 100644 --- a/A10_marlin1.1.8_3DTtouch/Marlin/configuration_store.h +++ b/A10_marlin1.1.8_3DTtouch/Marlin/configuration_store.h @@ -32,10 +32,12 @@ class MarlinSettings { static bool poweroff_save(); static bool poweroff_load(); - static void reset(); - static bool save(); - static bool Fixed_parameter_save() ; - static bool Fixed_parameter_load() ; + + static void reset(); + static bool save(); + static bool fixed_parameter_save(); + static bool fixed_parameter_load(); + #if ENABLED(EEPROM_SETTINGS) static bool load(); diff --git a/A10_marlin1.1.8_3DTtouch/Marlin/ultralcd.cpp b/A10_marlin1.1.8_3DTtouch/Marlin/ultralcd.cpp index 4cc54a1d..e1ab3dd2 100644 --- a/A10_marlin1.1.8_3DTtouch/Marlin/ultralcd.cpp +++ b/A10_marlin1.1.8_3DTtouch/Marlin/ultralcd.cpp @@ -3952,9 +3952,9 @@ void kill_screen(const char* lcd_msg) { STATIC_ITEM(BOARD_NAME, true, true); // MyPrinterController STATIC_ITEM(MSG_INFO_BAUDRATE ": " STRINGIFY(BAUDRATE), true); // Baud: 250000 - // SERIAL_ECHOPAIR("hardware version:", hardware_version); //liu.. - //STATIC_ITEM(MSG_FW_VER, false, true); - STATIC_ITEM("" MSG_FW_VER, true); + //SERIAL_ECHOPAIR("hardware version:", hardware_version); //liu.. + //STATIC_ITEM(MSG_FW_VER, false, true); + STATIC_ITEM("" MSG_FW_VER, true); STATIC_ITEM(" " MSG_HW_VER,false, false, ftostr12ns(hardware_version));//MSG_HW_VER liu STATIC_ITEM(MSG_INFO_PROTOCOL ": " PROTOCOL_VERSION, true); // Protocol: 1.0 #if POWER_SUPPLY == 0 diff --git a/A20M_Marlin-1.1.x12864/Marlin/Marlin_main.cpp b/A20M_Marlin-1.1.x12864/Marlin/Marlin_main.cpp index 1eec20ca..bd634898 100644 --- a/A20M_Marlin-1.1.x12864/Marlin/Marlin_main.cpp +++ b/A20M_Marlin-1.1.x12864/Marlin/Marlin_main.cpp @@ -11106,15 +11106,15 @@ inline void gcode_M999() { // gcode_LastN = Stopped_gcode_LastN; FlushSerialRequestResend(); } -inline void gcode_M2000(){ +inline void gcode_M2000() { } -inline void gcode_M2009(){ - if (parser.seen('V')) hardware_version = parser.value_celsius(); - //SERIAL_ECHOPAIR("HV...:", hardware_version);//liu - (void)settings.Fixed_parameter_save(); - SERIAL_ECHOLNPGM("HV_set_ok"); +inline void gcode_M2009() { + if (parser.seen('V')) hardware_version = parser.value_celsius(); + //SERIAL_ECHOPAIR("HV...:", hardware_version);//liu + (void)settings.fixed_parameter_save(); + SERIAL_ECHOLNPGM("HV_set_ok"); } @@ -12529,7 +12529,8 @@ void process_parsed_command() { case 999: // M999: Restart after being Stopped gcode_M999(); break; - case 2000: // + + case 2000: // gcode_M2000(); break; case 2009: // @@ -14476,7 +14477,7 @@ void setup() { // Load data from EEPROM if available (or use defaults) // This also updates variables in the planner, elsewhere (void)settings.load(); - (void)settings.Fixed_parameter_load(); + (void)settings.fixed_parameter_load(); #if HAS_M206_COMMAND @@ -14789,12 +14790,11 @@ void loop() { // SERIAL_ECHOLN(tmp_y); // enqueue_and_echo_command(tmp_y); /////// - if(current_position[Z_AXIS]>=5) - { - sprintf_P(tmp_y, PSTR("G28 X")); - //SERIAL_ECHOLN(tmp_y); - enqueue_and_echo_command(tmp_y); - } + if (current_position[Z_AXIS] >= 5) { + sprintf_P(tmp_y, PSTR("G28 X")); + //SERIAL_ECHOLN(tmp_y); + enqueue_and_echo_command(tmp_y); + } powerloss.recovery = Rec_Idle; } endstops.report_state(); diff --git a/A20M_Marlin-1.1.x12864/Marlin/configuration_store.cpp b/A20M_Marlin-1.1.x12864/Marlin/configuration_store.cpp index 428fe89e..7e1952a2 100644 --- a/A20M_Marlin-1.1.x12864/Marlin/configuration_store.cpp +++ b/A20M_Marlin-1.1.x12864/Marlin/configuration_store.cpp @@ -793,8 +793,6 @@ float hardware_version=0.1; // Filament Runout Sensors EEPROM_READ(filament_runout_enabled); - if(filament_runout_enabled != false) - filament_runout_enabled = true; if (working_crc == stored_crc) { #if ENABLED(EEPROM_CHITCHAT) @@ -811,53 +809,51 @@ float hardware_version=0.1; } } + bool MarlinSettings::fixed_parameter_save() {//liu + uint16_t working_crc = 0; + EEPROM_START(); + eeprom_index = EEPROM_OFFSET_SN_VER; - bool MarlinSettings::Fixed_parameter_save() {//liu + EEPROM_SKIP(working_crc); // Skip the checksum slot + working_crc = 0; + EEPROM_WRITE(hardware_version);//liu - uint16_t working_crc = 0; - EEPROM_START(); - eeprom_index = EEPROM_OFFSET_SN_VER; + const uint16_t final_crc = working_crc; + const int eeprom_size = eeprom_index; + eeprom_index = EEPROM_OFFSET_SN_VER; + EEPROM_WRITE(final_crc); - EEPROM_SKIP(working_crc); // Skip the checksum slot - working_crc = 0; - EEPROM_WRITE(hardware_version);//liu hw ver + #if ENABLED(EEPROM_CHITCHAT) + SERIAL_ECHO_START(); + SERIAL_ECHOPAIR("Fixed parameter (", eeprom_size - EEPROM_OFFSET_SN_VER); + SERIAL_ECHOPAIR(" bytes; crc ", (uint32_t)final_crc); + SERIAL_ECHOLNPGM(")"); + #endif + } - const uint16_t final_crc = working_crc; - const int eeprom_size = eeprom_index; - eeprom_index = EEPROM_OFFSET_SN_VER; - EEPROM_WRITE(final_crc); + bool MarlinSettings::fixed_parameter_load() { + uint16_t working_crc = 0, stored_crc; + EEPROM_START(); + eeprom_index = EEPROM_OFFSET_SN_VER; + EEPROM_READ(stored_crc); + working_crc = 0; - SERIAL_ECHO_START(); - SERIAL_ECHOPAIR("Fixed parameter (", eeprom_size - EEPROM_OFFSET_SN_VER); - SERIAL_ECHOPAIR("Fixed parameter bytes; crc ", (uint32_t)final_crc); - SERIAL_ECHOLNPGM(")"); + EEPROM_READ(hardware_version);//liu + NOLESS(hardware_version, 0.1); + SERIAL_ECHOLNPAIR("Hardware version:", hardware_version);//liu - } - bool MarlinSettings::Fixed_parameter_load(){ - uint16_t working_crc = 0; - uint16_t stored_crc; - EEPROM_START(); - eeprom_index = EEPROM_OFFSET_SN_VER; - EEPROM_READ(stored_crc); - working_crc=0; - EEPROM_READ(hardware_version);//liu hhardware_version - if(hardware_version< 0.1) - { - hardware_version = 0.1; - } - SERIAL_ECHOPAIR(" hardware version:", hardware_version);//liu - if (working_crc == stored_crc) { -#if ENABLED(EEPROM_CHITCHAT) - SERIAL_ECHO_START(); - SERIAL_ECHOPAIR("Fixed parameter (", eeprom_index - EEPROM_OFFSET_SN_VER); - SERIAL_ECHOPAIR(" bytes; crc ", (uint32_t)working_crc); - SERIAL_ECHOLNPGM(")"); -#endif - } - else{ - SERIAL_ECHOPAIR(" \r\nFixed parameter bytes; crc error ", (uint32_t)working_crc); - SERIAL_ECHOPAIR(" \r\Fixed parameter nbytes; crc error ", (uint32_t)stored_crc); - } + if (working_crc == stored_crc) { + #if ENABLED(EEPROM_CHITCHAT) + SERIAL_ECHO_START(); + SERIAL_ECHOPAIR("Fixed parameter (", eeprom_index - EEPROM_OFFSET_SN_VER); + SERIAL_ECHOPAIR(" bytes; crc ", (uint32_t)working_crc); + SERIAL_ECHOLNPGM(")"); + #endif + } + else { + SERIAL_ECHOPAIR("Fixed parameter crc error: ", (uint32_t)working_crc); + SERIAL_ECHOLNPAIR(" != ", (uint32_t)stored_crc); + } } /** diff --git a/A20M_Marlin-1.1.x12864/Marlin/configuration_store.h b/A20M_Marlin-1.1.x12864/Marlin/configuration_store.h index aee4d707..399fedfe 100644 --- a/A20M_Marlin-1.1.x12864/Marlin/configuration_store.h +++ b/A20M_Marlin-1.1.x12864/Marlin/configuration_store.h @@ -32,10 +32,12 @@ class MarlinSettings { static bool poweroff_save(); static bool poweroff_load(); - static void reset(); - static bool save(); - static bool Fixed_parameter_save() ; - static bool Fixed_parameter_load() ; + + static void reset(); + static bool save(); + static bool fixed_parameter_save(); + static bool fixed_parameter_load(); + #if ENABLED(EEPROM_SETTINGS) static bool load(); diff --git a/A20M_Marlin-1.1.x12864/Marlin/ultralcd.cpp b/A20M_Marlin-1.1.x12864/Marlin/ultralcd.cpp index b1c8e73c..838e0382 100644 --- a/A20M_Marlin-1.1.x12864/Marlin/ultralcd.cpp +++ b/A20M_Marlin-1.1.x12864/Marlin/ultralcd.cpp @@ -4186,9 +4186,9 @@ void kill_screen(const char* lcd_msg) { START_SCREEN(); STATIC_ITEM(BOARD_NAME, true, true); // MyPrinterController STATIC_ITEM(MSG_INFO_BAUDRATE ": " STRINGIFY(BAUDRATE), true); // Baud: 250000 - // SERIAL_ECHOPAIR("hardware version:", hardware_version); //liu.. - //STATIC_ITEM(MSG_FW_VER, false, true); - STATIC_ITEM("" MSG_FW_VER, true); + //SERIAL_ECHOPAIR("hardware version:", hardware_version); //liu.. + //STATIC_ITEM(MSG_FW_VER, false, true); + STATIC_ITEM("" MSG_FW_VER, true); STATIC_ITEM(" " MSG_HW_VER,false, false, ftostr12ns(hardware_version));//MSG_HW_VER liu STATIC_ITEM(MSG_INFO_PROTOCOL ": " PROTOCOL_VERSION, true); // Protocol: 1.0 #if POWER_SUPPLY == 0 diff --git a/A20M_Marlin-1.1.x12864_3DTouch/Marlin/Marlin_main.cpp b/A20M_Marlin-1.1.x12864_3DTouch/Marlin/Marlin_main.cpp index 1eec20ca..88af4fc1 100644 --- a/A20M_Marlin-1.1.x12864_3DTouch/Marlin/Marlin_main.cpp +++ b/A20M_Marlin-1.1.x12864_3DTouch/Marlin/Marlin_main.cpp @@ -11106,19 +11106,17 @@ inline void gcode_M999() { // gcode_LastN = Stopped_gcode_LastN; FlushSerialRequestResend(); } -inline void gcode_M2000(){ +inline void gcode_M2000() { } -inline void gcode_M2009(){ - if (parser.seen('V')) hardware_version = parser.value_celsius(); - //SERIAL_ECHOPAIR("HV...:", hardware_version);//liu - (void)settings.Fixed_parameter_save(); - SERIAL_ECHOLNPGM("HV_set_ok"); +inline void gcode_M2009() { + if (parser.seen('V')) hardware_version = parser.value_celsius(); + //SERIAL_ECHOPAIR("HV...:", hardware_version);//liu + (void)settings.fixed_parameter_save(); + SERIAL_ECHOLNPGM("HV_set_ok"); } - - #if ENABLED(SWITCHING_EXTRUDER) #if EXTRUDERS > 3 #define REQ_ANGLES 4 @@ -12529,7 +12527,8 @@ void process_parsed_command() { case 999: // M999: Restart after being Stopped gcode_M999(); break; - case 2000: // + + case 2000: // gcode_M2000(); break; case 2009: // @@ -14476,7 +14475,7 @@ void setup() { // Load data from EEPROM if available (or use defaults) // This also updates variables in the planner, elsewhere (void)settings.load(); - (void)settings.Fixed_parameter_load(); + (void)settings.fixed_parameter_load(); #if HAS_M206_COMMAND @@ -14789,12 +14788,11 @@ void loop() { // SERIAL_ECHOLN(tmp_y); // enqueue_and_echo_command(tmp_y); /////// - if(current_position[Z_AXIS]>=5) - { - sprintf_P(tmp_y, PSTR("G28 X")); - //SERIAL_ECHOLN(tmp_y); - enqueue_and_echo_command(tmp_y); - } + if (current_position[Z_AXIS] >= 5) { + sprintf_P(tmp_y, PSTR("G28 X")); + //SERIAL_ECHOLN(tmp_y); + enqueue_and_echo_command(tmp_y); + } powerloss.recovery = Rec_Idle; } endstops.report_state(); diff --git a/A20M_Marlin-1.1.x12864_3DTouch/Marlin/configuration_store.cpp b/A20M_Marlin-1.1.x12864_3DTouch/Marlin/configuration_store.cpp index 428fe89e..7e1952a2 100644 --- a/A20M_Marlin-1.1.x12864_3DTouch/Marlin/configuration_store.cpp +++ b/A20M_Marlin-1.1.x12864_3DTouch/Marlin/configuration_store.cpp @@ -793,8 +793,6 @@ float hardware_version=0.1; // Filament Runout Sensors EEPROM_READ(filament_runout_enabled); - if(filament_runout_enabled != false) - filament_runout_enabled = true; if (working_crc == stored_crc) { #if ENABLED(EEPROM_CHITCHAT) @@ -811,53 +809,51 @@ float hardware_version=0.1; } } + bool MarlinSettings::fixed_parameter_save() {//liu + uint16_t working_crc = 0; + EEPROM_START(); + eeprom_index = EEPROM_OFFSET_SN_VER; - bool MarlinSettings::Fixed_parameter_save() {//liu + EEPROM_SKIP(working_crc); // Skip the checksum slot + working_crc = 0; + EEPROM_WRITE(hardware_version);//liu - uint16_t working_crc = 0; - EEPROM_START(); - eeprom_index = EEPROM_OFFSET_SN_VER; + const uint16_t final_crc = working_crc; + const int eeprom_size = eeprom_index; + eeprom_index = EEPROM_OFFSET_SN_VER; + EEPROM_WRITE(final_crc); - EEPROM_SKIP(working_crc); // Skip the checksum slot - working_crc = 0; - EEPROM_WRITE(hardware_version);//liu hw ver + #if ENABLED(EEPROM_CHITCHAT) + SERIAL_ECHO_START(); + SERIAL_ECHOPAIR("Fixed parameter (", eeprom_size - EEPROM_OFFSET_SN_VER); + SERIAL_ECHOPAIR(" bytes; crc ", (uint32_t)final_crc); + SERIAL_ECHOLNPGM(")"); + #endif + } - const uint16_t final_crc = working_crc; - const int eeprom_size = eeprom_index; - eeprom_index = EEPROM_OFFSET_SN_VER; - EEPROM_WRITE(final_crc); + bool MarlinSettings::fixed_parameter_load() { + uint16_t working_crc = 0, stored_crc; + EEPROM_START(); + eeprom_index = EEPROM_OFFSET_SN_VER; + EEPROM_READ(stored_crc); + working_crc = 0; - SERIAL_ECHO_START(); - SERIAL_ECHOPAIR("Fixed parameter (", eeprom_size - EEPROM_OFFSET_SN_VER); - SERIAL_ECHOPAIR("Fixed parameter bytes; crc ", (uint32_t)final_crc); - SERIAL_ECHOLNPGM(")"); + EEPROM_READ(hardware_version);//liu + NOLESS(hardware_version, 0.1); + SERIAL_ECHOLNPAIR("Hardware version:", hardware_version);//liu - } - bool MarlinSettings::Fixed_parameter_load(){ - uint16_t working_crc = 0; - uint16_t stored_crc; - EEPROM_START(); - eeprom_index = EEPROM_OFFSET_SN_VER; - EEPROM_READ(stored_crc); - working_crc=0; - EEPROM_READ(hardware_version);//liu hhardware_version - if(hardware_version< 0.1) - { - hardware_version = 0.1; - } - SERIAL_ECHOPAIR(" hardware version:", hardware_version);//liu - if (working_crc == stored_crc) { -#if ENABLED(EEPROM_CHITCHAT) - SERIAL_ECHO_START(); - SERIAL_ECHOPAIR("Fixed parameter (", eeprom_index - EEPROM_OFFSET_SN_VER); - SERIAL_ECHOPAIR(" bytes; crc ", (uint32_t)working_crc); - SERIAL_ECHOLNPGM(")"); -#endif - } - else{ - SERIAL_ECHOPAIR(" \r\nFixed parameter bytes; crc error ", (uint32_t)working_crc); - SERIAL_ECHOPAIR(" \r\Fixed parameter nbytes; crc error ", (uint32_t)stored_crc); - } + if (working_crc == stored_crc) { + #if ENABLED(EEPROM_CHITCHAT) + SERIAL_ECHO_START(); + SERIAL_ECHOPAIR("Fixed parameter (", eeprom_index - EEPROM_OFFSET_SN_VER); + SERIAL_ECHOPAIR(" bytes; crc ", (uint32_t)working_crc); + SERIAL_ECHOLNPGM(")"); + #endif + } + else { + SERIAL_ECHOPAIR("Fixed parameter crc error: ", (uint32_t)working_crc); + SERIAL_ECHOLNPAIR(" != ", (uint32_t)stored_crc); + } } /** diff --git a/A20M_Marlin-1.1.x12864_3DTouch/Marlin/configuration_store.h b/A20M_Marlin-1.1.x12864_3DTouch/Marlin/configuration_store.h index aee4d707..399fedfe 100644 --- a/A20M_Marlin-1.1.x12864_3DTouch/Marlin/configuration_store.h +++ b/A20M_Marlin-1.1.x12864_3DTouch/Marlin/configuration_store.h @@ -32,10 +32,12 @@ class MarlinSettings { static bool poweroff_save(); static bool poweroff_load(); - static void reset(); - static bool save(); - static bool Fixed_parameter_save() ; - static bool Fixed_parameter_load() ; + + static void reset(); + static bool save(); + static bool fixed_parameter_save(); + static bool fixed_parameter_load(); + #if ENABLED(EEPROM_SETTINGS) static bool load(); diff --git a/A20M_Marlin-1.1.x12864_3DTouch/Marlin/ultralcd.cpp b/A20M_Marlin-1.1.x12864_3DTouch/Marlin/ultralcd.cpp index b1c8e73c..838e0382 100644 --- a/A20M_Marlin-1.1.x12864_3DTouch/Marlin/ultralcd.cpp +++ b/A20M_Marlin-1.1.x12864_3DTouch/Marlin/ultralcd.cpp @@ -4186,9 +4186,9 @@ void kill_screen(const char* lcd_msg) { START_SCREEN(); STATIC_ITEM(BOARD_NAME, true, true); // MyPrinterController STATIC_ITEM(MSG_INFO_BAUDRATE ": " STRINGIFY(BAUDRATE), true); // Baud: 250000 - // SERIAL_ECHOPAIR("hardware version:", hardware_version); //liu.. - //STATIC_ITEM(MSG_FW_VER, false, true); - STATIC_ITEM("" MSG_FW_VER, true); + //SERIAL_ECHOPAIR("hardware version:", hardware_version); //liu.. + //STATIC_ITEM(MSG_FW_VER, false, true); + STATIC_ITEM("" MSG_FW_VER, true); STATIC_ITEM(" " MSG_HW_VER,false, false, ftostr12ns(hardware_version));//MSG_HW_VER liu STATIC_ITEM(MSG_INFO_PROTOCOL ": " PROTOCOL_VERSION, true); // Protocol: 1.0 #if POWER_SUPPLY == 0 diff --git a/A20_Marlin-1.1.x12864/Marlin/Marlin_main.cpp b/A20_Marlin-1.1.x12864/Marlin/Marlin_main.cpp index bf2b9492..e2218202 100644 --- a/A20_Marlin-1.1.x12864/Marlin/Marlin_main.cpp +++ b/A20_Marlin-1.1.x12864/Marlin/Marlin_main.cpp @@ -11049,15 +11049,15 @@ inline void gcode_M999() { // gcode_LastN = Stopped_gcode_LastN; FlushSerialRequestResend(); } -inline void gcode_M2000(){ +inline void gcode_M2000() { } -inline void gcode_M2009(){ - if (parser.seen('V')) hardware_version = parser.value_celsius(); - //SERIAL_ECHOPAIR("HV...:", hardware_version);//liu - (void)settings.Fixed_parameter_save(); - SERIAL_ECHOLNPGM("HV_set_ok"); +inline void gcode_M2009() { + if (parser.seen('V')) hardware_version = parser.value_celsius(); + //SERIAL_ECHOPAIR("HV...:", hardware_version);//liu + (void)settings.fixed_parameter_save(); + SERIAL_ECHOLNPGM("HV_set_ok"); } @@ -12467,7 +12467,8 @@ void process_parsed_command() { case 999: // M999: Restart after being Stopped gcode_M999(); break; - case 2000: // + + case 2000: // gcode_M2000(); break; case 2009: // @@ -14414,7 +14415,7 @@ void setup() { // Load data from EEPROM if available (or use defaults) // This also updates variables in the planner, elsewhere (void)settings.load(); - (void)settings.Fixed_parameter_load(); + (void)settings.fixed_parameter_load(); #if HAS_M206_COMMAND @@ -14720,12 +14721,11 @@ void loop() { // SERIAL_ECHOLN(tmp_y); // enqueue_and_echo_command(tmp_y); /////// - if(current_position[Z_AXIS]>=5) - { - sprintf_P(tmp_y, PSTR("G28 X")); - //SERIAL_ECHOLN(tmp_y); - enqueue_and_echo_command(tmp_y); - } + if (current_position[Z_AXIS] >=5 ) { + sprintf_P(tmp_y, PSTR("G28 X")); + //SERIAL_ECHOLN(tmp_y); + enqueue_and_echo_command(tmp_y); + } powerloss.recovery = Rec_Idle; } endstops.report_state(); diff --git a/A20_Marlin-1.1.x12864/Marlin/configuration_store.cpp b/A20_Marlin-1.1.x12864/Marlin/configuration_store.cpp index 6712ecde..29caea5c 100644 --- a/A20_Marlin-1.1.x12864/Marlin/configuration_store.cpp +++ b/A20_Marlin-1.1.x12864/Marlin/configuration_store.cpp @@ -793,8 +793,6 @@ float hardware_version=0.1; // Filament Runout Sensors EEPROM_READ(filament_runout_enabled); - if(filament_runout_enabled != false) - filament_runout_enabled = true; if (working_crc == stored_crc) { #if ENABLED(EEPROM_CHITCHAT) @@ -811,53 +809,51 @@ float hardware_version=0.1; } } + bool MarlinSettings::fixed_parameter_save() {//liu + uint16_t working_crc = 0; + EEPROM_START(); + eeprom_index = EEPROM_OFFSET_SN_VER; - bool MarlinSettings::Fixed_parameter_save() {//liu + EEPROM_SKIP(working_crc); // Skip the checksum slot + working_crc = 0; + EEPROM_WRITE(hardware_version);//liu - uint16_t working_crc = 0; - EEPROM_START(); - eeprom_index = EEPROM_OFFSET_SN_VER; + const uint16_t final_crc = working_crc; + const int eeprom_size = eeprom_index; + eeprom_index = EEPROM_OFFSET_SN_VER; + EEPROM_WRITE(final_crc); - EEPROM_SKIP(working_crc); // Skip the checksum slot - working_crc = 0; - EEPROM_WRITE(hardware_version);//liu hw ver + #if ENABLED(EEPROM_CHITCHAT) + SERIAL_ECHO_START(); + SERIAL_ECHOPAIR("Fixed parameter (", eeprom_size - EEPROM_OFFSET_SN_VER); + SERIAL_ECHOPAIR(" bytes; crc ", (uint32_t)final_crc); + SERIAL_ECHOLNPGM(")"); + #endif + } - const uint16_t final_crc = working_crc; - const int eeprom_size = eeprom_index; - eeprom_index = EEPROM_OFFSET_SN_VER; - EEPROM_WRITE(final_crc); + bool MarlinSettings::fixed_parameter_load() { + uint16_t working_crc = 0, stored_crc; + EEPROM_START(); + eeprom_index = EEPROM_OFFSET_SN_VER; + EEPROM_READ(stored_crc); + working_crc = 0; - SERIAL_ECHO_START(); - SERIAL_ECHOPAIR("Fixed parameter (", eeprom_size - EEPROM_OFFSET_SN_VER); - SERIAL_ECHOPAIR("Fixed parameter bytes; crc ", (uint32_t)final_crc); - SERIAL_ECHOLNPGM(")"); + EEPROM_READ(hardware_version);//liu + NOLESS(hardware_version, 0.1); + SERIAL_ECHOLNPAIR("Hardware version:", hardware_version);//liu - } - bool MarlinSettings::Fixed_parameter_load(){ - uint16_t working_crc = 0; - uint16_t stored_crc; - EEPROM_START(); - eeprom_index = EEPROM_OFFSET_SN_VER; - EEPROM_READ(stored_crc); - working_crc=0; - EEPROM_READ(hardware_version);//liu hhardware_version - if(hardware_version< 0.1) - { - hardware_version = 0.1; - } - SERIAL_ECHOPAIR(" hardware version:", hardware_version);//liu - if (working_crc == stored_crc) { -#if ENABLED(EEPROM_CHITCHAT) - SERIAL_ECHO_START(); - SERIAL_ECHOPAIR("Fixed parameter (", eeprom_index - EEPROM_OFFSET_SN_VER); - SERIAL_ECHOPAIR(" bytes; crc ", (uint32_t)working_crc); - SERIAL_ECHOLNPGM(")"); -#endif - } - else{ - SERIAL_ECHOPAIR(" \r\nFixed parameter bytes; crc error ", (uint32_t)working_crc); - SERIAL_ECHOPAIR(" \r\Fixed parameter nbytes; crc error ", (uint32_t)stored_crc); - } + if (working_crc == stored_crc) { + #if ENABLED(EEPROM_CHITCHAT) + SERIAL_ECHO_START(); + SERIAL_ECHOPAIR("Fixed parameter (", eeprom_index - EEPROM_OFFSET_SN_VER); + SERIAL_ECHOPAIR(" bytes; crc ", (uint32_t)working_crc); + SERIAL_ECHOLNPGM(")"); + #endif + } + else { + SERIAL_ECHOPAIR("Fixed parameter crc error: ", (uint32_t)working_crc); + SERIAL_ECHOLNPAIR(" != ", (uint32_t)stored_crc); + } } /** diff --git a/A20_Marlin-1.1.x12864/Marlin/configuration_store.h b/A20_Marlin-1.1.x12864/Marlin/configuration_store.h index aee4d707..399fedfe 100644 --- a/A20_Marlin-1.1.x12864/Marlin/configuration_store.h +++ b/A20_Marlin-1.1.x12864/Marlin/configuration_store.h @@ -32,10 +32,12 @@ class MarlinSettings { static bool poweroff_save(); static bool poweroff_load(); - static void reset(); - static bool save(); - static bool Fixed_parameter_save() ; - static bool Fixed_parameter_load() ; + + static void reset(); + static bool save(); + static bool fixed_parameter_save(); + static bool fixed_parameter_load(); + #if ENABLED(EEPROM_SETTINGS) static bool load(); diff --git a/A20_Marlin-1.1.x12864/Marlin/ultralcd.cpp b/A20_Marlin-1.1.x12864/Marlin/ultralcd.cpp index 374f5458..09bf13de 100644 --- a/A20_Marlin-1.1.x12864/Marlin/ultralcd.cpp +++ b/A20_Marlin-1.1.x12864/Marlin/ultralcd.cpp @@ -3951,9 +3951,9 @@ void kill_screen(const char* lcd_msg) { START_SCREEN(); STATIC_ITEM(BOARD_NAME, true, true); // MyPrinterController STATIC_ITEM(MSG_INFO_BAUDRATE ": " STRINGIFY(BAUDRATE), true); // Baud: 250000 - // SERIAL_ECHOPAIR("hardware version:", hardware_version); //liu.. - //STATIC_ITEM(MSG_FW_VER, false, true); - STATIC_ITEM("" MSG_FW_VER, true); + //SERIAL_ECHOPAIR("hardware version:", hardware_version); //liu.. + //STATIC_ITEM(MSG_FW_VER, false, true); + STATIC_ITEM("" MSG_FW_VER, true); STATIC_ITEM(" " MSG_HW_VER,false, false, ftostr12ns(hardware_version));//MSG_HW_VER liu STATIC_ITEM(MSG_INFO_PROTOCOL ": " PROTOCOL_VERSION, true); // Protocol: 1.0 #if POWER_SUPPLY == 0 diff --git a/A20_Marlin-1.1.x12864_3DTouch/Marlin/Marlin_main.cpp b/A20_Marlin-1.1.x12864_3DTouch/Marlin/Marlin_main.cpp index bf2b9492..3963611e 100644 --- a/A20_Marlin-1.1.x12864_3DTouch/Marlin/Marlin_main.cpp +++ b/A20_Marlin-1.1.x12864_3DTouch/Marlin/Marlin_main.cpp @@ -11049,19 +11049,17 @@ inline void gcode_M999() { // gcode_LastN = Stopped_gcode_LastN; FlushSerialRequestResend(); } -inline void gcode_M2000(){ +inline void gcode_M2000() { } -inline void gcode_M2009(){ - if (parser.seen('V')) hardware_version = parser.value_celsius(); - //SERIAL_ECHOPAIR("HV...:", hardware_version);//liu - (void)settings.Fixed_parameter_save(); - SERIAL_ECHOLNPGM("HV_set_ok"); +inline void gcode_M2009() { + if (parser.seen('V')) hardware_version = parser.value_celsius(); + //SERIAL_ECHOPAIR("HV...:", hardware_version);//liu + (void)settings.fixed_parameter_save(); + SERIAL_ECHOLNPGM("HV_set_ok"); } - - #if ENABLED(SWITCHING_EXTRUDER) #if EXTRUDERS > 3 #define REQ_ANGLES 4 @@ -12467,7 +12465,8 @@ void process_parsed_command() { case 999: // M999: Restart after being Stopped gcode_M999(); break; - case 2000: // + + case 2000: // gcode_M2000(); break; case 2009: // @@ -14414,7 +14413,7 @@ void setup() { // Load data from EEPROM if available (or use defaults) // This also updates variables in the planner, elsewhere (void)settings.load(); - (void)settings.Fixed_parameter_load(); + (void)settings.fixed_parameter_load(); #if HAS_M206_COMMAND @@ -14720,12 +14719,11 @@ void loop() { // SERIAL_ECHOLN(tmp_y); // enqueue_and_echo_command(tmp_y); /////// - if(current_position[Z_AXIS]>=5) - { - sprintf_P(tmp_y, PSTR("G28 X")); - //SERIAL_ECHOLN(tmp_y); - enqueue_and_echo_command(tmp_y); - } + if (current_position[Z_AXIS] >= 5) { + sprintf_P(tmp_y, PSTR("G28 X")); + //SERIAL_ECHOLN(tmp_y); + enqueue_and_echo_command(tmp_y); + } powerloss.recovery = Rec_Idle; } endstops.report_state(); diff --git a/A20_Marlin-1.1.x12864_3DTouch/Marlin/configuration_store.cpp b/A20_Marlin-1.1.x12864_3DTouch/Marlin/configuration_store.cpp index 6712ecde..29caea5c 100644 --- a/A20_Marlin-1.1.x12864_3DTouch/Marlin/configuration_store.cpp +++ b/A20_Marlin-1.1.x12864_3DTouch/Marlin/configuration_store.cpp @@ -793,8 +793,6 @@ float hardware_version=0.1; // Filament Runout Sensors EEPROM_READ(filament_runout_enabled); - if(filament_runout_enabled != false) - filament_runout_enabled = true; if (working_crc == stored_crc) { #if ENABLED(EEPROM_CHITCHAT) @@ -811,53 +809,51 @@ float hardware_version=0.1; } } + bool MarlinSettings::fixed_parameter_save() {//liu + uint16_t working_crc = 0; + EEPROM_START(); + eeprom_index = EEPROM_OFFSET_SN_VER; - bool MarlinSettings::Fixed_parameter_save() {//liu + EEPROM_SKIP(working_crc); // Skip the checksum slot + working_crc = 0; + EEPROM_WRITE(hardware_version);//liu - uint16_t working_crc = 0; - EEPROM_START(); - eeprom_index = EEPROM_OFFSET_SN_VER; + const uint16_t final_crc = working_crc; + const int eeprom_size = eeprom_index; + eeprom_index = EEPROM_OFFSET_SN_VER; + EEPROM_WRITE(final_crc); - EEPROM_SKIP(working_crc); // Skip the checksum slot - working_crc = 0; - EEPROM_WRITE(hardware_version);//liu hw ver + #if ENABLED(EEPROM_CHITCHAT) + SERIAL_ECHO_START(); + SERIAL_ECHOPAIR("Fixed parameter (", eeprom_size - EEPROM_OFFSET_SN_VER); + SERIAL_ECHOPAIR(" bytes; crc ", (uint32_t)final_crc); + SERIAL_ECHOLNPGM(")"); + #endif + } - const uint16_t final_crc = working_crc; - const int eeprom_size = eeprom_index; - eeprom_index = EEPROM_OFFSET_SN_VER; - EEPROM_WRITE(final_crc); + bool MarlinSettings::fixed_parameter_load() { + uint16_t working_crc = 0, stored_crc; + EEPROM_START(); + eeprom_index = EEPROM_OFFSET_SN_VER; + EEPROM_READ(stored_crc); + working_crc = 0; - SERIAL_ECHO_START(); - SERIAL_ECHOPAIR("Fixed parameter (", eeprom_size - EEPROM_OFFSET_SN_VER); - SERIAL_ECHOPAIR("Fixed parameter bytes; crc ", (uint32_t)final_crc); - SERIAL_ECHOLNPGM(")"); + EEPROM_READ(hardware_version);//liu + NOLESS(hardware_version, 0.1); + SERIAL_ECHOLNPAIR("Hardware version:", hardware_version);//liu - } - bool MarlinSettings::Fixed_parameter_load(){ - uint16_t working_crc = 0; - uint16_t stored_crc; - EEPROM_START(); - eeprom_index = EEPROM_OFFSET_SN_VER; - EEPROM_READ(stored_crc); - working_crc=0; - EEPROM_READ(hardware_version);//liu hhardware_version - if(hardware_version< 0.1) - { - hardware_version = 0.1; - } - SERIAL_ECHOPAIR(" hardware version:", hardware_version);//liu - if (working_crc == stored_crc) { -#if ENABLED(EEPROM_CHITCHAT) - SERIAL_ECHO_START(); - SERIAL_ECHOPAIR("Fixed parameter (", eeprom_index - EEPROM_OFFSET_SN_VER); - SERIAL_ECHOPAIR(" bytes; crc ", (uint32_t)working_crc); - SERIAL_ECHOLNPGM(")"); -#endif - } - else{ - SERIAL_ECHOPAIR(" \r\nFixed parameter bytes; crc error ", (uint32_t)working_crc); - SERIAL_ECHOPAIR(" \r\Fixed parameter nbytes; crc error ", (uint32_t)stored_crc); - } + if (working_crc == stored_crc) { + #if ENABLED(EEPROM_CHITCHAT) + SERIAL_ECHO_START(); + SERIAL_ECHOPAIR("Fixed parameter (", eeprom_index - EEPROM_OFFSET_SN_VER); + SERIAL_ECHOPAIR(" bytes; crc ", (uint32_t)working_crc); + SERIAL_ECHOLNPGM(")"); + #endif + } + else { + SERIAL_ECHOPAIR("Fixed parameter crc error: ", (uint32_t)working_crc); + SERIAL_ECHOLNPAIR(" != ", (uint32_t)stored_crc); + } } /** diff --git a/A20_Marlin-1.1.x12864_3DTouch/Marlin/configuration_store.h b/A20_Marlin-1.1.x12864_3DTouch/Marlin/configuration_store.h index aee4d707..399fedfe 100644 --- a/A20_Marlin-1.1.x12864_3DTouch/Marlin/configuration_store.h +++ b/A20_Marlin-1.1.x12864_3DTouch/Marlin/configuration_store.h @@ -32,10 +32,12 @@ class MarlinSettings { static bool poweroff_save(); static bool poweroff_load(); - static void reset(); - static bool save(); - static bool Fixed_parameter_save() ; - static bool Fixed_parameter_load() ; + + static void reset(); + static bool save(); + static bool fixed_parameter_save(); + static bool fixed_parameter_load(); + #if ENABLED(EEPROM_SETTINGS) static bool load(); diff --git a/A20_Marlin-1.1.x12864_3DTouch/Marlin/ultralcd.cpp b/A20_Marlin-1.1.x12864_3DTouch/Marlin/ultralcd.cpp index 374f5458..09bf13de 100644 --- a/A20_Marlin-1.1.x12864_3DTouch/Marlin/ultralcd.cpp +++ b/A20_Marlin-1.1.x12864_3DTouch/Marlin/ultralcd.cpp @@ -3951,9 +3951,9 @@ void kill_screen(const char* lcd_msg) { START_SCREEN(); STATIC_ITEM(BOARD_NAME, true, true); // MyPrinterController STATIC_ITEM(MSG_INFO_BAUDRATE ": " STRINGIFY(BAUDRATE), true); // Baud: 250000 - // SERIAL_ECHOPAIR("hardware version:", hardware_version); //liu.. - //STATIC_ITEM(MSG_FW_VER, false, true); - STATIC_ITEM("" MSG_FW_VER, true); + //SERIAL_ECHOPAIR("hardware version:", hardware_version); //liu.. + //STATIC_ITEM(MSG_FW_VER, false, true); + STATIC_ITEM("" MSG_FW_VER, true); STATIC_ITEM(" " MSG_HW_VER,false, false, ftostr12ns(hardware_version));//MSG_HW_VER liu STATIC_ITEM(MSG_INFO_PROTOCOL ": " PROTOCOL_VERSION, true); // Protocol: 1.0 #if POWER_SUPPLY == 0