Further reduction when HOTENDS == 1

This commit is contained in:
Scott Lahteine
2016-07-09 21:11:17 -07:00
parent 3e1bbd5e27
commit ee0983ab57
5 changed files with 72 additions and 62 deletions

View File

@ -4365,7 +4365,7 @@ inline void gcode_M104() {
SERIAL_PROTOCOL_F(thermalManager.degTargetBed(), 1);
#endif
#if HOTENDS > 1
for (int8_t e = 0; e < HOTENDS; ++e) {
HOTEND_LOOP() {
SERIAL_PROTOCOLPGM(" T");
SERIAL_PROTOCOL(e);
SERIAL_PROTOCOLCHAR(':');
@ -4391,7 +4391,7 @@ inline void gcode_M104() {
SERIAL_PROTOCOL(thermalManager.getHeaterPower(target_extruder));
#endif
#if HOTENDS > 1
for (int8_t e = 0; e < HOTENDS; ++e) {
HOTEND_LOOP() {
SERIAL_PROTOCOLPGM(" @");
SERIAL_PROTOCOL(e);
SERIAL_PROTOCOLCHAR(':');
@ -4410,13 +4410,13 @@ inline void gcode_M104() {
SERIAL_PROTOCOLPGM("C->");
SERIAL_PROTOCOL_F(thermalManager.rawBedTemp() / OVERSAMPLENR, 0);
#endif
for (int8_t cur_hotend = 0; cur_hotend < HOTENDS; ++cur_hotend) {
HOTEND_LOOP() {
SERIAL_PROTOCOLPGM(" T");
SERIAL_PROTOCOL(cur_hotend);
SERIAL_PROTOCOL(e);
SERIAL_PROTOCOLCHAR(':');
SERIAL_PROTOCOL_F(thermalManager.degHotend(cur_hotend), 1);
SERIAL_PROTOCOL_F(thermalManager.degHotend(e), 1);
SERIAL_PROTOCOLPGM("C->");
SERIAL_PROTOCOL_F(thermalManager.rawHotendTemp(cur_hotend) / OVERSAMPLENR, 0);
SERIAL_PROTOCOL_F(thermalManager.rawHotendTemp(e) / OVERSAMPLENR, 0);
}
#endif
}
@ -5436,7 +5436,7 @@ inline void gcode_M206() {
SERIAL_ECHO_START;
SERIAL_ECHOPGM(MSG_HOTEND_OFFSET);
for (int e = 0; e < HOTENDS; e++) {
HOTEND_LOOP() {
SERIAL_CHAR(' ');
SERIAL_ECHO(hotend_offset[X_AXIS][e]);
SERIAL_CHAR(',');
@ -7968,8 +7968,9 @@ void prepare_move_to_destination() {
float max_temp = 0.0;
if (ELAPSED(millis(), next_status_led_update_ms)) {
next_status_led_update_ms += 500; // Update every 0.5s
for (int8_t cur_hotend = 0; cur_hotend < HOTENDS; ++cur_hotend)
max_temp = max(max(max_temp, thermalManager.degHotend(cur_hotend)), thermalManager.degTargetHotend(cur_hotend));
HOTEND_LOOP() {
max_temp = max(max(max_temp, thermalManager.degHotend(e)), thermalManager.degTargetHotend(e));
}
#if HAS_TEMP_BED
max_temp = max(max(max_temp, thermalManager.degTargetBed()), thermalManager.degBed());
#endif