Browse Source

🎨 Simplify some debug echos

Scott Lahteine 2 years ago
parent
commit
755c10d303

+ 4
- 4
Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp View File

508
     case VP_Z_STEP_PER_MM: axis = ExtUI::axis_t::Z; break;
508
     case VP_Z_STEP_PER_MM: axis = ExtUI::axis_t::Z; break;
509
     default: return;
509
     default: return;
510
   }
510
   }
511
-  DEBUG_ECHOLNPAIR_F("value:", value);
511
+  DEBUG_ECHOLNPGM("value:", value);
512
   ExtUI::setAxisSteps_per_mm(value, axis);
512
   ExtUI::setAxisSteps_per_mm(value, axis);
513
-  DEBUG_ECHOLNPAIR_F("value_set:", ExtUI::getAxisSteps_per_mm(axis));
513
+  DEBUG_ECHOLNPGM("value_set:", ExtUI::getAxisSteps_per_mm(axis));
514
   skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
514
   skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
515
   return;
515
   return;
516
 }
516
 }
531
         #endif
531
         #endif
532
       #endif
532
       #endif
533
   }
533
   }
534
-  DEBUG_ECHOLNPAIR_F("value:", value);
534
+  DEBUG_ECHOLNPGM("value:", value);
535
   ExtUI::setAxisSteps_per_mm(value, extruder);
535
   ExtUI::setAxisSteps_per_mm(value, extruder);
536
-  DEBUG_ECHOLNPAIR_F("value_set:", ExtUI::getAxisSteps_per_mm(extruder));
536
+  DEBUG_ECHOLNPGM("value_set:", ExtUI::getAxisSteps_per_mm(extruder));
537
   skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
537
   skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
538
 }
538
 }
539
 
539
 

+ 1
- 1
Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.cpp View File

268
         #endif
268
         #endif
269
     }
269
     }
270
 
270
 
271
-    DEBUG_ECHOLNPAIR_F("V3:", newvalue);
271
+    DEBUG_ECHOLNPGM("V3:", newvalue);
272
     *(float *)var.memadr = newvalue;
272
     *(float *)var.memadr = newvalue;
273
 
273
 
274
     skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
274
     skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel

+ 1
- 1
Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.h View File

206
   static void DGUSLCD_SendFloatAsIntValueToDisplay(DGUS_VP_Variable &var) {
206
   static void DGUSLCD_SendFloatAsIntValueToDisplay(DGUS_VP_Variable &var) {
207
     if (var.memadr) {
207
     if (var.memadr) {
208
       float f = *(float *)var.memadr;
208
       float f = *(float *)var.memadr;
209
-      DEBUG_ECHOLNPAIR_F(" >> ", f, 6);
209
+      DEBUG_ECHOLNPGM(" >> ", f, 6);
210
       f *= cpow(10, decimals);
210
       f *= cpow(10, decimals);
211
       dgusdisplay.WriteVariable(var.VP, (int16_t)f);
211
       dgusdisplay.WriteVariable(var.VP, (int16_t)f);
212
     }
212
     }

+ 1
- 1
Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.cpp View File

268
         #endif
268
         #endif
269
     }
269
     }
270
 
270
 
271
-    DEBUG_ECHOLNPAIR_F("V3:", newvalue);
271
+    DEBUG_ECHOLNPGM("V3:", newvalue);
272
     *(float *)var.memadr = newvalue;
272
     *(float *)var.memadr = newvalue;
273
 
273
 
274
     skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
274
     skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel

+ 1
- 1
Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.h View File

206
   static void DGUSLCD_SendFloatAsIntValueToDisplay(DGUS_VP_Variable &var) {
206
   static void DGUSLCD_SendFloatAsIntValueToDisplay(DGUS_VP_Variable &var) {
207
     if (var.memadr) {
207
     if (var.memadr) {
208
       float f = *(float *)var.memadr;
208
       float f = *(float *)var.memadr;
209
-      DEBUG_ECHOLNPAIR_F(" >> ", f, 6);
209
+      DEBUG_ECHOLNPGM(" >> ", f, 6);
210
       f *= cpow(10, decimals);
210
       f *= cpow(10, decimals);
211
       dgusdisplay.WriteVariable(var.VP, (int16_t)f);
211
       dgusdisplay.WriteVariable(var.VP, (int16_t)f);
212
     }
212
     }

+ 18
- 18
Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp View File

93
 
93
 
94
 void DGUSScreenHandler::DGUSLCD_SendBabyStepToDisplay_MKS(DGUS_VP_Variable &var) {
94
 void DGUSScreenHandler::DGUSLCD_SendBabyStepToDisplay_MKS(DGUS_VP_Variable &var) {
95
   float value = current_position.z;
95
   float value = current_position.z;
96
-  DEBUG_ECHOLNPAIR_F(" >> ", value, 6);
96
+  DEBUG_ECHOLNPGM(" >> ", value, 6);
97
   value *= cpow(10, 2);
97
   value *= cpow(10, 2);
98
   dgusdisplay.WriteVariable(VP_SD_Print_Baby, (uint16_t)value);
98
   dgusdisplay.WriteVariable(VP_SD_Print_Baby, (uint16_t)value);
99
 }
99
 }
399
   #if HAS_BED_PROBE
399
   #if HAS_BED_PROBE
400
     int32_t value = swap32(*(int32_t *)val_ptr);
400
     int32_t value = swap32(*(int32_t *)val_ptr);
401
     float Offset = value / 100.0f;
401
     float Offset = value / 100.0f;
402
-    DEBUG_ECHOLNPAIR_F("\nget int6 offset >> ", value, 6);
402
+    DEBUG_ECHOLNPGM("\nget int6 offset >> ", value, 6);
403
   #endif
403
   #endif
404
 
404
 
405
   switch (var.VP) {
405
   switch (var.VP) {
909
   DEBUG_ECHOLNPGM("HandleChangeLevelPoint_MKS");
909
   DEBUG_ECHOLNPGM("HandleChangeLevelPoint_MKS");
910
 
910
 
911
   const int16_t value_raw = swap16(*(int16_t*)val_ptr);
911
   const int16_t value_raw = swap16(*(int16_t*)val_ptr);
912
-  DEBUG_ECHOLNPAIR_F("value_raw:", value_raw);
912
+  DEBUG_ECHOLNPGM("value_raw:", value_raw);
913
 
913
 
914
   *(int16_t*)var.memadr = value_raw;
914
   *(int16_t*)var.memadr = value_raw;
915
 
915
 
924
   const float value = (float)value_raw;
924
   const float value = (float)value_raw;
925
 
925
 
926
   DEBUG_ECHOLNPGM("value_raw:", value_raw);
926
   DEBUG_ECHOLNPGM("value_raw:", value_raw);
927
-  DEBUG_ECHOLNPAIR_F("value:", value);
927
+  DEBUG_ECHOLNPGM("value:", value);
928
 
928
 
929
   ExtUI::axis_t axis;
929
   ExtUI::axis_t axis;
930
   switch (var.VP) {
930
   switch (var.VP) {
934
     case VP_Z_STEP_PER_MM: axis = ExtUI::axis_t::Z; break;
934
     case VP_Z_STEP_PER_MM: axis = ExtUI::axis_t::Z; break;
935
   }
935
   }
936
   ExtUI::setAxisSteps_per_mm(value, axis);
936
   ExtUI::setAxisSteps_per_mm(value, axis);
937
-  DEBUG_ECHOLNPAIR_F("value_set:", ExtUI::getAxisSteps_per_mm(axis));
937
+  DEBUG_ECHOLNPGM("value_set:", ExtUI::getAxisSteps_per_mm(axis));
938
   settings.save();
938
   settings.save();
939
   skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
939
   skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
940
 }
940
 }
946
   const float value = (float)value_raw;
946
   const float value = (float)value_raw;
947
 
947
 
948
   DEBUG_ECHOLNPGM("value_raw:", value_raw);
948
   DEBUG_ECHOLNPGM("value_raw:", value_raw);
949
-  DEBUG_ECHOLNPAIR_F("value:", value);
949
+  DEBUG_ECHOLNPGM("value:", value);
950
 
950
 
951
   ExtUI::extruder_t extruder;
951
   ExtUI::extruder_t extruder;
952
   switch (var.VP) {
952
   switch (var.VP) {
959
     #endif
959
     #endif
960
   }
960
   }
961
   ExtUI::setAxisSteps_per_mm(value, extruder);
961
   ExtUI::setAxisSteps_per_mm(value, extruder);
962
-  DEBUG_ECHOLNPAIR_F("value_set:", ExtUI::getAxisSteps_per_mm(extruder));
962
+  DEBUG_ECHOLNPGM("value_set:", ExtUI::getAxisSteps_per_mm(extruder));
963
   settings.save();
963
   settings.save();
964
   skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
964
   skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
965
 }
965
 }
971
   const float value = (float)value_raw;
971
   const float value = (float)value_raw;
972
 
972
 
973
   DEBUG_ECHOLNPGM("value_raw:", value_raw);
973
   DEBUG_ECHOLNPGM("value_raw:", value_raw);
974
-  DEBUG_ECHOLNPAIR_F("value:", value);
974
+  DEBUG_ECHOLNPGM("value:", value);
975
 
975
 
976
   ExtUI::axis_t axis;
976
   ExtUI::axis_t axis;
977
   switch (var.VP) {
977
   switch (var.VP) {
981
     default: return;
981
     default: return;
982
   }
982
   }
983
   ExtUI::setAxisMaxFeedrate_mm_s(value, axis);
983
   ExtUI::setAxisMaxFeedrate_mm_s(value, axis);
984
-  DEBUG_ECHOLNPAIR_F("value_set:", ExtUI::getAxisMaxFeedrate_mm_s(axis));
984
+  DEBUG_ECHOLNPGM("value_set:", ExtUI::getAxisMaxFeedrate_mm_s(axis));
985
   settings.save();
985
   settings.save();
986
   skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
986
   skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
987
 }
987
 }
993
   const float value = (float)value_raw;
993
   const float value = (float)value_raw;
994
 
994
 
995
   DEBUG_ECHOLNPGM("value_raw:", value_raw);
995
   DEBUG_ECHOLNPGM("value_raw:", value_raw);
996
-  DEBUG_ECHOLNPAIR_F("value:", value);
996
+  DEBUG_ECHOLNPGM("value:", value);
997
 
997
 
998
   ExtUI::extruder_t extruder;
998
   ExtUI::extruder_t extruder;
999
   switch (var.VP) {
999
   switch (var.VP) {
1006
     case VP_E1_MAX_SPEED: extruder = ExtUI::extruder_t::E1; break;
1006
     case VP_E1_MAX_SPEED: extruder = ExtUI::extruder_t::E1; break;
1007
   }
1007
   }
1008
   ExtUI::setAxisMaxFeedrate_mm_s(value, extruder);
1008
   ExtUI::setAxisMaxFeedrate_mm_s(value, extruder);
1009
-  DEBUG_ECHOLNPAIR_F("value_set:", ExtUI::getAxisMaxFeedrate_mm_s(extruder));
1009
+  DEBUG_ECHOLNPGM("value_set:", ExtUI::getAxisMaxFeedrate_mm_s(extruder));
1010
   settings.save();
1010
   settings.save();
1011
   skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
1011
   skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
1012
 }
1012
 }
1018
   const float value = (float)value_raw;
1018
   const float value = (float)value_raw;
1019
 
1019
 
1020
   DEBUG_ECHOLNPGM("value_raw:", value_raw);
1020
   DEBUG_ECHOLNPGM("value_raw:", value_raw);
1021
-  DEBUG_ECHOLNPAIR_F("value:", value);
1021
+  DEBUG_ECHOLNPGM("value:", value);
1022
 
1022
 
1023
   ExtUI::axis_t axis;
1023
   ExtUI::axis_t axis;
1024
   switch (var.VP) {
1024
   switch (var.VP) {
1028
     case VP_Z_ACC_MAX_SPEED: axis = ExtUI::axis_t::Z;  break;
1028
     case VP_Z_ACC_MAX_SPEED: axis = ExtUI::axis_t::Z;  break;
1029
   }
1029
   }
1030
   ExtUI::setAxisMaxAcceleration_mm_s2(value, axis);
1030
   ExtUI::setAxisMaxAcceleration_mm_s2(value, axis);
1031
-  DEBUG_ECHOLNPAIR_F("value_set:", ExtUI::getAxisMaxAcceleration_mm_s2(axis));
1031
+  DEBUG_ECHOLNPGM("value_set:", ExtUI::getAxisMaxAcceleration_mm_s2(axis));
1032
   settings.save();
1032
   settings.save();
1033
   skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
1033
   skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
1034
 }
1034
 }
1049
       case VP_E1_ACC_MAX_SPEED: extruder = ExtUI::extruder_t::E1; settings.load(); break;
1049
       case VP_E1_ACC_MAX_SPEED: extruder = ExtUI::extruder_t::E1; settings.load(); break;
1050
     #endif
1050
     #endif
1051
   }
1051
   }
1052
-  DEBUG_ECHOLNPAIR_F("value:", value);
1052
+  DEBUG_ECHOLNPGM("value:", value);
1053
   ExtUI::setAxisMaxAcceleration_mm_s2(value, extruder);
1053
   ExtUI::setAxisMaxAcceleration_mm_s2(value, extruder);
1054
-  DEBUG_ECHOLNPAIR_F("value_set:", ExtUI::getAxisMaxAcceleration_mm_s2(extruder));
1054
+  DEBUG_ECHOLNPGM("value_set:", ExtUI::getAxisMaxAcceleration_mm_s2(extruder));
1055
   settings.save();
1055
   settings.save();
1056
   skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
1056
   skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
1057
 }
1057
 }
1115
         #endif
1115
         #endif
1116
     }
1116
     }
1117
 
1117
 
1118
-    DEBUG_ECHOLNPAIR_F("V3:", newvalue);
1118
+    DEBUG_ECHOLNPGM("V3:", newvalue);
1119
     *(float *)var.memadr = newvalue;
1119
     *(float *)var.memadr = newvalue;
1120
 
1120
 
1121
     settings.save();
1121
     settings.save();
1175
 
1175
 
1176
   float value = (float)value_len;
1176
   float value = (float)value_len;
1177
 
1177
 
1178
-  DEBUG_ECHOLNPAIR_F("Get Filament len value:", value);
1178
+  DEBUG_ECHOLNPGM("Get Filament len value:", value);
1179
   distanceFilament = value;
1179
   distanceFilament = value;
1180
 
1180
 
1181
   skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
1181
   skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
1186
 
1186
 
1187
   uint16_t value_len = swap16(*(uint16_t*)val_ptr);
1187
   uint16_t value_len = swap16(*(uint16_t*)val_ptr);
1188
 
1188
 
1189
-  DEBUG_ECHOLNPAIR_F("filamentSpeed_mm_s value:", value_len);
1189
+  DEBUG_ECHOLNPGM("filamentSpeed_mm_s value:", value_len);
1190
 
1190
 
1191
   filamentSpeed_mm_s = value_len;
1191
   filamentSpeed_mm_s = value_len;
1192
 
1192
 

+ 1
- 1
Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.h View File

273
   static void DGUSLCD_SendFloatAsIntValueToDisplay(DGUS_VP_Variable &var) {
273
   static void DGUSLCD_SendFloatAsIntValueToDisplay(DGUS_VP_Variable &var) {
274
     if (var.memadr) {
274
     if (var.memadr) {
275
       float f = *(float *)var.memadr;
275
       float f = *(float *)var.memadr;
276
-      DEBUG_ECHOLNPAIR_F(" >> ", f, 6);
276
+      DEBUG_ECHOLNPGM(" >> ", f, 6);
277
       f *= cpow(10, decimals);
277
       f *= cpow(10, decimals);
278
       dgusdisplay.WriteVariable(var.VP, (int16_t)f);
278
       dgusdisplay.WriteVariable(var.VP, (int16_t)f);
279
     }
279
     }

+ 1
- 1
Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.cpp View File

268
         #endif
268
         #endif
269
     }
269
     }
270
 
270
 
271
-    DEBUG_ECHOLNPAIR_F("V3:", newvalue);
271
+    DEBUG_ECHOLNPGM("V3:", newvalue);
272
     *(float *)var.memadr = newvalue;
272
     *(float *)var.memadr = newvalue;
273
 
273
 
274
     skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
274
     skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel

+ 1
- 1
Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.h View File

206
   static void DGUSLCD_SendFloatAsIntValueToDisplay(DGUS_VP_Variable &var) {
206
   static void DGUSLCD_SendFloatAsIntValueToDisplay(DGUS_VP_Variable &var) {
207
     if (var.memadr) {
207
     if (var.memadr) {
208
       float f = *(float *)var.memadr;
208
       float f = *(float *)var.memadr;
209
-      DEBUG_ECHOLNPAIR_F(" >> ", f, 6);
209
+      DEBUG_ECHOLNPGM(" >> ", f, 6);
210
       f *= cpow(10, decimals);
210
       f *= cpow(10, decimals);
211
       dgusdisplay.WriteVariable(var.VP, (int16_t)f);
211
       dgusdisplay.WriteVariable(var.VP, (int16_t)f);
212
     }
212
     }

Loading…
Cancel
Save