diff --git a/Marlin/Version.h b/Marlin/Version.h index 2f65028f6f..82c3880a6a 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -28,7 +28,7 @@ /** * Marlin release version identifier */ -#define SHORT_BUILD_VERSION "2.0.9_DW7.4.1" +#define SHORT_BUILD_VERSION "2.0.9_DW7.4.2" /** * Verbose version identifier which should contain a reference to the location diff --git a/Marlin/src/lcd/extui/Creality/Creality_DWIN.cpp b/Marlin/src/lcd/extui/Creality/Creality_DWIN.cpp index 08975bc551..31e7e2115a 100644 --- a/Marlin/src/lcd/extui/Creality/Creality_DWIN.cpp +++ b/Marlin/src/lcd/extui/Creality/Creality_DWIN.cpp @@ -1181,7 +1181,7 @@ void RTSSHOW::RTS_HandleData() break; case ReturnBack: - SERIAL_ECHOPAIR("Return : ", recdat.data[0]); + SERIAL_ECHOPGM("Return : ", recdat.data[0]); if (recdat.data[0] == 1) // return to the tool page { InforShowStatus = false; diff --git a/Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp index 16576f7039..0d30a85b23 100644 --- a/Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp @@ -508,9 +508,9 @@ void DGUSScreenHandler::HandleStepPerMMChanged(DGUS_VP_Variable &var, void *val_ case VP_Z_STEP_PER_MM: axis = ExtUI::axis_t::Z; break; default: return; } - DEBUG_ECHOLNPAIR_F("value:", value); + DEBUG_ECHOLNPGM("value:", value); ExtUI::setAxisSteps_per_mm(value, axis); - DEBUG_ECHOLNPAIR_F("value_set:", ExtUI::getAxisSteps_per_mm(axis)); + DEBUG_ECHOLNPGM("value_set:", ExtUI::getAxisSteps_per_mm(axis)); skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel return; } @@ -531,9 +531,9 @@ void DGUSScreenHandler::HandleStepPerMMExtruderChanged(DGUS_VP_Variable &var, vo #endif #endif } - DEBUG_ECHOLNPAIR_F("value:", value); + DEBUG_ECHOLNPGM("value:", value); ExtUI::setAxisSteps_per_mm(value, extruder); - DEBUG_ECHOLNPAIR_F("value_set:", ExtUI::getAxisSteps_per_mm(extruder)); + DEBUG_ECHOLNPGM("value_set:", ExtUI::getAxisSteps_per_mm(extruder)); skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel } diff --git a/Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.cpp index 60a0f6c5bb..0a2c189f43 100644 --- a/Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.cpp @@ -268,7 +268,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { #endif } - DEBUG_ECHOLNPAIR_F("V3:", newvalue); + DEBUG_ECHOLNPGM("V3:", newvalue); *(float *)var.memadr = newvalue; skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel diff --git a/Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.h b/Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.h index ee0af013a8..6edd1fb297 100644 --- a/Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.h +++ b/Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.h @@ -200,7 +200,7 @@ public: static void DGUSLCD_SendFloatAsIntValueToDisplay(DGUS_VP_Variable &var) { if (var.memadr) { float f = *(float *)var.memadr; - DEBUG_ECHOLNPAIR_F(" >> ", f, 6); + DEBUG_ECHOLNPGM(" >> ", f, 6); f *= cpow(10, decimals); dgusdisplay.WriteVariable(var.VP, (int16_t)f); } diff --git a/Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.cpp index 83f7a39c28..3417f27315 100644 --- a/Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.cpp @@ -268,7 +268,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { #endif } - DEBUG_ECHOLNPAIR_F("V3:", newvalue); + DEBUG_ECHOLNPGM("V3:", newvalue); *(float *)var.memadr = newvalue; skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel diff --git a/Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.h b/Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.h index ee0af013a8..6edd1fb297 100644 --- a/Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.h +++ b/Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.h @@ -200,7 +200,7 @@ public: static void DGUSLCD_SendFloatAsIntValueToDisplay(DGUS_VP_Variable &var) { if (var.memadr) { float f = *(float *)var.memadr; - DEBUG_ECHOLNPAIR_F(" >> ", f, 6); + DEBUG_ECHOLNPGM(" >> ", f, 6); f *= cpow(10, decimals); dgusdisplay.WriteVariable(var.VP, (int16_t)f); } diff --git a/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp index e11fbd9cf7..86bcedd88f 100644 --- a/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp @@ -93,7 +93,7 @@ void DGUSScreenHandler::DGUSLCD_SendFanToDisplay(DGUS_VP_Variable &var) { void DGUSScreenHandler::DGUSLCD_SendBabyStepToDisplay_MKS(DGUS_VP_Variable &var) { float value = current_position.z; - DEBUG_ECHOLNPAIR_F(" >> ", value, 6); + DEBUG_ECHOLNPGM(" >> ", value, 6); value *= cpow(10, 2); dgusdisplay.WriteVariable(VP_SD_Print_Baby, (uint16_t)value); } @@ -400,7 +400,7 @@ void DGUSScreenHandler::GetOffsetValue(DGUS_VP_Variable &var, void *val_ptr) { #if HAS_BED_PROBE int32_t value = swap32(*(int32_t *)val_ptr); float Offset = value / 100.0f; - DEBUG_ECHOLNPAIR_F("\nget int6 offset >> ", value, 6); + DEBUG_ECHOLNPGM("\nget int6 offset >> ", value, 6); #endif switch (var.VP) { @@ -910,7 +910,7 @@ void DGUSScreenHandler::HandleChangeLevelPoint_MKS(DGUS_VP_Variable &var, void * DEBUG_ECHOLNPGM("HandleChangeLevelPoint_MKS"); const int16_t value_raw = swap16(*(int16_t*)val_ptr); - DEBUG_ECHOLNPAIR_F("value_raw:", value_raw); + DEBUG_ECHOLNPGM("value_raw:", value_raw); *(int16_t*)var.memadr = value_raw; @@ -925,7 +925,7 @@ void DGUSScreenHandler::HandleStepPerMMChanged_MKS(DGUS_VP_Variable &var, void * const float value = (float)value_raw; DEBUG_ECHOLNPGM("value_raw:", value_raw); - DEBUG_ECHOLNPAIR_F("value:", value); + DEBUG_ECHOLNPGM("value:", value); ExtUI::axis_t axis; switch (var.VP) { @@ -935,7 +935,7 @@ void DGUSScreenHandler::HandleStepPerMMChanged_MKS(DGUS_VP_Variable &var, void * case VP_Z_STEP_PER_MM: axis = ExtUI::axis_t::Z; break; } ExtUI::setAxisSteps_per_mm(value, axis); - DEBUG_ECHOLNPAIR_F("value_set:", ExtUI::getAxisSteps_per_mm(axis)); + DEBUG_ECHOLNPGM("value_set:", ExtUI::getAxisSteps_per_mm(axis)); settings.save(); skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel } @@ -947,7 +947,7 @@ void DGUSScreenHandler::HandleStepPerMMExtruderChanged_MKS(DGUS_VP_Variable &var const float value = (float)value_raw; DEBUG_ECHOLNPGM("value_raw:", value_raw); - DEBUG_ECHOLNPAIR_F("value:", value); + DEBUG_ECHOLNPGM("value:", value); ExtUI::extruder_t extruder; switch (var.VP) { @@ -960,7 +960,7 @@ void DGUSScreenHandler::HandleStepPerMMExtruderChanged_MKS(DGUS_VP_Variable &var #endif } ExtUI::setAxisSteps_per_mm(value, extruder); - DEBUG_ECHOLNPAIR_F("value_set:", ExtUI::getAxisSteps_per_mm(extruder)); + DEBUG_ECHOLNPGM("value_set:", ExtUI::getAxisSteps_per_mm(extruder)); settings.save(); skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel } @@ -972,7 +972,7 @@ void DGUSScreenHandler::HandleMaxSpeedChange_MKS(DGUS_VP_Variable &var, void *va const float value = (float)value_raw; DEBUG_ECHOLNPGM("value_raw:", value_raw); - DEBUG_ECHOLNPAIR_F("value:", value); + DEBUG_ECHOLNPGM("value:", value); ExtUI::axis_t axis; switch (var.VP) { @@ -982,7 +982,7 @@ void DGUSScreenHandler::HandleMaxSpeedChange_MKS(DGUS_VP_Variable &var, void *va default: return; } ExtUI::setAxisMaxFeedrate_mm_s(value, axis); - DEBUG_ECHOLNPAIR_F("value_set:", ExtUI::getAxisMaxFeedrate_mm_s(axis)); + DEBUG_ECHOLNPGM("value_set:", ExtUI::getAxisMaxFeedrate_mm_s(axis)); settings.save(); skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel } @@ -994,7 +994,7 @@ void DGUSScreenHandler::HandleExtruderMaxSpeedChange_MKS(DGUS_VP_Variable &var, const float value = (float)value_raw; DEBUG_ECHOLNPGM("value_raw:", value_raw); - DEBUG_ECHOLNPAIR_F("value:", value); + DEBUG_ECHOLNPGM("value:", value); ExtUI::extruder_t extruder; switch (var.VP) { @@ -1007,7 +1007,7 @@ void DGUSScreenHandler::HandleExtruderMaxSpeedChange_MKS(DGUS_VP_Variable &var, case VP_E1_MAX_SPEED: extruder = ExtUI::extruder_t::E1; break; } ExtUI::setAxisMaxFeedrate_mm_s(value, extruder); - DEBUG_ECHOLNPAIR_F("value_set:", ExtUI::getAxisMaxFeedrate_mm_s(extruder)); + DEBUG_ECHOLNPGM("value_set:", ExtUI::getAxisMaxFeedrate_mm_s(extruder)); settings.save(); skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel } @@ -1019,7 +1019,7 @@ void DGUSScreenHandler::HandleMaxAccChange_MKS(DGUS_VP_Variable &var, void *val_ const float value = (float)value_raw; DEBUG_ECHOLNPGM("value_raw:", value_raw); - DEBUG_ECHOLNPAIR_F("value:", value); + DEBUG_ECHOLNPGM("value:", value); ExtUI::axis_t axis; switch (var.VP) { @@ -1029,7 +1029,7 @@ void DGUSScreenHandler::HandleMaxAccChange_MKS(DGUS_VP_Variable &var, void *val_ case VP_Z_ACC_MAX_SPEED: axis = ExtUI::axis_t::Z; break; } ExtUI::setAxisMaxAcceleration_mm_s2(value, axis); - DEBUG_ECHOLNPAIR_F("value_set:", ExtUI::getAxisMaxAcceleration_mm_s2(axis)); + DEBUG_ECHOLNPGM("value_set:", ExtUI::getAxisMaxAcceleration_mm_s2(axis)); settings.save(); skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel } @@ -1050,9 +1050,9 @@ void DGUSScreenHandler::HandleExtruderAccChange_MKS(DGUS_VP_Variable &var, void case VP_E1_ACC_MAX_SPEED: extruder = ExtUI::extruder_t::E1; settings.load(); break; #endif } - DEBUG_ECHOLNPAIR_F("value:", value); + DEBUG_ECHOLNPGM("value:", value); ExtUI::setAxisMaxAcceleration_mm_s2(value, extruder); - DEBUG_ECHOLNPAIR_F("value_set:", ExtUI::getAxisMaxAcceleration_mm_s2(extruder)); + DEBUG_ECHOLNPGM("value_set:", ExtUI::getAxisMaxAcceleration_mm_s2(extruder)); settings.save(); skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel } @@ -1116,7 +1116,7 @@ void DGUSScreenHandler::HandleAccChange_MKS(DGUS_VP_Variable &var, void *val_ptr #endif } - DEBUG_ECHOLNPAIR_F("V3:", newvalue); + DEBUG_ECHOLNPGM("V3:", newvalue); *(float *)var.memadr = newvalue; settings.save(); @@ -1176,7 +1176,7 @@ void DGUSScreenHandler::GetManualFilament(DGUS_VP_Variable &var, void *val_ptr) float value = (float)value_len; - DEBUG_ECHOLNPAIR_F("Get Filament len value:", value); + DEBUG_ECHOLNPGM("Get Filament len value:", value); distanceFilament = value; skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel @@ -1187,7 +1187,7 @@ void DGUSScreenHandler::GetManualFilamentSpeed(DGUS_VP_Variable &var, void *val_ uint16_t value_len = swap16(*(uint16_t*)val_ptr); - DEBUG_ECHOLNPAIR_F("filamentSpeed_mm_s value:", value_len); + DEBUG_ECHOLNPGM("filamentSpeed_mm_s value:", value_len); filamentSpeed_mm_s = value_len; diff --git a/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.h b/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.h index 8d5d9066f4..6929b4ae36 100644 --- a/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.h +++ b/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.h @@ -267,7 +267,7 @@ public: static void DGUSLCD_SendFloatAsIntValueToDisplay(DGUS_VP_Variable &var) { if (var.memadr) { float f = *(float *)var.memadr; - DEBUG_ECHOLNPAIR_F(" >> ", f, 6); + DEBUG_ECHOLNPGM(" >> ", f, 6); f *= cpow(10, decimals); dgusdisplay.WriteVariable(var.VP, (int16_t)f); } diff --git a/Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.cpp index db467d7b34..9002527168 100644 --- a/Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.cpp @@ -268,7 +268,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { #endif } - DEBUG_ECHOLNPAIR_F("V3:", newvalue); + DEBUG_ECHOLNPGM("V3:", newvalue); *(float *)var.memadr = newvalue; skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel diff --git a/Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.h b/Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.h index ee0af013a8..6edd1fb297 100644 --- a/Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.h +++ b/Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.h @@ -200,7 +200,7 @@ public: static void DGUSLCD_SendFloatAsIntValueToDisplay(DGUS_VP_Variable &var) { if (var.memadr) { float f = *(float *)var.memadr; - DEBUG_ECHOLNPAIR_F(" >> ", f, 6); + DEBUG_ECHOLNPGM(" >> ", f, 6); f *= cpow(10, decimals); dgusdisplay.WriteVariable(var.VP, (int16_t)f); } diff --git a/Marlin/src/lcd/extui/dgus_creality/DGUSDisplay.cpp b/Marlin/src/lcd/extui/dgus_creality/DGUSDisplay.cpp index c12925feab..57a9f84a37 100644 --- a/Marlin/src/lcd/extui/dgus_creality/DGUSDisplay.cpp +++ b/Marlin/src/lcd/extui/dgus_creality/DGUSDisplay.cpp @@ -26,6 +26,8 @@ #if ENABLED(DGUS_LCD_UI_CREALITY_TOUCH) +#define DEBUG_ECHOLNPAIR DEBUG_ECHOLNPGM + #if HOTENDS > 2 #error "More than 2 hotends not implemented on the Display UI design." #endif @@ -312,7 +314,7 @@ void DGUSDisplay::SetTouchScreenConfiguration(bool enable_standby, bool enable_s if (enable_sound) cfg_bits |= 1UL << 3; // 3: audio if (enable_standby) cfg_bits |= 1UL << 2; // 2: backlight on standby cfg_bits |= 1UL << 1; // 1 & 0: 270 degrees orientation of display - cfg_bits |= 1UL << 0; + cfg_bits |= 1UL << 0; DEBUG_ECHOLNPAIR("Update touch screen config - standby ", enable_standby); DEBUG_ECHOLNPAIR("Update touch screen config - sound ", enable_sound); @@ -321,10 +323,10 @@ void DGUSDisplay::SetTouchScreenConfiguration(bool enable_standby, bool enable_s WriteVariable(0x80 /*System_Config*/, config_set, sizeof(config_set)); // Standby brightness (LED_Config) - uint16_t dwinStandbyTimeSeconds = 100 * standbyTimeSeconds; /* milliseconds, but divided by 10 (not 5 like the docs say) */ - const unsigned char brightness_set[] = { - brightness /*% active*/, - standby_brightness /*% standby*/, + uint16_t dwinStandbyTimeSeconds = 100 * standbyTimeSeconds; /* milliseconds, but divided by 10 (not 5 like the docs say) */ + const unsigned char brightness_set[] = { + brightness /*% active*/, + standby_brightness /*% standby*/, static_cast(dwinStandbyTimeSeconds >> 8), static_cast(dwinStandbyTimeSeconds) }; diff --git a/Marlin/src/lcd/extui/dgus_creality/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus_creality/DGUSScreenHandler.cpp index c897941871..d5fe384ca8 100644 --- a/Marlin/src/lcd/extui/dgus_creality/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus_creality/DGUSScreenHandler.cpp @@ -22,7 +22,8 @@ #include "../../../inc/MarlinConfigPre.h" -#define DEBUG_ECHOLNPAIR DEBUG_ECHOLNPAIR +#define DEBUG_ECHOLNPAIR DEBUG_ECHOLNPGM +#define DEBUG_ECHOPAIR DEBUG_ECHOPGM #if ENABLED(DGUS_LCD_UI_CREALITY_TOUCH) @@ -519,8 +520,8 @@ void DGUSScreenHandler::DGUSLCD_SendScrollingStringToDisplayPGM(DGUS_VP_Variable #if HAS_FAN void DGUSScreenHandler::DGUSLCD_SendFanStatusToDisplay(DGUS_VP_Variable &var) { if (var.memadr) { - DEBUG_ECHOPAIR(" DGUSLCD_SendFanStatusToDisplay ", var.VP); - DEBUG_ECHOLNPAIR(" data ", *(uint8_t *)var.memadr); + DEBUG_ECHOPGM(" DGUSLCD_SendFanStatusToDisplay ", var.VP); + DEBUG_ECHOLNPGM(" data ", *(uint8_t *)var.memadr); uint16_t data_to_send = ICON_TOGGLE_OFF; if (*(uint8_t *) var.memadr) data_to_send = ICON_TOGGLE_ON; dgusdisplay.WriteVariable(var.VP, data_to_send); @@ -538,7 +539,7 @@ void DGUSScreenHandler::DGUSLCD_SendScrollingStringToDisplayPGM(DGUS_VP_Variable // Send heater status value to the display. void DGUSScreenHandler::DGUSLCD_SendHeaterStatusToDisplay(DGUS_VP_Variable &var) { if (var.memadr) { - DEBUG_ECHOPAIR(" DGUSLCD_SendHeaterStatusToDisplay ", var.VP); + DEBUG_ECHOPGM(" DGUSLCD_SendHeaterStatusToDisplay ", var.VP); DEBUG_ECHOLNPAIR(" data ", *(int16_t *)var.memadr); uint16_t data_to_send = 0; if (*(int16_t *) var.memadr) data_to_send = 1; @@ -596,7 +597,7 @@ void DGUSScreenHandler::DGUSLCD_SendHeaterStatusToDisplay(DGUS_VP_Variable &var) const int16_t scroll = (int16_t)swap16(*(uint16_t*)val_ptr); if (scroll) { top_file += scroll; - DEBUG_ECHOPAIR("new topfile calculated:", top_file); + DEBUG_ECHOPGM("new topfile calculated:", top_file); if (top_file < 0) { top_file = 0; DEBUG_ECHOLNPGM("Top of filelist reached"); @@ -606,7 +607,7 @@ void DGUSScreenHandler::DGUSLCD_SendHeaterStatusToDisplay(DGUS_VP_Variable &var) NOLESS(max_top, 0); NOMORE(top_file, max_top); } - DEBUG_ECHOPAIR("new topfile adjusted:", top_file); + DEBUG_ECHOPGM("new topfile adjusted:", top_file); } else { if (!filelist.isAtRootDir()) { @@ -782,10 +783,10 @@ void DGUSScreenHandler::OnMeshLevelingStart() { } void DGUSScreenHandler::OnMeshLevelingUpdate(const int8_t x, const int8_t y, const float z) { - SERIAL_ECHOPAIR("X: ", x); - SERIAL_ECHOPAIR("; Y: ", y); - SERIAL_ECHOPAIR("; Index ", MeshLevelIndex); - SERIAL_ECHOLNPAIR("; Icon ", MeshLevelIconIndex); + SERIAL_ECHOPGM("X: ", x); + SERIAL_ECHOPGM("; Y: ", y); + SERIAL_ECHOPGM("; Index ", MeshLevelIndex); + SERIAL_ECHOLNPGM("; Icon ", MeshLevelIconIndex); UpdateMeshValue(x, y, z); @@ -927,12 +928,12 @@ uint16_t CreateRgb(double h, double s, double v) { return (((static_cast(out.r * 255) & 0xf8)<<8) + ((static_cast(out.g * 255) & 0xfc)<<3) + (static_cast(out.b * 255)>>3)); } - -void DGUSScreenHandler::UpdateMeshValue(const int8_t x, const int8_t y, const float z) { - SERIAL_ECHOPAIR("X", x); - SERIAL_ECHOPAIR(" Y", y); - SERIAL_ECHO(" Z"); - SERIAL_ECHO_F(z, 4); +#if HAS_BED_PROBE + void DGUSScreenHandler::UpdateMeshValue(const int8_t x, const int8_t y, const float z) { + SERIAL_ECHOPGM("X", x); + SERIAL_ECHOPGM(" Y", y); + SERIAL_ECHO(" Z"); + SERIAL_ECHO_F(z, 4); // Determine the screen X and Y value if (x % SkipMeshPoint != 0 || y % SkipMeshPoint != 0) { @@ -1003,15 +1004,15 @@ void DGUSScreenHandler::HandleMeshPoint(DGUS_VP_Variable &var, void *val_ptr) { int16_t rawZ = *(int16_t*)val_ptr; float z = swap16(rawZ) * 0.001; + SERIAL_ECHOPGM("Overriding mesh value. X:", x); + SERIAL_ECHOPGM(" Y:", y); + SERIAL_ECHO(" Z:"); + SERIAL_ECHO_F(z, 4); + SERIAL_ECHOPGM(" [raw: ", rawZ); + SERIAL_ECHOPGM("] [point ", probe_point, "] "); + SERIAL_ECHOPGM(" [VP: ", var.VP); + SERIAL_ECHOLN("]"); - SERIAL_ECHOPAIR("Overriding mesh value. X:", x); - SERIAL_ECHOPAIR(" Y:", y); - SERIAL_ECHO(" Z:"); - SERIAL_ECHO_F(z, 4); - SERIAL_ECHOPAIR(" [raw: ", rawZ); - SERIAL_ECHOPAIR("] [point ", probe_point, "] "); - SERIAL_ECHOPAIR(" [VP: ", var.VP); - SERIAL_ECHOLN("]"); UpdateMeshValue(x, y, z); ExtUI::setMeshPoint({ x, y }, z); @@ -1019,6 +1020,8 @@ void DGUSScreenHandler::HandleMeshPoint(DGUS_VP_Variable &var, void *val_ptr) { RequestSaveSettings(); } +#endif + #if HAS_COLOR_LEDS void DGUSScreenHandler::HandleLED(DGUS_VP_Variable &var, void *val_ptr) { // The display returns a 16-bit integer @@ -1030,7 +1033,7 @@ void DGUSScreenHandler::HandleLED(DGUS_VP_Variable &var, void *val_ptr) { (*(uint8_t*)var.memadr) = static_cast(newValue); leds.set_color(leds.color); - SERIAL_ECHOLNPAIR("HandleLED ", newValue); + SERIAL_ECHOLNPGM("HandleLED ", newValue); RequestSaveSettings(); skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel @@ -1147,7 +1150,7 @@ void DGUSScreenHandler::HandleTemperatureChanged(DGUS_VP_Variable &var, void *va void DGUSScreenHandler::HandleFanSpeedChanged(DGUS_VP_Variable &var, void *val_ptr) { uint16_t newValue = swap16(*(uint16_t*)val_ptr); - SERIAL_ECHOLNPAIR("Fan speed changed: ", newValue); + SERIAL_ECHOLNPGM("Fan speed changed: ", newValue); ExtUI::setTargetFan_percent(newValue, ExtUI::fan_t::FAN0); ScreenHandler.skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel @@ -1157,7 +1160,7 @@ void DGUSScreenHandler::HandleFlowRateChanged(DGUS_VP_Variable &var, void *val_p #if EXTRUDERS uint16_t newValue = swap16(*(uint16_t*)val_ptr); - SERIAL_ECHOLNPAIR("Flow rate changed: ", newValue); + SERIAL_ECHOLNPGM("Flow rate changed: ", newValue); ExtUI::setFlow_percent(newValue, ExtUI::E0); ScreenHandler.skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel @@ -1226,8 +1229,8 @@ void DGUSScreenHandler::HandleScreenVersion(DGUS_VP_Variable &var, void *val_ptr uint16_t actualScreenVersion = swap16(*(uint16_t*)val_ptr); - SERIAL_ECHOLNPAIR("DWIN version received: ", actualScreenVersion); - SERIAL_ECHOLNPAIR("We expected DWIN version: ", EXPECTED_UI_VERSION_MAJOR); + SERIAL_ECHOLNPGM("DWIN version received: ", actualScreenVersion); + SERIAL_ECHOLNPGM("We expected DWIN version: ", EXPECTED_UI_VERSION_MAJOR); if (actualScreenVersion == EXPECTED_UI_VERSION_MAJOR) { SERIAL_ECHOLN("Screen version check passed."); @@ -1237,10 +1240,10 @@ void DGUSScreenHandler::HandleScreenVersion(DGUS_VP_Variable &var, void *val_ptr // Dump error to serial SERIAL_ECHOLN("WARNING: Your screen is not flashed correctly."); - SERIAL_ECHOPAIR("We received version ", actualScreenVersion); + SERIAL_ECHOPGM("We received version ", actualScreenVersion); SERIAL_ECHOLN("from the display"); - SERIAL_ECHOLNPAIR("This firmware needs screen version ", actualScreenVersion); + SERIAL_ECHOLNPGM("This firmware needs screen version ", actualScreenVersion); SERIAL_ECHOLN("Please follow the release notes for flashing instructions."); // Will cause flashing in the loop() @@ -1302,9 +1305,9 @@ void DGUSScreenHandler::HandleStepPerMMChanged(DGUS_VP_Variable &var, void *val_ case VP_Z_STEP_PER_MM: axis = ExtUI::axis_t::Z; break; default: return; } - DEBUG_ECHOLNPAIR_F("value:", value); + DEBUG_ECHOLNPAIR("value:", value); ExtUI::setAxisSteps_per_mm(value, axis); - DEBUG_ECHOLNPAIR_F("value_set:", ExtUI::getAxisSteps_per_mm(axis)); + DEBUG_ECHOLNPAIR("value_set:", ExtUI::getAxisSteps_per_mm(axis)); ScreenHandler.skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel return; } @@ -1325,9 +1328,9 @@ void DGUSScreenHandler::HandleStepPerMMExtruderChanged(DGUS_VP_Variable &var, vo case VP_E1_STEP_PER_MM: extruder = ExtUI::extruder_t::E1; break; #endif } - DEBUG_ECHOLNPAIR_F("value:", value); + DEBUG_ECHOLNPAIR("value:", value); ExtUI::setAxisSteps_per_mm(value,extruder); - DEBUG_ECHOLNPAIR_F("value_set:", ExtUI::getAxisSteps_per_mm(extruder)); + DEBUG_ECHOLNPAIR("value_set:", ExtUI::getAxisSteps_per_mm(extruder)); ScreenHandler.skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel return; } @@ -1359,7 +1362,7 @@ void DGUSScreenHandler::HandleStepPerMMExtruderChanged(DGUS_VP_Variable &var, vo #endif } - DEBUG_ECHOLNPAIR_F("V3:", newvalue); + DEBUG_ECHOLNPAIR("V3:", newvalue); *(float *)var.memadr = newvalue; ScreenHandler.skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel } @@ -1526,7 +1529,7 @@ void DGUSScreenHandler::HandleToggleProbePreheatTemp(DGUS_VP_Variable &var, void void DGUSScreenHandler::HandleTouchScreenBrightnessSetting(DGUS_VP_Variable &var, void *val_ptr) { uint16_t newvalue = swap16(*(uint16_t*)val_ptr); - SERIAL_ECHOLNPAIR("HandleTouchScreenBrightnessSetting: ", newvalue); + SERIAL_ECHOLNPGM("HandleTouchScreenBrightnessSetting: ", newvalue); Settings.screen_brightness = newvalue; ScreenHandler.SetTouchScreenConfiguration(); @@ -1537,7 +1540,7 @@ void DGUSScreenHandler::HandleTouchScreenBrightnessSetting(DGUS_VP_Variable &var void DGUSScreenHandler::HandleTouchScreenStandbyBrightnessSetting(DGUS_VP_Variable &var, void *val_ptr) { uint16_t newvalue = swap16(*(uint16_t*)val_ptr); - SERIAL_ECHOLNPAIR("HandleTouchScreenStandbyBrightnessSetting: ", newvalue); + SERIAL_ECHOLNPGM("HandleTouchScreenStandbyBrightnessSetting: ", newvalue); Settings.standby_screen_brightness = newvalue; ScreenHandler.SetTouchScreenConfiguration(); @@ -1548,7 +1551,7 @@ void DGUSScreenHandler::HandleTouchScreenStandbyBrightnessSetting(DGUS_VP_Variab void DGUSScreenHandler::HandleTouchScreenStandbyTimeSetting(DGUS_VP_Variable &var, void *val_ptr) { uint16_t newvalue = swap16(*(uint16_t*)val_ptr); - SERIAL_ECHOLNPAIR("HandleTouchScreenStandbyTimeSetting: ", newvalue); + SERIAL_ECHOLNPGM("HandleTouchScreenStandbyTimeSetting: ", newvalue); Settings.standby_time_seconds = newvalue; ScreenHandler.SetTouchScreenConfiguration(); @@ -1557,7 +1560,7 @@ void DGUSScreenHandler::HandleTouchScreenStandbyTimeSetting(DGUS_VP_Variable &va } void DGUSScreenHandler::HandleToggleTouchScreenStandbySetting(DGUS_VP_Variable &var, void *val_ptr) { - SERIAL_ECHOLNPAIR("HandleToggleTouchScreenStandbySetting"); + SERIAL_ECHOLNPGM("HandleToggleTouchScreenStandbySetting"); Settings.display_standby = !Settings.display_standby; ScreenHandler.SetTouchScreenConfiguration(); @@ -1573,10 +1576,10 @@ void DGUSScreenHandler::HandleFanToggle() { } void DGUSScreenHandler::UpdateNewScreen(DGUSLCD_Screens newscreen, bool save_current_screen) { - SERIAL_ECHOLNPAIR("SetNewScreen: ", newscreen); + SERIAL_ECHOLNPGM("SetNewScreen: ", newscreen); if (save_current_screen && current_screen != DGUSLCD_SCREEN_POPUP && current_screen != DGUSLCD_SCREEN_CONFIRM) { - SERIAL_ECHOLNPAIR("SetNewScreen (saving): ", newscreen); + SERIAL_ECHOLNPGM("SetNewScreen (saving): ", newscreen); memmove(&past_screens[1], &past_screens[0], sizeof(past_screens) - 1); past_screens[0] = current_screen; } @@ -1637,7 +1640,7 @@ void DGUSScreenHandler::UpdateScreenVPData() { bool sent_one = false; do { uint16_t VP = pgm_read_word(VPList); - DEBUG_ECHOPAIR(" VP: ", VP); + DEBUG_ECHOPGM(" VP: ", VP); if (!VP) { update_ptr = 0; DEBUG_ECHOLNPGM(" UpdateScreenVPData done"); @@ -1653,13 +1656,13 @@ void DGUSScreenHandler::UpdateScreenVPData() { // Send the VP to the display, but try to avoid overrunning the Tx Buffer. // But send at least one VP, to avoid getting stalled. if (rcpy.send_to_display_handler && (!sent_one || expected_tx <= dgusdisplay.GetFreeTxBuffer())) { - DEBUG_ECHOPAIR(" calling handler for ", rcpy.VP); + DEBUG_ECHOPGM(" calling handler for ", rcpy.VP); sent_one = true; rcpy.send_to_display_handler(rcpy); } else { auto x = dgusdisplay.GetFreeTxBuffer(); - DEBUG_ECHOLNPAIR(" tx almost full: ", x); + DEBUG_ECHOLNPGM(" tx almost full: ", x); UNUSED(x); //DEBUG_ECHOPAIR(" update_ptr ", update_ptr); ScreenComplete = false; diff --git a/Marlin/src/lcd/extui/dgus_creality/DGUSScreenHandler.h b/Marlin/src/lcd/extui/dgus_creality/DGUSScreenHandler.h index 7b8562b88d..cc1c8ddaaa 100644 --- a/Marlin/src/lcd/extui/dgus_creality/DGUSScreenHandler.h +++ b/Marlin/src/lcd/extui/dgus_creality/DGUSScreenHandler.h @@ -336,7 +336,7 @@ public: // Toggle a boolean at the specified memory address static void DGUSLCD_ToggleBoolean(DGUS_VP_Variable &var, void *val_ptr) { if (var.memadr) { - SERIAL_ECHOLNPAIR("Toggle boolean - ", var.VP); + SERIAL_ECHOLNPGM("Toggle boolean - ", var.VP); bool* val = (bool *)var.memadr; *val = !*val; diff --git a/Marlin/src/lcd/extui/dgus_creality/creality_touch/EstepsHandler.cpp b/Marlin/src/lcd/extui/dgus_creality/creality_touch/EstepsHandler.cpp index f5ce2628e2..fa3312dbe2 100644 --- a/Marlin/src/lcd/extui/dgus_creality/creality_touch/EstepsHandler.cpp +++ b/Marlin/src/lcd/extui/dgus_creality/creality_touch/EstepsHandler.cpp @@ -169,11 +169,11 @@ void EstepsHandler::HandleRemainingFilament(DGUS_VP_Variable &var, void *val_ptr } float current_steps = ExtUI::getAxisSteps_per_mm(ExtUI::E0); - SERIAL_ECHOLNPAIR("Current steps: ", current_steps); - SERIAL_ECHOLNPAIR("Actual extrusion: ", actualExtrusion); + SERIAL_ECHOLNPGM("Current steps: ", current_steps); + SERIAL_ECHOLNPGM("Actual extrusion: ", actualExtrusion); float new_steps = (current_steps * filament_to_extrude) / actualExtrusion; - SERIAL_ECHOLNPAIR("New steps: ", new_steps); + SERIAL_ECHOLNPGM("New steps: ", new_steps); calculated_esteps = new_steps; diff --git a/Marlin/src/lcd/extui/dgus_creality/creality_touch/FilamentLoadUnloadHandler.cpp b/Marlin/src/lcd/extui/dgus_creality/creality_touch/FilamentLoadUnloadHandler.cpp index 765428a37a..181d38ba81 100644 --- a/Marlin/src/lcd/extui/dgus_creality/creality_touch/FilamentLoadUnloadHandler.cpp +++ b/Marlin/src/lcd/extui/dgus_creality/creality_touch/FilamentLoadUnloadHandler.cpp @@ -45,7 +45,7 @@ void FilamentLoadUnloadHandler::HandleLoadUnloadButton(DGUS_VP_Variable &var, vo SetStatusMessage(PSTR("Please pause print first")); return; } - + DGUSSynchronousOperation syncOperation; uint16_t button_value = uInt16Value(val_ptr); switch (button_value) { @@ -89,9 +89,9 @@ void FilamentLoadUnloadHandler::ChangeFilamentWithTemperature(PGM_P command) { char cmd[64]; sprintf_P(cmd, command, length); - + // Handle commands - SERIAL_ECHOPAIR("Injecting command: ", cmd); + SERIAL_ECHOPGM("Injecting command: ", cmd); GcodeSuite::process_subcommands_now(cmd); SERIAL_ECHOPGM_P("- done"); diff --git a/Marlin/src/lcd/extui/dgus_creality/creality_touch/PIDHandler.cpp b/Marlin/src/lcd/extui/dgus_creality/creality_touch/PIDHandler.cpp index c06e5870bd..06b3abb69a 100644 --- a/Marlin/src/lcd/extui/dgus_creality/creality_touch/PIDHandler.cpp +++ b/Marlin/src/lcd/extui/dgus_creality/creality_touch/PIDHandler.cpp @@ -69,7 +69,7 @@ void PIDHandler::HandleStartButton(DGUS_VP_Variable &var, void *val_ptr) { char cmd[64]; // Add a G4 to allow the fan speed to take effect sprintf_P(cmd, PSTR("M106 S%d\nG4 S2\nM303 S%d C%d U1"), fan_speed, calibration_temperature, cycles); - SERIAL_ECHOLNPAIR("Executing: ", cmd); + SERIAL_ECHOLNPGM("Executing: ", cmd); ExtUI::injectCommands(cmd); while (queue.has_commands_queued()) queue.advance(); diff --git a/Marlin/src/lcd/extui/dgus_creality/creality_touch/PageHandlers.cpp b/Marlin/src/lcd/extui/dgus_creality/creality_touch/PageHandlers.cpp index d8ecfdc05f..7489e0ede9 100644 --- a/Marlin/src/lcd/extui/dgus_creality/creality_touch/PageHandlers.cpp +++ b/Marlin/src/lcd/extui/dgus_creality/creality_touch/PageHandlers.cpp @@ -433,8 +433,8 @@ void DGUSCrealityDisplay_HandleReturnKeyEvent(DGUS_VP_Variable &var, void *val_p if ((map->ScreenID) == current_screen) { uint16_t button_value = uInt16Value(val_ptr); - SERIAL_ECHOPAIR("Invoking handler for screen ", current_screen); - SERIAL_ECHOLNPAIR("with VP=", var.VP, " value=", button_value); + SERIAL_ECHOLNPGM("Invoking handler for screen ", current_screen); + SERIAL_ECHOLNPGM("with VP=", var.VP, " value=", button_value); map->Handler(var, button_value); return; diff --git a/Marlin/src/lcd/extui/dgus_creality_lcd.cpp b/Marlin/src/lcd/extui/dgus_creality_lcd.cpp index c63de36933..b4f6206da2 100644 --- a/Marlin/src/lcd/extui/dgus_creality_lcd.cpp +++ b/Marlin/src/lcd/extui/dgus_creality_lcd.cpp @@ -130,7 +130,7 @@ bool hasPrintTimer = false; void onUserConfirmRequired(const char * const msg) { //if (msg) { - SERIAL_ECHOLNPAIR("User confirmation requested: ", msg); + SERIAL_ECHOLNPGM("User confirmation requested: ", msg); if (ScreenHandler.getCurrentScreen() == DGUSLCD_SCREEN_FEED) { // We're in the feed (load filament) workflow - immediately assume confirmed diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index e46f91b52e..605b0835fa 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -1717,7 +1717,7 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; ) { //if (mode == PAUSE_MODE_SAME) //return; - SERIAL_ECHOPAIR("PauseMsg=", message); + SERIAL_ECHOLNPGM("PauseMsg=", message); pause_mode = mode; ExtUI::pauseModeStatus = message; switch (message) { diff --git a/buildroot/share/PlatformIO/scripts/common-cxxflags.py b/buildroot/share/PlatformIO/scripts/common-cxxflags.py index c1d0472fa5..59707ceec4 100644 --- a/buildroot/share/PlatformIO/scripts/common-cxxflags.py +++ b/buildroot/share/PlatformIO/scripts/common-cxxflags.py @@ -27,7 +27,7 @@ def add_cpu_freq(): if env.GetBuildType() == "debug" and env.get('UPLOAD_PROTOCOL') not in ['jlink', 'stlink']: env['BUILD_DIR'] = '$PROJECT_BUILD_DIR/$PIOENV/debug' env_name = str(env["PIOENV"]) -env.Replace(PROGNAME="%s_DW7.4.1" % (env_name)) +env.Replace(PROGNAME="%s_DW7.4.2" % (env_name)) print("Environment: %s" % (env_name)) # On some platform, F_CPU is a runtime variable. Since it's used to convert from ns diff --git a/buildroot/share/PlatformIO/scripts/random-bin.py b/buildroot/share/PlatformIO/scripts/random-bin.py index 48b4c69422..a01ba3c49d 100644 --- a/buildroot/share/PlatformIO/scripts/random-bin.py +++ b/buildroot/share/PlatformIO/scripts/random-bin.py @@ -6,5 +6,5 @@ Import("env") from datetime import datetime env_name = str(env["PIOENV"]) -env['PROGNAME'] = "firmware_%s_DW7.4.1" % (env_name) +env['PROGNAME'] = "firmware_%s_DW7.4.2" % (env_name) #env['PROGNAME'] .= datetime.now().strftime("-%Y%m%d-%H%M%S")