From 0f9aa00eaf37a05c4ee8ff5639a29e7315892c04 Mon Sep 17 00:00:00 2001 From: 3d-gussner <3d.gussner@gmail.com> Date: Mon, 30 Mar 2020 10:36:13 +0200 Subject: [PATCH 1/4] Typo in some hex default values --- Firmware/eeprom.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Firmware/eeprom.h b/Firmware/eeprom.h index 17fcf089..c1eb662e 100644 --- a/Firmware/eeprom.h +++ b/Firmware/eeprom.h @@ -225,10 +225,10 @@ static_assert(sizeof(Sheets) == EEPROM_SHEETS_SIZEOF, "Sizeof(Sheets) is not EEP | ^ | ^ | ^ | fa 00h 250 | ^ | PRINTER_MK2.5 | ??? | ^ | ^ | ^ | ^ | 1a 4fh 20250 | ^ | PRINTER_MK2.5 with MMU2 | ??? | ^ | ^ | ^ | ^ | fc 00h 252 | ^ | PRINTER_MK2.5S | ??? | ^ -| ^ | ^ | ^ | 1c 4fh 20250 | ^ | PRINTER_MK2.5S with MMU2S | ??? | ^ -| ^ | ^ | ^ | 0c 12h 300 | ^ | PRINTER_MK3 | ??? | ^ +| ^ | ^ | ^ | 1c 4fh 20252 | ^ | PRINTER_MK2.5S with MMU2S | ??? | ^ +| ^ | ^ | ^ | 2c 01h 300 | ^ | PRINTER_MK3 | ??? | ^ | ^ | ^ | ^ | 4c 4fh 20300 | ^ | PRINTER_MK3 with MMU2 | ??? | ^ -| ^ | ^ | ^ | 0e 12h 302 | ^ | PRINTER_MK3S | ??? | ^ +| ^ | ^ | ^ | 2e 01h 302 | ^ | PRINTER_MK3S | ??? | ^ | ^ | ^ | ^ | 4e 4fh 20302 | ^ | PRINTER_MK3S with MMU2S | ??? | ^ | 0x0EEC 3820 | uint16 | EEPROM_BOARD_TYPE | ??? | ff ffh 65535 | Board Type | ??? | D3 Ax0eec C2 | ^ | ^ | ^ | c8 00h 200 | ^ | BOARD_RAMBO_MINI_1_0 | ??? | ^ @@ -355,7 +355,7 @@ static_assert(sizeof(Sheets) == EEPROM_SHEETS_SIZEOF, "Sizeof(Sheets) is not EEP | 0x0D32 3378 | uint8 | EEPROM_BACKLIGHT_MODE | 02h 2 | ffh 255 | LCD backlight mode: __Auto__ | LCD menu | D3 Ax0d32 C1 | ^ | ^ | ^ | 01h 1 | ^ | LCD backlight mode: __Bright__ | ^ | ^ | ^ | ^ | ^ | 00h 0 | ^ | LCD backlight mode: __Dim__ | ^ | ^ -| 0x0D30 3376 | uint16 | EEPROM_BACKLIGHT_TIMEOUT | 01 00 - ff ff | ff ffh 65535 | LCD backlight timeout: __10__ seconds | LCD menu | D3 Ax0d30 C2 +| 0x0D30 3376 | uint16 | EEPROM_BACKLIGHT_TIMEOUT | 00 00 - ff ff | 0a 00h 65535 | LCD backlight timeout: __10__ seconds | LCD menu | D3 Ax0d30 C2 | 0x0D2C 3372 | float | EEPROM_UVLO_LA_K | ??? | ff ff ff ffh | Power panic saved Linear Advanced K value | ??? | D3 Ax0d2c C4 From 988ba6d8b080b9dea1892c5e8b612f037cceb368 Mon Sep 17 00:00:00 2001 From: Alex Voinea Date: Mon, 30 Mar 2020 15:37:05 +0300 Subject: [PATCH 2/4] Fix DEBUG_BUILD --- Firmware/Dcodes.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Firmware/Dcodes.cpp b/Firmware/Dcodes.cpp index 79695c9e..cda53171 100644 --- a/Firmware/Dcodes.cpp +++ b/Firmware/Dcodes.cpp @@ -1,5 +1,6 @@ #include "Dcodes.h" //#include "Marlin.h" +#include "configuration.h" #include "language.h" #include "cmdqueue.h" #include @@ -185,7 +186,6 @@ void dcode_3() #define BOOT_APP_FLG_COPY 0x02 #define BOOT_APP_FLG_FLASH 0x04 -extern uint8_t fsensor_log; extern float current_temperature_pinda; extern float axis_steps_per_unit[NUM_AXIS]; @@ -194,6 +194,8 @@ extern float axis_steps_per_unit[NUM_AXIS]; #endif //0 #define LOG(args...) +extern uint8_t fsensor_log; + /*! * ### D-1 - Endless Loop D-1: Endless Loop From 104f81cd27feae620055a19f0f5a2f9ec8c9e8e2 Mon Sep 17 00:00:00 2001 From: Alex Voinea Date: Mon, 30 Mar 2020 15:42:30 +0300 Subject: [PATCH 3/4] Fix case sensitive include --- Firmware/Dcodes.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Firmware/Dcodes.cpp b/Firmware/Dcodes.cpp index cda53171..8a7e63e5 100644 --- a/Firmware/Dcodes.cpp +++ b/Firmware/Dcodes.cpp @@ -1,6 +1,6 @@ #include "Dcodes.h" //#include "Marlin.h" -#include "configuration.h" +#include "Configuration.h" #include "language.h" #include "cmdqueue.h" #include From f13269d8a9f9ac9eb4c4078e37f57f3eea86d838 Mon Sep 17 00:00:00 2001 From: Alex Voinea Date: Mon, 30 Mar 2020 16:50:50 +0300 Subject: [PATCH 4/4] Code cleanup --- Firmware/Dcodes.cpp | 4 ++-- Firmware/fsensor.cpp | 2 ++ Firmware/fsensor.h | 3 +++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Firmware/Dcodes.cpp b/Firmware/Dcodes.cpp index 8a7e63e5..67cf1eb8 100644 --- a/Firmware/Dcodes.cpp +++ b/Firmware/Dcodes.cpp @@ -194,8 +194,6 @@ extern float axis_steps_per_unit[NUM_AXIS]; #endif //0 #define LOG(args...) -extern uint8_t fsensor_log; - /*! * ### D-1 - Endless Loop D-1: Endless Loop @@ -845,11 +843,13 @@ void dcode_9125() pat9125_y = (int)code_value(); LOG("pat9125_y=%d\n", pat9125_y); } +#ifdef DEBUG_FSENSOR_LOG if (code_seen('L')) { fsensor_log = (int)code_value(); LOG("fsensor_log=%d\n", fsensor_log); } +#endif //DEBUG_FSENSOR_LOG } #endif //PAT9125 diff --git a/Firmware/fsensor.cpp b/Firmware/fsensor.cpp index cfb378ed..219ab4f8 100755 --- a/Firmware/fsensor.cpp +++ b/Firmware/fsensor.cpp @@ -69,8 +69,10 @@ unsigned long fsensor_softfail_last = 0; uint8_t fsensor_softfail_ccnt = 0; #endif +#ifdef DEBUG_FSENSOR_LOG //! log flag: 0=log disabled, 1=log enabled uint8_t fsensor_log = 1; +#endif //DEBUG_FSENSOR_LOG //! @name filament autoload variables diff --git a/Firmware/fsensor.h b/Firmware/fsensor.h index 19f96812..4949381b 100755 --- a/Firmware/fsensor.h +++ b/Firmware/fsensor.h @@ -72,6 +72,9 @@ extern bool fsensor_oq_result(void); //! @{ extern void fsensor_st_block_chunk(int cnt); +// debugging +extern uint8_t fsensor_log; + // There's really nothing to do in block_begin: the stepper ISR likely has // called us already at the end of the last block, making this integration // redundant. LA1.5 might not always do that during a coasting move, so attempt