Bläddra i källkod

🎨 Simplify some debug echos

Scott Lahteine 2 år sedan
förälder
incheckning
755c10d303

+ 4
- 4
Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp Visa fil

@@ -508,9 +508,9 @@ void DGUSScreenHandler::HandleStepPerMMChanged(DGUS_VP_Variable &var, void *val_
508 508
     case VP_Z_STEP_PER_MM: axis = ExtUI::axis_t::Z; break;
509 509
     default: return;
510 510
   }
511
-  DEBUG_ECHOLNPAIR_F("value:", value);
511
+  DEBUG_ECHOLNPGM("value:", value);
512 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 514
   skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
515 515
   return;
516 516
 }
@@ -531,9 +531,9 @@ void DGUSScreenHandler::HandleStepPerMMExtruderChanged(DGUS_VP_Variable &var, vo
531 531
         #endif
532 532
       #endif
533 533
   }
534
-  DEBUG_ECHOLNPAIR_F("value:", value);
534
+  DEBUG_ECHOLNPGM("value:", value);
535 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 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 Visa fil

@@ -268,7 +268,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
268 268
         #endif
269 269
     }
270 270
 
271
-    DEBUG_ECHOLNPAIR_F("V3:", newvalue);
271
+    DEBUG_ECHOLNPGM("V3:", newvalue);
272 272
     *(float *)var.memadr = newvalue;
273 273
 
274 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 Visa fil

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

+ 1
- 1
Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.cpp Visa fil

@@ -268,7 +268,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
268 268
         #endif
269 269
     }
270 270
 
271
-    DEBUG_ECHOLNPAIR_F("V3:", newvalue);
271
+    DEBUG_ECHOLNPGM("V3:", newvalue);
272 272
     *(float *)var.memadr = newvalue;
273 273
 
274 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 Visa fil

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

+ 18
- 18
Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp Visa fil

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

+ 1
- 1
Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.h Visa fil

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

+ 1
- 1
Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.cpp Visa fil

@@ -268,7 +268,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
268 268
         #endif
269 269
     }
270 270
 
271
-    DEBUG_ECHOLNPAIR_F("V3:", newvalue);
271
+    DEBUG_ECHOLNPGM("V3:", newvalue);
272 272
     *(float *)var.memadr = newvalue;
273 273
 
274 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 Visa fil

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

Laddar…
Avbryt
Spara