Fit RAK4631 Full OTA image by reusing regulator recovery code

This commit is contained in:
mikecarper committed 2026-10-18 23:48:07 -07:00
1 parent e8d1e537e4
commit f7b5c40c3b
5 files changed
+32 -16

No files matched your search

+4 -6
View File
@@ -300,12 +300,10 @@ bool handleRegulatorCommand(const char* command, char* reply, size_t capacity) {
}
void markRegulatorCleanReset() {
if (initialized) recovery().markCleanReset();
else {
RecoveryPolicy policy(platformRecoveryRecord());
policy.begin(ResetKind::Intentional, 0);
policy.markCleanReset();
}
// Early resets still initialize the retained record, using the same policy
// object as normal startup instead of constructing another on the stack.
if (!initialized) recovery().begin(ResetKind::Intentional, 0);
recovery().markCleanReset();
}
void resumeRegulatorRecovery() {