Pickup stragglers
This commit is contained in:
parent
322a77bfe4
commit
3b15b0aeef
3 changed files with 10 additions and 0 deletions
|
|
@ -71,6 +71,11 @@ void StartupSdManager::update() {
|
||||||
bool mounted = mountPreferred(false);
|
bool mounted = mountPreferred(false);
|
||||||
if (!mounted && (uint32_t)(now - lastFullScanMs_) >= cfg_.fullScanIntervalMs) {
|
if (!mounted && (uint32_t)(now - lastFullScanMs_) >= cfg_.fullScanIntervalMs) {
|
||||||
lastFullScanMs_ = now;
|
lastFullScanMs_ = now;
|
||||||
|
if (cfg_.recoveryRailCycleOnFullScan) {
|
||||||
|
logf("Watcher: recovery rail cycle before full scan");
|
||||||
|
cycleSdRail(cfg_.recoveryRailOffMs, cfg_.recoveryRailOnSettleMs);
|
||||||
|
delay(150);
|
||||||
|
}
|
||||||
logf("Watcher: preferred probe failed, running full scan");
|
logf("Watcher: preferred probe failed, running full scan");
|
||||||
mounted = mountCardFullScan();
|
mounted = mountCardFullScan();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,9 @@ using SdStatusCallback = void (*)(SdEvent event, const char* message);
|
||||||
struct SdWatcherConfig {
|
struct SdWatcherConfig {
|
||||||
bool enableSdRailCycle = true;
|
bool enableSdRailCycle = true;
|
||||||
bool enablePinDumps = true;
|
bool enablePinDumps = true;
|
||||||
|
bool recoveryRailCycleOnFullScan = true;
|
||||||
|
uint32_t recoveryRailOffMs = 250;
|
||||||
|
uint32_t recoveryRailOnSettleMs = 700;
|
||||||
uint32_t startupWarmupMs = 1500;
|
uint32_t startupWarmupMs = 1500;
|
||||||
uint32_t pollIntervalAbsentMs = 1000;
|
uint32_t pollIntervalAbsentMs = 1000;
|
||||||
uint32_t pollIntervalMountedMs = 2000;
|
uint32_t pollIntervalMountedMs = 2000;
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,8 @@ Exercise 06: RTC check (PCF8563) read/set and persistence validation
|
||||||
|
|
||||||
Exercise 07: SD startup watcher library harness with hot-insert detection
|
Exercise 07: SD startup watcher library harness with hot-insert detection
|
||||||
|
|
||||||
|
Exercise 08: SystemStartup package scaffold (shared begin/update API)
|
||||||
|
|
||||||
Each exercise is self-contained:
|
Each exercise is self-contained:
|
||||||
|
|
||||||
its own platformio.ini
|
its own platformio.ini
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue