New ML support - lcd optimalization
lcd_menu_xyz_y_min lcd_menu_xyz_skew
This commit is contained in:
parent
30a7530b47
commit
4a659ed86a
1 changed files with 50 additions and 35 deletions
|
@ -2223,21 +2223,31 @@ static void lcd_move_e()
|
||||||
*/
|
*/
|
||||||
static void lcd_menu_xyz_y_min()
|
static void lcd_menu_xyz_y_min()
|
||||||
{
|
{
|
||||||
lcd.setCursor(0,0);
|
//|01234567890123456789|
|
||||||
lcd_printPGM(_i("Y distance from min:"));////MSG_Y_DISTANCE_FROM_MIN c=20 r=1
|
//|Y distance from min:|
|
||||||
lcd_print_at_PGM(0, 1, separator);
|
//|--------------------|
|
||||||
lcd_print_at_PGM(0, 2, _i("Left:"));////MSG_LEFT c=12 r=1
|
//|Left: N/A |
|
||||||
lcd_print_at_PGM(0, 3, _i("Right:"));////MSG_RIGHT c=12 r=1
|
//|Right: N/A |
|
||||||
|
//----------------------
|
||||||
float distanceMin[2];
|
float distanceMin[2];
|
||||||
count_xyz_details(distanceMin);
|
count_xyz_details(distanceMin);
|
||||||
|
lcd_printf_P(_N(
|
||||||
for (int i = 0; i < 2; i++) {
|
ESC_H(0,0)
|
||||||
if(distanceMin[i] < 200) {
|
"%S:\n"
|
||||||
lcd_print_at_PGM(11, i + 2, PSTR(""));
|
"%S\n"
|
||||||
lcd.print(distanceMin[i]);
|
"%S:\n"
|
||||||
lcd_print_at_PGM((distanceMin[i] < 0) ? 17 : 16, i + 2, PSTR("mm"));
|
"%S:"
|
||||||
} else lcd_print_at_PGM(11, i + 2, PSTR("N/A"));
|
),
|
||||||
|
_i("Y distance from min"),
|
||||||
|
separator,
|
||||||
|
_i("Left"),
|
||||||
|
_i("Right")
|
||||||
|
);
|
||||||
|
for (uint8_t i = 0; i < 2; i++)
|
||||||
|
{
|
||||||
|
lcd.setCursor(11,2+i);
|
||||||
|
if (distanceMin[i] >= 200) lcd_puts_P(_N("N/A"));
|
||||||
|
else lcd_printf_P(_N("%6.2fmm"), distanceMin[i]);
|
||||||
}
|
}
|
||||||
if (lcd_clicked())
|
if (lcd_clicked())
|
||||||
{
|
{
|
||||||
|
@ -2247,28 +2257,33 @@ static void lcd_menu_xyz_y_min()
|
||||||
/**
|
/**
|
||||||
* @brief Show measured axis skewness
|
* @brief Show measured axis skewness
|
||||||
*/
|
*/
|
||||||
|
float _deg(float rad)
|
||||||
|
{
|
||||||
|
return rad * 180 / M_PI;
|
||||||
|
}
|
||||||
|
|
||||||
static void lcd_menu_xyz_skew()
|
static void lcd_menu_xyz_skew()
|
||||||
{
|
{
|
||||||
float angleDiff;
|
//|01234567890123456789|
|
||||||
angleDiff = eeprom_read_float((float*)(EEPROM_XYZ_CAL_SKEW));
|
//|Measured skew: N/A |
|
||||||
|
//|--------------------|
|
||||||
lcd.setCursor(0,0);
|
//|Slight skew: 0.12°|
|
||||||
lcd_printPGM(_i("Measured skew:"));////MSG_MEASURED_SKEW c=15 r=1
|
//|Severe skew: 0.25°|
|
||||||
if (angleDiff < 100) {
|
//----------------------
|
||||||
lcd.setCursor(15, 0);
|
float angleDiff = eeprom_read_float((float*)(EEPROM_XYZ_CAL_SKEW));
|
||||||
lcd.print(angleDiff * 180 / M_PI);
|
lcd_printf_P(_N(
|
||||||
lcd.print(LCD_STR_DEGREE);
|
ESC_H(0,0)
|
||||||
}else lcd_print_at_PGM(16, 0, PSTR("N/A"));
|
"%S: N/A\n"
|
||||||
lcd_print_at_PGM(0, 1, separator);
|
"%S\n"
|
||||||
lcd_print_at_PGM(0, 2, _i("Slight skew:"));////MSG_SLIGHT_SKEW c=15 r=1
|
"%S: %5.2f\x01\n"
|
||||||
lcd_print_at_PGM(15, 2, PSTR(""));
|
"%S: %5.2f\x01"
|
||||||
lcd.print(bed_skew_angle_mild * 180 / M_PI);
|
),
|
||||||
lcd.print(LCD_STR_DEGREE);
|
_i("Measured skew"),
|
||||||
lcd_print_at_PGM(0, 3, _i("Severe skew:"));////MSG_SEVERE_SKEW c=15 r=1
|
separator,
|
||||||
lcd_print_at_PGM(15, 3, PSTR(""));
|
_i("Slight skew"), _deg(bed_skew_angle_mild),
|
||||||
lcd.print(bed_skew_angle_extreme * 180 / M_PI);
|
_i("Severe skew"), _deg(bed_skew_angle_extreme)
|
||||||
lcd.print(LCD_STR_DEGREE);
|
);
|
||||||
|
if (angleDiff < 100) lcd_printf_P(_N(ESC_H(15,0)"%4.2f\x01"), _deg(angleDiff));
|
||||||
if (lcd_clicked())
|
if (lcd_clicked())
|
||||||
{
|
{
|
||||||
lcd_goto_menu(lcd_menu_xyz_offset);
|
lcd_goto_menu(lcd_menu_xyz_offset);
|
||||||
|
|
Loading…
Reference in a new issue