Split lcd_service_mode_show_result screens to separate functions. Make them non blocking. Remove global array distance_from_min, pass it as function return value. Make Support submenus returning to Support menu.
This commit is contained in:
parent
cbbedfa96c
commit
ae08788c99
6 changed files with 65 additions and 66 deletions
Firmware
|
@ -2960,8 +2960,8 @@ void babystep_reset()
|
|||
babystepLoadZ = 0;
|
||||
}
|
||||
|
||||
void count_xyz_details() {
|
||||
float a1, a2;
|
||||
DistanceMin count_xyz_details() {
|
||||
DistanceMin distanceMin;
|
||||
float cntr[2] = {
|
||||
eeprom_read_float((float*)(EEPROM_BED_CALIBRATION_CENTER + 0)),
|
||||
eeprom_read_float((float*)(EEPROM_BED_CALIBRATION_CENTER + 4))
|
||||
|
@ -2974,12 +2974,15 @@ void count_xyz_details() {
|
|||
eeprom_read_float((float*)(EEPROM_BED_CALIBRATION_VEC_Y + 0)),
|
||||
eeprom_read_float((float*)(EEPROM_BED_CALIBRATION_VEC_Y + 4))
|
||||
};
|
||||
#if 0
|
||||
a2 = -1 * asin(vec_y[0] / MACHINE_AXIS_SCALE_Y);
|
||||
a1 = asin(vec_x[1] / MACHINE_AXIS_SCALE_X);
|
||||
//angleDiff = fabs(a2 - a1);
|
||||
angleDiff = fabs(a2 - a1);
|
||||
#endif
|
||||
for (uint8_t mesh_point = 0; mesh_point < 2; ++mesh_point) {
|
||||
float y = vec_x[1] * pgm_read_float(bed_ref_points_4 + mesh_point * 2) + vec_y[1] * pgm_read_float(bed_ref_points_4 + mesh_point * 2 + 1) + cntr[1];
|
||||
distance_from_min[mesh_point] = (y - Y_MIN_POS_CALIBRATION_POINT_OUT_OF_REACH);
|
||||
distanceMin.d[mesh_point] = (y - Y_MIN_POS_CALIBRATION_POINT_OUT_OF_REACH);
|
||||
}
|
||||
return distanceMin;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue