M850 shows active sheet

Prevent sheet being active if not initialized
This commit is contained in:
3d-gussner 2024-01-12 13:41:55 +01:00
parent 8d50d29776
commit f3e5444d47
1 changed files with 7 additions and 3 deletions

View File

@ -7880,7 +7880,7 @@ Sigma_Exit:
Get and Set Sheet parameters
#### Usage
M25 [ S | Z | L | B | P | A ]
M850 [ S | Z | L | B | P | A ]
#### Parameters
- `S` - Sheet id [0-7]
@ -7910,7 +7910,7 @@ Sigma_Exit:
break; // invalid sheet ID
}
} else {
break;
iSel = eeprom_read_byte(&(EEPROM_Sheets_base->active_sheet));
}
if (code_seen('Z')){
@ -7967,7 +7967,11 @@ Sigma_Exit:
if (code_seen('A'))
{
bIsActive |= code_value_uint8() || (eeprom_read_byte(&(EEPROM_Sheets_base->active_sheet)) == iSel);
if(bIsActive) eeprom_update_byte(&EEPROM_Sheets_base->active_sheet, iSel);
if(bIsActive && eeprom_is_sheet_initialized(iSel)) {
eeprom_update_byte(&EEPROM_Sheets_base->active_sheet, iSel);
} else {
bIsActive = 0;
}
}
else
{