Ver código fonte

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 8 anos atrás
pai
commit
264f0960f7
2 arquivos alterados com 9 adições e 8 exclusões
  1. 6
    6
      Marlin/Marlin_main.cpp
  2. 3
    2
      Marlin/temperature.h

+ 6
- 6
Marlin/Marlin_main.cpp Ver arquivo

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

+ 3
- 2
Marlin/temperature.h Ver arquivo

346
       #endif
346
       #endif
347
       return target_temperature[HOTEND_INDEX];
347
       return target_temperature[HOTEND_INDEX];
348
     }
348
     }
349
+
349
     static int16_t degTargetBed() { return target_temperature_bed; }
350
     static int16_t degTargetBed() { return target_temperature_bed; }
350
 
351
 
351
     #if WATCH_HOTENDS
352
     #if WATCH_HOTENDS
356
       static void start_watching_bed();
357
       static void start_watching_bed();
357
     #endif
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
       #if HOTENDS == 1
361
       #if HOTENDS == 1
361
         UNUSED(e);
362
         UNUSED(e);
362
       #endif
363
       #endif
372
       #endif
373
       #endif
373
     }
374
     }
374
 
375
 
375
-    static void setTargetBed(const int16_t &celsius) {
376
+    static void setTargetBed(const int16_t celsius) {
376
       target_temperature_bed = celsius;
377
       target_temperature_bed = celsius;
377
       #if WATCH_THE_BED
378
       #if WATCH_THE_BED
378
         start_watching_bed();
379
         start_watching_bed();

Carregando…
Cancelar
Salvar