more code editing

This commit is contained in:
NotaRobotexe 2019-07-04 15:31:44 +02:00
parent 1f9dce9513
commit a1a8945bee
5 changed files with 7 additions and 5 deletions

View File

@ -73,7 +73,6 @@ void eeprom_init()
{
eeprom_write(&(EEPROM_Sheets_base->s[i].name[0]), static_cast<char>(i + '1'));
eeprom_write(&(EEPROM_Sheets_base->s[i].name[1]), '\0');
//eeprom_write_word(reinterpret_cast<uint16_t *>(&(EEPROM_Sheets_base->s[i].z_offset)),0); //TODO: nedavat dalsi
}
}
check_babystep();

View File

@ -187,8 +187,7 @@ void menu_format_sheet_E(const Sheet &sheet_E, SheetFormatBuffer &buffer)
uint_least8_t index = sprintf_P(buffer.c, PSTR("%.10S "), _T(MSG_SHEET));
eeprom_read_block(&(buffer.c[index]), sheet_E.name, 7);
//index += 7;
buffer.c[index + 7] = '\0'; // tohle vyjde vyrazne lepe, nez inkrementovat promennou index - o celych 12B kratsi
// compiler totiz pochopi, ze tu promennou nechci, cili si ji necha v registru
buffer.c[index + 7] = '\0';
}
static void menu_draw_item_puts_E(char type_char, const Sheet &sheet)

View File

@ -128,3 +128,5 @@ const char MSG_POWERUP[] PROGMEM_N1 = "PowerUp"; ////
const char MSG_ERR_STOPPED[] PROGMEM_N1 = "Printer stopped due to errors. Fix the error and use M999 to restart. (Temperature is reset. Set it after restarting)"; ////
const char MSG_ENDSTOP_HIT[] PROGMEM_N1 = "TRIGGERED"; ////
const char MSG_V2_CALIBRATION[] PROGMEM_N1 = "First layer cal."; ////c=17 r=1
const char MSG_SELECT[] PROGMEM_N1 = "Select"; ////
const char MSG_RENAME[] PROGMEM_N1 = "Rename"; ////

View File

@ -129,6 +129,8 @@ extern const char MSG_ENDSTOP_HIT[];
extern const char MSG_EJECT_FILAMENT[];
extern const char MSG_CUT_FILAMENT[];
extern const char MSG_V2_CALIBRATION[];
extern const char MSG_SELECT[];
extern const char MSG_RENAME[];
#if defined(__cplusplus)
}

View File

@ -6387,8 +6387,8 @@ static void lcd_sheet_menu()
{
MENU_BEGIN();
MENU_ITEM_BACK_P(_T(MSG_MAIN));
MENU_ITEM_SUBMENU_P(_i("Select"), lcd_select_sheet_menu); //// c=18
MENU_ITEM_SUBMENU_P(_i("Rename"), lcd_rename_sheet_menu); //// c=18
MENU_ITEM_SUBMENU_P(_T(MSG_SELECT), lcd_select_sheet_menu); //// c=18
MENU_ITEM_SUBMENU_P(_T(MSG_RENAME), lcd_rename_sheet_menu); //// c=18
MENU_ITEM_SUBMENU_P(_T(MSG_V2_CALIBRATION), lcd_v2_calibration); ////MSG_V2_CALIBRATION c=17 r=1
MENU_END();