saving skew to eeprom prior orthogonalizing
This commit is contained in:
parent
d56db4638c
commit
881a055a41
|
|
@ -48,6 +48,7 @@
|
|||
#define EEPROM_BOWDEN_LENGTH (EEPROM_TEMP_CAL_ACTIVE - 2*4) //4 x int for bowden lengths for multimaterial
|
||||
#define EEPROM_CALIBRATION_STATUS_PINDA (EEPROM_BOWDEN_LENGTH - 1) //0 - not calibrated; 1 - calibrated
|
||||
#define EEPROM_SD_SORT (EEPROM_CALIBRATION_STATUS_PINDA - 1) //0 -time, 1-alpha, 2-none
|
||||
#define EEPROM_XYZ_CAL_SKEW (EEPROM_SD_SORT - 4)
|
||||
|
||||
// Currently running firmware, each digit stored as uint16_t.
|
||||
// The flavor differentiates a dev, alpha, beta, release candidate or a release version.
|
||||
|
|
|
|||
|
|
@ -331,7 +331,6 @@ extern bool mesh_bed_leveling_flag;
|
|||
extern bool mesh_bed_run_from_menu;
|
||||
|
||||
extern float distance_from_min[3];
|
||||
extern float angleDiff;
|
||||
|
||||
extern bool sortAlpha;
|
||||
|
||||
|
|
|
|||
|
|
@ -287,7 +287,6 @@ unsigned int custom_message_state;
|
|||
char snmm_filaments_used = 0;
|
||||
|
||||
float distance_from_min[3];
|
||||
float angleDiff;
|
||||
|
||||
bool sortAlpha = false;
|
||||
|
||||
|
|
|
|||
|
|
@ -143,6 +143,7 @@ BedSkewOffsetDetectionResultType calculate_machine_skew_and_offset_LS(
|
|||
int8_t verbosity_level
|
||||
)
|
||||
{
|
||||
float angleDiff;
|
||||
if (verbosity_level >= 10) {
|
||||
SERIAL_ECHOLNPGM("calculate machine skew and offset LS");
|
||||
|
||||
|
|
@ -317,6 +318,8 @@ BedSkewOffsetDetectionResultType calculate_machine_skew_and_offset_LS(
|
|||
BedSkewOffsetDetectionResultType result = BED_SKEW_OFFSET_DETECTION_PERFECT;
|
||||
{
|
||||
angleDiff = fabs(a2 - a1);
|
||||
eeprom_update_float((float*)(EEPROM_XYZ_CAL_SKEW), angleDiff);
|
||||
|
||||
if (angleDiff > bed_skew_angle_mild)
|
||||
result = (angleDiff > bed_skew_angle_extreme) ?
|
||||
BED_SKEW_OFFSET_DETECTION_SKEW_EXTREME :
|
||||
|
|
@ -2478,7 +2481,7 @@ void count_xyz_details() {
|
|||
a1 = asin(vec_x[1] / MACHINE_AXIS_SCALE_X);
|
||||
/* MYSERIAL.println(vec_x[1]);
|
||||
MYSERIAL.println(a1);*/
|
||||
angleDiff = fabs(a2 - a1);
|
||||
//angleDiff = fabs(a2 - a1);
|
||||
for (uint8_t mesh_point = 0; mesh_point < 3; ++mesh_point) {
|
||||
float y = vec_x[1] * pgm_read_float(bed_ref_points + mesh_point * 2) + vec_y[1] * pgm_read_float(bed_ref_points + mesh_point * 2 + 1) + cntr[1];
|
||||
distance_from_min[mesh_point] = (y - Y_MIN_POS_CALIBRATION_POINT_OUT_OF_REACH);
|
||||
|
|
|
|||
|
|
@ -1348,8 +1348,11 @@ static void lcd_move_e()
|
|||
}
|
||||
|
||||
void lcd_service_mode_show_result() {
|
||||
float angleDiff;
|
||||
lcd_set_custom_characters_degree();
|
||||
count_xyz_details();
|
||||
angleDiff = eeprom_read_float((float*)(EEPROM_XYZ_CAL_SKEW));
|
||||
|
||||
lcd_update_enable(false);
|
||||
lcd_implementation_clear();
|
||||
lcd_printPGM(MSG_Y_DISTANCE_FROM_MIN);
|
||||
|
|
|
|||
Loading…
Reference in New Issue