Clean up the code a bit

This commit is contained in:
João Brázio
2016-03-10 11:52:43 +00:00
parent 986b508ff7
commit 793cd0ae3b
3 changed files with 9 additions and 10 deletions

View File

@ -3837,7 +3837,7 @@ inline void gcode_M104() {
// Detect if a print job has finished.
// When the target temperature for all extruders is zero then we must have
// finished printing.
if( print_job_start_ms != 0 ) {
if (print_job_start_ms) {
bool all_extruders_cooling = true;
for (int i = 0; i < EXTRUDERS; i++) if( degTargetHotend(i) > 0 ) {
all_extruders_cooling = false;
@ -3957,7 +3957,6 @@ inline void gcode_M105() {
* Rxxx Wait for extruder(s) to reach temperature. Waits when heating and cooling.
*/
inline void gcode_M109() {
float temp;
bool no_wait_for_cooling = true;
if (setTargetedHotend(109)) return;
@ -3965,16 +3964,16 @@ inline void gcode_M109() {
no_wait_for_cooling = code_seen('S');
if (no_wait_for_cooling || code_seen('R')) {
temp = code_value();
float temp = code_value();
setTargetHotend(temp, target_extruder);
#if ENABLED(DUAL_X_CARRIAGE)
if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && target_extruder == 0)
setTargetHotend1(temp == 0.0 ? 0.0 : temp + duplicate_extruder_temp_offset);
#endif
}
// Only makes sense to show the heating message if we're in fact heating.
if( temp > 0 ) LCD_MESSAGEPGM(MSG_HEATING);
// Only makes sense to show the heating message if we're in fact heating.
if (temp > 0) LCD_MESSAGEPGM(MSG_HEATING);
}
#if ENABLED(AUTOTEMP)
autotemp_enabled = code_seen('F');