Merge pull request #2040 from NotaRobotexe/MK3

multiple sheets - menu switching bug
This commit is contained in:
DRracer 2019-07-25 09:56:07 +02:00 committed by GitHub
commit 2820baf016
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6493,7 +6493,7 @@ static void change_sheet()
}
static void change_sheet_from_menu(){
uint8_t next_sheet = selected_sheet+1;
uint8_t next_sheet = eeprom_read_byte(&(EEPROM_Sheets_base->active_sheet))+1;
while(true){
if(next_sheet > 2) next_sheet = 0;
if(is_sheet_initialized(next_sheet)){
@ -6745,7 +6745,7 @@ static void lcd_main_menu()
if(!isPrintPaused && !IS_SD_PRINTING && !is_usb_printing && (lcd_commands_type != LcdCommands::Layer1Cal))
{
MENU_ITEM_SUBMENU_SELECT_SHEET_E(EEPROM_Sheets_base->s[selected_sheet], change_sheet_from_menu);
MENU_ITEM_SUBMENU_SELECT_SHEET_E(EEPROM_Sheets_base->s[eeprom_read_byte(&(EEPROM_Sheets_base->active_sheet))], change_sheet_from_menu);
}
if (!is_usb_printing && (lcd_commands_type != LcdCommands::Layer1Cal))