From 74a1c9341b5a3b38ede42667b68e7f93c15d0204 Mon Sep 17 00:00:00 2001 From: Marek Bel Date: Tue, 1 Oct 2019 22:57:59 +0200 Subject: [PATCH] Revert "Use content supplied strings for lcd_first_layer_calibration_reset(), as we have translations prepared for release. It will be reverted later to show current Z offset." This reverts commit ca9ef3aba123e45b792bddc4eace803ffedfd455. --- Firmware/ultralcd.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index 9f498e01..0630eb7c 100755 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -4777,10 +4777,10 @@ void lcd_toshiba_flash_air_compatibility_toggle() //! //! @code{.unparsed} //! |01234567890123456789| -//! |[Smooth1]Live adj. Z| c=11 -//! |value set, continue | c=20 -//! |or start from zero? | c=20 -//! |>Continue Reset | c=a, c=b, a+b = 18 +//! |Sheet Smooth1 actual| c=a, c=b, a+b = 13 +//! |Z offset: -1.480 mm | c=a, c=b, a+b = 14 +//! |>Continue | c=19 +//! | Start from zero | c=19 //! ---------------------- //! @endcode void lcd_first_layer_calibration_reset() @@ -4818,8 +4818,9 @@ void lcd_first_layer_calibration_reset() char sheet_name[sizeof(Sheet::name)]; eeprom_read_block(sheet_name, &EEPROM_Sheets_base->s[(eeprom_read_byte(&(EEPROM_Sheets_base->active_sheet)))].name, sizeof(Sheet::name)); lcd_set_cursor(0, 0); - lcd_printf_P(_i("[%.7s]Live adj. Z\nvalue set, continue\nor start from zero?\n%cContinue%cReset"), //// \n denotes line break, %.7s is replaced by 7 character long sheet name, %+1.3f is replaced by 6 character long floating point number, %c is replaced by > or white space (one character) based on whether first or second option is selected. % denoted place holders can not be reordered. r=4 - sheet_name, menuData->reset ? ' ' : '>', menuData->reset ? '>' : ' '); + float offset = static_cast(eeprom_read_word(reinterpret_cast(&EEPROM_Sheets_base->s[(eeprom_read_byte(&(EEPROM_Sheets_base->active_sheet)))].z_offset)))/cs.axis_steps_per_unit[Z_AXIS]; + lcd_printf_P(_i("Sheet %.7s actual\nZ offset: %+1.3f mm\n%cContinue\n%cStart from zero"), //// \n denotes line break, %.7s is replaced by 7 character long sheet name, %+1.3f is replaced by 6 character long floating point number, %c is replaced by > or white space (one character) based on whether first or second option is selected. % denoted place holders can not be reordered. r=4 + sheet_name, offset, menuData->reset ? ' ' : '>', menuData->reset ? '>' : ' '); }