🎨 Simplify some debug echos

x301
Scott Lahteine 3 years ago
parent 73b8320e9c
commit 58c84f17ba

@ -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; case VP_Z_STEP_PER_MM: axis = ExtUI::axis_t::Z; break;
default: return; default: return;
} }
DEBUG_ECHOLNPAIR_F("value:", value); DEBUG_ECHOLNPGM("value:", value);
ExtUI::setAxisSteps_per_mm(value, axis); 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 skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
return; return;
} }
@ -531,9 +531,9 @@ void DGUSScreenHandler::HandleStepPerMMExtruderChanged(DGUS_VP_Variable &var, vo
#endif #endif
#endif #endif
} }
DEBUG_ECHOLNPAIR_F("value:", value); DEBUG_ECHOLNPGM("value:", value);
ExtUI::setAxisSteps_per_mm(value, extruder); 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 skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
} }

@ -268,7 +268,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
#endif #endif
} }
DEBUG_ECHOLNPAIR_F("V3:", newvalue); DEBUG_ECHOLNPGM("V3:", newvalue);
*(float *)var.memadr = newvalue; *(float *)var.memadr = newvalue;
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel

@ -206,7 +206,7 @@ public:
static void DGUSLCD_SendFloatAsIntValueToDisplay(DGUS_VP_Variable &var) { static void DGUSLCD_SendFloatAsIntValueToDisplay(DGUS_VP_Variable &var) {
if (var.memadr) { if (var.memadr) {
float f = *(float *)var.memadr; float f = *(float *)var.memadr;
DEBUG_ECHOLNPAIR_F(" >> ", f, 6); DEBUG_ECHOLNPGM(" >> ", f, 6);
f *= cpow(10, decimals); f *= cpow(10, decimals);
dgusdisplay.WriteVariable(var.VP, (int16_t)f); dgusdisplay.WriteVariable(var.VP, (int16_t)f);
} }

@ -268,7 +268,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
#endif #endif
} }
DEBUG_ECHOLNPAIR_F("V3:", newvalue); DEBUG_ECHOLNPGM("V3:", newvalue);
*(float *)var.memadr = newvalue; *(float *)var.memadr = newvalue;
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel

@ -206,7 +206,7 @@ public:
static void DGUSLCD_SendFloatAsIntValueToDisplay(DGUS_VP_Variable &var) { static void DGUSLCD_SendFloatAsIntValueToDisplay(DGUS_VP_Variable &var) {
if (var.memadr) { if (var.memadr) {
float f = *(float *)var.memadr; float f = *(float *)var.memadr;
DEBUG_ECHOLNPAIR_F(" >> ", f, 6); DEBUG_ECHOLNPGM(" >> ", f, 6);
f *= cpow(10, decimals); f *= cpow(10, decimals);
dgusdisplay.WriteVariable(var.VP, (int16_t)f); dgusdisplay.WriteVariable(var.VP, (int16_t)f);
} }

@ -93,7 +93,7 @@ void DGUSScreenHandler::DGUSLCD_SendFanToDisplay(DGUS_VP_Variable &var) {
void DGUSScreenHandler::DGUSLCD_SendBabyStepToDisplay_MKS(DGUS_VP_Variable &var) { void DGUSScreenHandler::DGUSLCD_SendBabyStepToDisplay_MKS(DGUS_VP_Variable &var) {
float value = current_position.z; float value = current_position.z;
DEBUG_ECHOLNPAIR_F(" >> ", value, 6); DEBUG_ECHOLNPGM(" >> ", value, 6);
value *= cpow(10, 2); value *= cpow(10, 2);
dgusdisplay.WriteVariable(VP_SD_Print_Baby, (uint16_t)value); dgusdisplay.WriteVariable(VP_SD_Print_Baby, (uint16_t)value);
} }
@ -399,7 +399,7 @@ void DGUSScreenHandler::GetOffsetValue(DGUS_VP_Variable &var, void *val_ptr) {
#if HAS_BED_PROBE #if HAS_BED_PROBE
int32_t value = swap32(*(int32_t *)val_ptr); int32_t value = swap32(*(int32_t *)val_ptr);
float Offset = value / 100.0f; float Offset = value / 100.0f;
DEBUG_ECHOLNPAIR_F("\nget int6 offset >> ", value, 6); DEBUG_ECHOLNPGM("\nget int6 offset >> ", value, 6);
#endif #endif
switch (var.VP) { switch (var.VP) {
@ -909,7 +909,7 @@ void DGUSScreenHandler::HandleChangeLevelPoint_MKS(DGUS_VP_Variable &var, void *
DEBUG_ECHOLNPGM("HandleChangeLevelPoint_MKS"); DEBUG_ECHOLNPGM("HandleChangeLevelPoint_MKS");
const int16_t value_raw = swap16(*(int16_t*)val_ptr); 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; *(int16_t*)var.memadr = value_raw;
@ -924,7 +924,7 @@ void DGUSScreenHandler::HandleStepPerMMChanged_MKS(DGUS_VP_Variable &var, void *
const float value = (float)value_raw; const float value = (float)value_raw;
DEBUG_ECHOLNPGM("value_raw:", value_raw); DEBUG_ECHOLNPGM("value_raw:", value_raw);
DEBUG_ECHOLNPAIR_F("value:", value); DEBUG_ECHOLNPGM("value:", value);
ExtUI::axis_t axis; ExtUI::axis_t axis;
switch (var.VP) { switch (var.VP) {
@ -934,7 +934,7 @@ void DGUSScreenHandler::HandleStepPerMMChanged_MKS(DGUS_VP_Variable &var, void *
case VP_Z_STEP_PER_MM: axis = ExtUI::axis_t::Z; break; case VP_Z_STEP_PER_MM: axis = ExtUI::axis_t::Z; break;
} }
ExtUI::setAxisSteps_per_mm(value, axis); 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(); settings.save();
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
} }
@ -946,7 +946,7 @@ void DGUSScreenHandler::HandleStepPerMMExtruderChanged_MKS(DGUS_VP_Variable &var
const float value = (float)value_raw; const float value = (float)value_raw;
DEBUG_ECHOLNPGM("value_raw:", value_raw); DEBUG_ECHOLNPGM("value_raw:", value_raw);
DEBUG_ECHOLNPAIR_F("value:", value); DEBUG_ECHOLNPGM("value:", value);
ExtUI::extruder_t extruder; ExtUI::extruder_t extruder;
switch (var.VP) { switch (var.VP) {
@ -959,7 +959,7 @@ void DGUSScreenHandler::HandleStepPerMMExtruderChanged_MKS(DGUS_VP_Variable &var
#endif #endif
} }
ExtUI::setAxisSteps_per_mm(value, extruder); 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(); settings.save();
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
} }
@ -971,7 +971,7 @@ void DGUSScreenHandler::HandleMaxSpeedChange_MKS(DGUS_VP_Variable &var, void *va
const float value = (float)value_raw; const float value = (float)value_raw;
DEBUG_ECHOLNPGM("value_raw:", value_raw); DEBUG_ECHOLNPGM("value_raw:", value_raw);
DEBUG_ECHOLNPAIR_F("value:", value); DEBUG_ECHOLNPGM("value:", value);
ExtUI::axis_t axis; ExtUI::axis_t axis;
switch (var.VP) { switch (var.VP) {
@ -981,7 +981,7 @@ void DGUSScreenHandler::HandleMaxSpeedChange_MKS(DGUS_VP_Variable &var, void *va
default: return; default: return;
} }
ExtUI::setAxisMaxFeedrate_mm_s(value, axis); 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(); settings.save();
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
} }
@ -993,7 +993,7 @@ void DGUSScreenHandler::HandleExtruderMaxSpeedChange_MKS(DGUS_VP_Variable &var,
const float value = (float)value_raw; const float value = (float)value_raw;
DEBUG_ECHOLNPGM("value_raw:", value_raw); DEBUG_ECHOLNPGM("value_raw:", value_raw);
DEBUG_ECHOLNPAIR_F("value:", value); DEBUG_ECHOLNPGM("value:", value);
ExtUI::extruder_t extruder; ExtUI::extruder_t extruder;
switch (var.VP) { switch (var.VP) {
@ -1006,7 +1006,7 @@ void DGUSScreenHandler::HandleExtruderMaxSpeedChange_MKS(DGUS_VP_Variable &var,
case VP_E1_MAX_SPEED: extruder = ExtUI::extruder_t::E1; break; case VP_E1_MAX_SPEED: extruder = ExtUI::extruder_t::E1; break;
} }
ExtUI::setAxisMaxFeedrate_mm_s(value, extruder); 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(); settings.save();
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
} }
@ -1018,7 +1018,7 @@ void DGUSScreenHandler::HandleMaxAccChange_MKS(DGUS_VP_Variable &var, void *val_
const float value = (float)value_raw; const float value = (float)value_raw;
DEBUG_ECHOLNPGM("value_raw:", value_raw); DEBUG_ECHOLNPGM("value_raw:", value_raw);
DEBUG_ECHOLNPAIR_F("value:", value); DEBUG_ECHOLNPGM("value:", value);
ExtUI::axis_t axis; ExtUI::axis_t axis;
switch (var.VP) { switch (var.VP) {
@ -1028,7 +1028,7 @@ void DGUSScreenHandler::HandleMaxAccChange_MKS(DGUS_VP_Variable &var, void *val_
case VP_Z_ACC_MAX_SPEED: axis = ExtUI::axis_t::Z; break; case VP_Z_ACC_MAX_SPEED: axis = ExtUI::axis_t::Z; break;
} }
ExtUI::setAxisMaxAcceleration_mm_s2(value, axis); 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(); settings.save();
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
} }
@ -1049,9 +1049,9 @@ void DGUSScreenHandler::HandleExtruderAccChange_MKS(DGUS_VP_Variable &var, void
case VP_E1_ACC_MAX_SPEED: extruder = ExtUI::extruder_t::E1; settings.load(); break; case VP_E1_ACC_MAX_SPEED: extruder = ExtUI::extruder_t::E1; settings.load(); break;
#endif #endif
} }
DEBUG_ECHOLNPAIR_F("value:", value); DEBUG_ECHOLNPGM("value:", value);
ExtUI::setAxisMaxAcceleration_mm_s2(value, extruder); 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(); settings.save();
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
} }
@ -1115,7 +1115,7 @@ void DGUSScreenHandler::HandleAccChange_MKS(DGUS_VP_Variable &var, void *val_ptr
#endif #endif
} }
DEBUG_ECHOLNPAIR_F("V3:", newvalue); DEBUG_ECHOLNPGM("V3:", newvalue);
*(float *)var.memadr = newvalue; *(float *)var.memadr = newvalue;
settings.save(); settings.save();
@ -1175,7 +1175,7 @@ void DGUSScreenHandler::GetManualFilament(DGUS_VP_Variable &var, void *val_ptr)
float value = (float)value_len; float value = (float)value_len;
DEBUG_ECHOLNPAIR_F("Get Filament len value:", value); DEBUG_ECHOLNPGM("Get Filament len value:", value);
distanceFilament = value; distanceFilament = value;
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
@ -1186,7 +1186,7 @@ void DGUSScreenHandler::GetManualFilamentSpeed(DGUS_VP_Variable &var, void *val_
uint16_t value_len = swap16(*(uint16_t*)val_ptr); 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; filamentSpeed_mm_s = value_len;

@ -273,7 +273,7 @@ public:
static void DGUSLCD_SendFloatAsIntValueToDisplay(DGUS_VP_Variable &var) { static void DGUSLCD_SendFloatAsIntValueToDisplay(DGUS_VP_Variable &var) {
if (var.memadr) { if (var.memadr) {
float f = *(float *)var.memadr; float f = *(float *)var.memadr;
DEBUG_ECHOLNPAIR_F(" >> ", f, 6); DEBUG_ECHOLNPGM(" >> ", f, 6);
f *= cpow(10, decimals); f *= cpow(10, decimals);
dgusdisplay.WriteVariable(var.VP, (int16_t)f); dgusdisplay.WriteVariable(var.VP, (int16_t)f);
} }

@ -268,7 +268,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
#endif #endif
} }
DEBUG_ECHOLNPAIR_F("V3:", newvalue); DEBUG_ECHOLNPGM("V3:", newvalue);
*(float *)var.memadr = newvalue; *(float *)var.memadr = newvalue;
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel

@ -206,7 +206,7 @@ public:
static void DGUSLCD_SendFloatAsIntValueToDisplay(DGUS_VP_Variable &var) { static void DGUSLCD_SendFloatAsIntValueToDisplay(DGUS_VP_Variable &var) {
if (var.memadr) { if (var.memadr) {
float f = *(float *)var.memadr; float f = *(float *)var.memadr;
DEBUG_ECHOLNPAIR_F(" >> ", f, 6); DEBUG_ECHOLNPGM(" >> ", f, 6);
f *= cpow(10, decimals); f *= cpow(10, decimals);
dgusdisplay.WriteVariable(var.VP, (int16_t)f); dgusdisplay.WriteVariable(var.VP, (int16_t)f);
} }

Loading…
Cancel
Save