diff --git a/temp.c b/temp.c index e7e42f3..ed9a522 100644 --- a/temp.c +++ b/temp.c @@ -315,14 +315,17 @@ void temp_sensor_tick() { sersendf_P(PSTR("\n")); } -/// report whether all temp sensors are reading their target temperatures -/// used for M116 and friends +/** + * Report whether all temp sensors in use are reading their target + * temperatures. Used for M116 and friends. + */ uint8_t temp_achieved() { temp_sensor_t i; uint8_t all_ok = 255; for (i = 0; i < NUM_TEMP_SENSORS; i++) { - if (temp_sensors_runtime[i].temp_residency < (TEMP_RESIDENCY_TIME*100)) + if (temp_sensors_runtime[i].target_temp > 0 && + temp_sensors_runtime[i].temp_residency < (TEMP_RESIDENCY_TIME*100)) all_ok = 0; } return all_ok;