Skip to content

Commit

Permalink
🩹 Fix DWIN float debugging (MarlinFirmware#23601)
Browse files Browse the repository at this point in the history
  • Loading branch information
DejitaruJin authored and Omkar Dhekne committed Mar 25, 2024
1 parent dc9cd44 commit 6a29c56
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ class DGUSScreenHandler {
static void DGUSLCD_SendFloatAsIntValueToDisplay(DGUS_VP_Variable &var) {
if (var.memadr) {
float f = *(float *)var.memadr;
DEBUG_ECHOLNPGM(" >> ", f, 6);
DEBUG_ECHOLNPAIR_F(" >> ", f, 6);
f *= cpow(10, decimals);
dgusdisplay.WriteVariable(var.VP, (int16_t)f);
}
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ class DGUSScreenHandler {
static void DGUSLCD_SendFloatAsIntValueToDisplay(DGUS_VP_Variable &var) {
if (var.memadr) {
float f = *(float *)var.memadr;
DEBUG_ECHOLNPGM(" >> ", f, 6);
DEBUG_ECHOLNPAIR_F(" >> ", f, 6);
f *= cpow(10, decimals);
dgusdisplay.WriteVariable(var.VP, (int16_t)f);
}
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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_ECHOLNPGM(" >> ", value, 6);
DEBUG_ECHOLNPAIR_F(" >> ", value, 6);
value *= cpow(10, 2);
dgusdisplay.WriteVariable(VP_SD_Print_Baby, (uint16_t)value);
}
Expand Down Expand Up @@ -756,7 +756,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
else if (manualMoveStep == 0x02) manualMoveStep = 100;
else if (manualMoveStep == 0x03) manualMoveStep = 1000;

DEBUG_ECHOLNPGM("QUEUE LEN:", queue.length);
DEBUG_ECHOLNPGM("QUEUE LEN:", queue.ring_buffer.length);

if (!print_job_timer.isPaused() && !queue.ring_buffer.empty())
return;
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ class DGUSScreenHandler {
static void DGUSLCD_SendFloatAsIntValueToDisplay(DGUS_VP_Variable &var) {
if (var.memadr) {
float f = *(float *)var.memadr;
DEBUG_ECHOLNPGM(" >> ", f, 6);
DEBUG_ECHOLNPAIR_F(" >> ", f, 6);
f *= cpow(10, decimals);
dgusdisplay.WriteVariable(var.VP, (int16_t)f);
}
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ class DGUSScreenHandler {
static void DGUSLCD_SendFloatAsIntValueToDisplay(DGUS_VP_Variable &var) {
if (var.memadr) {
float f = *(float *)var.memadr;
DEBUG_ECHOLNPGM(" >> ", f, 6);
DEBUG_ECHOLNPAIR_F(" >> ", f, 6);
f *= cpow(10, decimals);
dgusdisplay.WriteVariable(var.VP, (int16_t)f);
}
Expand Down

0 comments on commit 6a29c56

Please sign in to comment.