Browse Source

Show ADC values inline rather than after

Scott Lahteine 9 years ago
parent
commit
74df828acc
1 changed files with 12 additions and 11 deletions
  1. 12
    11
      Marlin/Marlin_main.cpp

+ 12
- 11
Marlin/Marlin_main.cpp View File

@@ -4459,12 +4459,20 @@ inline void gcode_M104() {
4459 4459
       SERIAL_PROTOCOL_F(thermalManager.degHotend(target_extruder), 1);
4460 4460
       SERIAL_PROTOCOLPGM(" /");
4461 4461
       SERIAL_PROTOCOL_F(thermalManager.degTargetHotend(target_extruder), 1);
4462
+      #if ENABLED(SHOW_TEMP_ADC_VALUES)
4463
+        SERIAL_PROTOCOLPAIR(" (", thermalManager.current_temperature_raw[target_extruder] / OVERSAMPLENR);
4464
+        SERIAL_CHAR(')')
4465
+      #endif
4462 4466
     #endif
4463 4467
     #if HAS_TEMP_BED
4464 4468
       SERIAL_PROTOCOLPGM(" B:");
4465 4469
       SERIAL_PROTOCOL_F(thermalManager.degBed(), 1);
4466 4470
       SERIAL_PROTOCOLPGM(" /");
4467 4471
       SERIAL_PROTOCOL_F(thermalManager.degTargetBed(), 1);
4472
+      #if ENABLED(SHOW_TEMP_ADC_VALUES)
4473
+        SERIAL_PROTOCOLPAIR(" (", thermalManager.current_temperature_bed_raw / OVERSAMPLENR);
4474
+        SERIAL_CHAR(')')
4475
+      #endif
4468 4476
     #endif
4469 4477
     #if HOTENDS > 1
4470 4478
       HOTEND_LOOP() {
@@ -4473,6 +4481,10 @@ inline void gcode_M104() {
4473 4481
         SERIAL_PROTOCOL_F(thermalManager.degHotend(e), 1);
4474 4482
         SERIAL_PROTOCOLPGM(" /");
4475 4483
         SERIAL_PROTOCOL_F(thermalManager.degTargetHotend(e), 1);
4484
+        #if ENABLED(SHOW_TEMP_ADC_VALUES)
4485
+          SERIAL_PROTOCOLPAIR(" (", thermalManager.current_temperature_raw[e] / OVERSAMPLENR);
4486
+          SERIAL_CHAR(')')
4487
+        #endif
4476 4488
       }
4477 4489
     #endif
4478 4490
     #if HAS_TEMP_BED
@@ -4503,17 +4515,6 @@ inline void gcode_M104() {
4503 4515
         #endif
4504 4516
       }
4505 4517
     #endif
4506
-    #if ENABLED(SHOW_TEMP_ADC_VALUES)
4507
-      #if HAS_TEMP_BED
4508
-        SERIAL_PROTOCOLPAIR("    ADC B:", thermalManager.current_temperature_bed_raw / OVERSAMPLENR);
4509
-      #endif
4510
-      HOTEND_LOOP() {
4511
-        SERIAL_PROTOCOLPAIR(" T", e);
4512
-        SERIAL_PROTOCOLCHAR(':');
4513
-        SERIAL_PROTOCOL(thermalManager.current_temperature_raw[e] / OVERSAMPLENR);
4514
-      }
4515
-    #endif
4516
-    SERIAL_EOL;
4517 4518
   }
4518 4519
 #endif
4519 4520
 

Loading…
Cancel
Save