Browse Source

Fix output of heater states

Scott Lahteine 8 years ago
parent
commit
b40661cb18
3 changed files with 8 additions and 14 deletions
  1. 1
    0
      Marlin/Marlin.h
  2. 6
    13
      Marlin/Marlin_main.cpp
  3. 1
    1
      Marlin/temperature.h

+ 1
- 0
Marlin/Marlin.h View File

97
 void serial_echopair_P(const char* s_P, float v);
97
 void serial_echopair_P(const char* s_P, float v);
98
 void serial_echopair_P(const char* s_P, double v);
98
 void serial_echopair_P(const char* s_P, double v);
99
 void serial_echopair_P(const char* s_P, unsigned long v);
99
 void serial_echopair_P(const char* s_P, unsigned long v);
100
+FORCE_INLINE void serial_echopair_P(const char* s_P, uint8_t v) { serial_echopair_P(s_P, (int)v); }
100
 FORCE_INLINE void serial_echopair_P(const char* s_P, uint16_t v) { serial_echopair_P(s_P, (int)v); }
101
 FORCE_INLINE void serial_echopair_P(const char* s_P, uint16_t v) { serial_echopair_P(s_P, (int)v); }
101
 FORCE_INLINE void serial_echopair_P(const char* s_P, bool v) { serial_echopair_P(s_P, (int)v); }
102
 FORCE_INLINE void serial_echopair_P(const char* s_P, bool v) { serial_echopair_P(s_P, (int)v); }
102
 FORCE_INLINE void serial_echopair_P(const char* s_P, void *v) { serial_echopair_P(s_P, (unsigned long)v); }
103
 FORCE_INLINE void serial_echopair_P(const char* s_P, void *v) { serial_echopair_P(s_P, (unsigned long)v); }

+ 6
- 13
Marlin/Marlin_main.cpp View File

4468
     #endif
4468
     #endif
4469
     #if HOTENDS > 1
4469
     #if HOTENDS > 1
4470
       HOTEND_LOOP() {
4470
       HOTEND_LOOP() {
4471
-        SERIAL_PROTOCOLPGM(" T");
4472
-        SERIAL_PROTOCOL(e);
4471
+        SERIAL_PROTOCOLPAIR(" T", e);
4473
         SERIAL_PROTOCOLCHAR(':');
4472
         SERIAL_PROTOCOLCHAR(':');
4474
         SERIAL_PROTOCOL_F(thermalManager.degHotend(e), 1);
4473
         SERIAL_PROTOCOL_F(thermalManager.degHotend(e), 1);
4475
         SERIAL_PROTOCOLPGM(" /");
4474
         SERIAL_PROTOCOLPGM(" /");
4494
     #endif
4493
     #endif
4495
     #if HOTENDS > 1
4494
     #if HOTENDS > 1
4496
       HOTEND_LOOP() {
4495
       HOTEND_LOOP() {
4497
-        SERIAL_PROTOCOLPGM(" @");
4498
-        SERIAL_PROTOCOL(e);
4496
+        SERIAL_PROTOCOLPAIR(" @", e);
4499
         SERIAL_PROTOCOLCHAR(':');
4497
         SERIAL_PROTOCOLCHAR(':');
4500
         #ifdef EXTRUDER_WATTS
4498
         #ifdef EXTRUDER_WATTS
4501
           SERIAL_PROTOCOL(((EXTRUDER_WATTS) * thermalManager.getHeaterPower(e)) / 127);
4499
           SERIAL_PROTOCOL(((EXTRUDER_WATTS) * thermalManager.getHeaterPower(e)) / 127);
4507
     #endif
4505
     #endif
4508
     #if ENABLED(SHOW_TEMP_ADC_VALUES)
4506
     #if ENABLED(SHOW_TEMP_ADC_VALUES)
4509
       #if HAS_TEMP_BED
4507
       #if HAS_TEMP_BED
4510
-        SERIAL_PROTOCOLPGM("    ADC B:");
4511
-        SERIAL_PROTOCOL_F(thermalManager.degBed(), 1);
4512
-        SERIAL_PROTOCOLPGM("C->");
4513
-        SERIAL_PROTOCOL_F(thermalManager.rawBedTemp() / OVERSAMPLENR, 0);
4508
+        SERIAL_PROTOCOLPAIR("    ADC B:", thermalManager.current_temperature_bed_raw / OVERSAMPLENR);
4514
       #endif
4509
       #endif
4515
       HOTEND_LOOP() {
4510
       HOTEND_LOOP() {
4516
-        SERIAL_PROTOCOLPGM("  T");
4517
-        SERIAL_PROTOCOL(e);
4511
+        SERIAL_PROTOCOLPAIR(" T", e);
4518
         SERIAL_PROTOCOLCHAR(':');
4512
         SERIAL_PROTOCOLCHAR(':');
4519
-        SERIAL_PROTOCOL_F(thermalManager.degHotend(e), 1);
4520
-        SERIAL_PROTOCOLPGM("C->");
4521
-        SERIAL_PROTOCOL_F(thermalManager.rawHotendTemp(e) / OVERSAMPLENR, 0);
4513
+        SERIAL_PROTOCOL(thermalManager.current_temperature_raw[e] / OVERSAMPLENR);
4522
       }
4514
       }
4523
     #endif
4515
     #endif
4516
+    SERIAL_EOL;
4524
   }
4517
   }
4525
 #endif
4518
 #endif
4526
 
4519
 

+ 1
- 1
Marlin/temperature.h View File

40
 #endif
40
 #endif
41
 
41
 
42
 #if HOTENDS == 1
42
 #if HOTENDS == 1
43
-  #define HOTEND_LOOP() const uint8_t e = 0;
43
+  #define HOTEND_LOOP() const int8_t e = 0;
44
   #define HOTEND_INDEX  0
44
   #define HOTEND_INDEX  0
45
   #define EXTRUDER_IDX  0
45
   #define EXTRUDER_IDX  0
46
 #else
46
 #else

Loading…
Cancel
Save