Fix xflash flashing

This commit is contained in:
Alex Voinea 2022-08-06 19:42:20 +03:00 committed by D.R.racer
parent 53e2d68183
commit bc85a41059
2 changed files with 7 additions and 9 deletions

View File

@ -1059,12 +1059,6 @@ void setup()
fdev_setup_stream(uartout, uart_putchar, NULL, _FDEV_SETUP_WRITE); //setup uart out stream
stdout = uartout;
if (eeprom_read_byte((uint8_t *)EEPROM_MMU_ENABLED))
{
MMU2::mmu2.Start();
}
#ifdef XFLASH
bool xflash_success = xflash_init();
uint8_t optiboot_status = 1;
@ -1122,6 +1116,10 @@ void setup()
SERIAL_ECHO_START;
puts_P(PSTR(" " FW_VERSION_FULL));
if (eeprom_read_byte((uint8_t *)EEPROM_MMU_ENABLED)) {
MMU2::mmu2.Start();
}
//SERIAL_ECHOPAIR("Active sheet before:", static_cast<unsigned long int>(eeprom_read_byte(&(EEPROM_Sheets_base->active_sheet))));
#ifdef DEBUG_SEC_LANG

View File

@ -113,9 +113,7 @@ MMU2::MMU2()
, unloadFilamentStarted(false)
, loadingToNozzle(false)
, inAutoRetry(false)
{
ResetRetryAttempts();
}
{}
void MMU2::Start() {
#ifdef MMU_HWRESET
@ -135,6 +133,8 @@ void MMU2::Start() {
// start the communication
logic.Start();
ResetRetryAttempts();
}
void MMU2::Stop() {