Browse Source

Tweak M105 layout

Scott Lahteine 4 years ago
parent
commit
faacfe13c2
1 changed files with 10 additions and 7 deletions
  1. 10
    7
      Marlin/src/gcode/temperature/M105.cpp

+ 10
- 7
Marlin/src/gcode/temperature/M105.cpp View File

31
   const int8_t target_extruder = get_target_extruder_from_command();
31
   const int8_t target_extruder = get_target_extruder_from_command();
32
   if (target_extruder < 0) return;
32
   if (target_extruder < 0) return;
33
 
33
 
34
+  SERIAL_ECHOPGM(MSG_OK);
35
+
34
   #if HAS_TEMP_SENSOR
36
   #if HAS_TEMP_SENSOR
35
-    SERIAL_ECHOPGM(MSG_OK);
37
+
36
     thermalManager.print_heater_states(target_extruder
38
     thermalManager.print_heater_states(target_extruder
37
       #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT)
39
       #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT)
38
         , parser.boolval('R')
40
         , parser.boolval('R')
39
       #endif
41
       #endif
40
     );
42
     );
41
-  #else // !HAS_TEMP_SENSOR
42
-    // Hosts such as printrun send M105 to check if firmware is responding.
43
-    SERIAL_ECHOPGM(MSG_OK);
44
-    SERIAL_ECHOPGM(" T:0");
45
-  #endif
46
 
43
 
47
-  SERIAL_EOL();
44
+    SERIAL_EOL();
45
+
46
+  #else
47
+
48
+    SERIAL_ECHOLNPGM(" T:0"); // Some hosts send M105 to test the serial connection
49
+
50
+  #endif
48
 }
51
 }

Loading…
Cancel
Save