this->register_for_event(ON_GCODE_EXECUTE);
this->register_for_event(ON_GCODE_RECEIVED);
this->register_for_event(ON_MAIN_LOOP);
+ this->register_for_event(ON_SECOND_TICK);
}
running_total += last_raw;
return running_total / queue.size();
}
+
+void TemperatureControl::on_second_tick(void* argument)
+{
+ if (waiting)
+ kernel->streams->printf("%s:%3.1f /%3.1f @%d\n", designator.c_str(), get_temperature(), ((target_temperature == UNDEFINED)?0.0:target_temperature), o, waiting);
+}
void on_gcode_execute(void* argument);
void on_gcode_received(void* argument);
void on_config_reload(void* argument);
+ void on_second_tick(void* argument);
+
void set_desired_temperature(double desired_temperature);
double get_temperature();
double adc_value_to_temperature(int adc_value);