Sfoglia il codice sorgente

fix error in M105 output -- use SERIAL_PROTOCOL for ints instead of SERIAL_PROTOCOL_F (#6584)

also removed wayward 'address of' ampersand in setTargetHotend and setTargetBed parameters
bgort 7 anni fa
parent
commit
ae7c602031
2 ha cambiato i file con 9 aggiunte e 8 eliminazioni
  1. 6
    6
      Marlin/Marlin_main.cpp
  2. 3
    2
      Marlin/temperature.h

+ 6
- 6
Marlin/Marlin_main.cpp Vedi File

@@ -6498,9 +6498,9 @@ inline void gcode_M104() {
6498 6498
   void print_heaterstates() {
6499 6499
     #if HAS_TEMP_HOTEND
6500 6500
       SERIAL_PROTOCOLPGM(" T:");
6501
-      SERIAL_PROTOCOL_F(thermalManager.degHotend(target_extruder), 1);
6501
+      SERIAL_PROTOCOL(thermalManager.degHotend(target_extruder));
6502 6502
       SERIAL_PROTOCOLPGM(" /");
6503
-      SERIAL_PROTOCOL_F(thermalManager.degTargetHotend(target_extruder), 1);
6503
+      SERIAL_PROTOCOL(thermalManager.degTargetHotend(target_extruder));
6504 6504
       #if ENABLED(SHOW_TEMP_ADC_VALUES)
6505 6505
         SERIAL_PROTOCOLPAIR(" (", thermalManager.rawHotendTemp(target_extruder) / OVERSAMPLENR);
6506 6506
         SERIAL_PROTOCOLCHAR(')');
@@ -6508,9 +6508,9 @@ inline void gcode_M104() {
6508 6508
     #endif
6509 6509
     #if HAS_TEMP_BED
6510 6510
       SERIAL_PROTOCOLPGM(" B:");
6511
-      SERIAL_PROTOCOL_F(thermalManager.degBed(), 1);
6511
+      SERIAL_PROTOCOL(thermalManager.degBed());
6512 6512
       SERIAL_PROTOCOLPGM(" /");
6513
-      SERIAL_PROTOCOL_F(thermalManager.degTargetBed(), 1);
6513
+      SERIAL_PROTOCOL(thermalManager.degTargetBed());
6514 6514
       #if ENABLED(SHOW_TEMP_ADC_VALUES)
6515 6515
         SERIAL_PROTOCOLPAIR(" (", thermalManager.rawBedTemp() / OVERSAMPLENR);
6516 6516
         SERIAL_PROTOCOLCHAR(')');
@@ -6520,9 +6520,9 @@ inline void gcode_M104() {
6520 6520
       HOTEND_LOOP() {
6521 6521
         SERIAL_PROTOCOLPAIR(" T", e);
6522 6522
         SERIAL_PROTOCOLCHAR(':');
6523
-        SERIAL_PROTOCOL_F(thermalManager.degHotend(e), 1);
6523
+        SERIAL_PROTOCOL(thermalManager.degHotend(e));
6524 6524
         SERIAL_PROTOCOLPGM(" /");
6525
-        SERIAL_PROTOCOL_F(thermalManager.degTargetHotend(e), 1);
6525
+        SERIAL_PROTOCOL(thermalManager.degTargetHotend(e));
6526 6526
         #if ENABLED(SHOW_TEMP_ADC_VALUES)
6527 6527
           SERIAL_PROTOCOLPAIR(" (", thermalManager.rawHotendTemp(e) / OVERSAMPLENR);
6528 6528
           SERIAL_PROTOCOLCHAR(')');

+ 3
- 2
Marlin/temperature.h Vedi File

@@ -346,6 +346,7 @@ class Temperature {
346 346
       #endif
347 347
       return target_temperature[HOTEND_INDEX];
348 348
     }
349
+
349 350
     static int16_t degTargetBed() { return target_temperature_bed; }
350 351
 
351 352
     #if WATCH_HOTENDS
@@ -356,7 +357,7 @@ class Temperature {
356 357
       static void start_watching_bed();
357 358
     #endif
358 359
 
359
-    static void setTargetHotend(const int16_t &celsius, uint8_t e) {
360
+    static void setTargetHotend(const int16_t celsius, uint8_t e) {
360 361
       #if HOTENDS == 1
361 362
         UNUSED(e);
362 363
       #endif
@@ -372,7 +373,7 @@ class Temperature {
372 373
       #endif
373 374
     }
374 375
 
375
-    static void setTargetBed(const int16_t &celsius) {
376
+    static void setTargetBed(const int16_t celsius) {
376 377
       target_temperature_bed = celsius;
377 378
       #if WATCH_THE_BED
378 379
         start_watching_bed();

Loading…
Annulla
Salva