Skip to content

Commit

Permalink
[Bouffalolab] Don't factory reset device if reboot with a pending arm…
Browse files Browse the repository at this point in the history
… failsafe (#29146)
  • Loading branch information
wy-hh authored Sep 11, 2023
1 parent ae6aa70 commit c6ef1aa
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/platform/bouffalolab/common/ConfigurationManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ bool ConfigurationManagerImpl::IsFullyProvisioned()
CHIP_ERROR ConfigurationManagerImpl::Init()
{
CHIP_ERROR err;
bool failSafeArmed;
uint32_t rebootCount = 0;

err = Internal::GenericConfigurationManagerImpl<BLConfig>::Init();
Expand All @@ -72,12 +71,6 @@ CHIP_ERROR ConfigurationManagerImpl::Init()
SuccessOrExit(err);
}

// If the fail-safe was armed when the device last shutdown, initiate a factory reset.
if (GetFailSafeArmed(failSafeArmed) == CHIP_NO_ERROR && failSafeArmed)
{
ChipLogProgress(DeviceLayer, "Detected fail-safe armed on reboot; initiating factory reset");
InitiateFactoryReset();
}
err = CHIP_NO_ERROR;

exit:
Expand Down

0 comments on commit c6ef1aa

Please sign in to comment.