Skip to content

Commit ec714f6

Browse files
committed
Add a check for an unmounted (but not removed) SD card
1 parent a4dca6b commit ec714f6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Firmware/RTK_Everywhere/GNSS_Mosaic.ino

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2610,7 +2610,7 @@ void GNSS_MOSAIC::update()
26102610
{
26112611
updateSD(); // Check if the card has been removed / inserted
26122612

2613-
if (_diskStatusSeen) // Check if the DiskStatus SBF message has been processed
2613+
if (_diskStatusSeen) // Check if the DiskStatus SBF message has been seen
26142614
{
26152615
// If previousFreeSpace hasn't been initialized, initialize it
26162616
if (previousFreeSpace == 0)
@@ -2637,6 +2637,12 @@ void GNSS_MOSAIC::update()
26372637
previousFreeSpace = sdFreeSpace;
26382638
}
26392639
}
2640+
else
2641+
{
2642+
// Disk status not seen
2643+
// (Unmounting the SD card will prevent _diskStatusSeen from going true)
2644+
logIncreasing = false;
2645+
}
26402646

26412647
sdCardSizeLastCheck = millis(); // Update the timer
26422648
_diskStatusSeen = false; // Clear the flag

0 commit comments

Comments
 (0)