Update temperature types

This commit is contained in:
Scott Lahteine
2021-04-23 19:14:49 -05:00
parent 51a61c5431
commit 72e3d2492f
16 changed files with 88 additions and 76 deletions

View File

@ -110,7 +110,7 @@ void GcodeSuite::G76() {
return false;
};
auto g76_probe = [](const TempSensorID sid, uint16_t &targ, const xy_pos_t &nozpos) {
auto g76_probe = [](const TempSensorID sid, celsius_t &targ, const xy_pos_t &nozpos) {
do_z_clearance(5.0); // Raise nozzle before probing
const float measured_z = probe.probe_at_point(nozpos, PROBE_PT_STOW, 0, false); // verbose=0, probe_relative=false
if (isnan(measured_z))
@ -170,14 +170,14 @@ void GcodeSuite::G76() {
// Report temperatures every second and handle heating timeouts
millis_t next_temp_report = millis() + 1000;
auto report_targets = [&](const uint16_t tb, const uint16_t tp) {
auto report_targets = [&](const celsius_t tb, const celsius_t tp) {
SERIAL_ECHOLNPAIR("Target Bed:", tb, " Probe:", tp);
};
if (do_bed_cal) {
uint16_t target_bed = cali_info_init[TSI_BED].start_temp,
target_probe = temp_comp.bed_calib_probe_temp;
celsius_t target_bed = cali_info_init[TSI_BED].start_temp,
target_probe = temp_comp.bed_calib_probe_temp;
say_waiting_for(); SERIAL_ECHOLNPGM(" cooling.");
while (thermalManager.degBed() > target_bed || thermalManager.degProbe() > target_probe)
@ -236,10 +236,10 @@ void GcodeSuite::G76() {
do_blocking_move_to(parkpos);
// Initialize temperatures
const uint16_t target_bed = temp_comp.probe_calib_bed_temp;
const celsius_t target_bed = temp_comp.probe_calib_bed_temp;
thermalManager.setTargetBed(target_bed);
uint16_t target_probe = cali_info_init[TSI_PROBE].start_temp;
celsius_t target_probe = cali_info_init[TSI_PROBE].start_temp;
report_targets(target_bed, target_probe);