mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-27 02:58:31 -04:00
DataFlash: don't try to write if no card inserted
This commit is contained in:
parent
ddfcafe80f
commit
310a5a6be1
@ -33,6 +33,9 @@ void DataFlash_Block::FinishWrite(void)
|
||||
|
||||
void DataFlash_Block::WriteBlock(const void *pBuffer, uint16_t size)
|
||||
{
|
||||
if (!CardInserted()) {
|
||||
return;
|
||||
}
|
||||
while (size > 0) {
|
||||
uint16_t n = df_PageSize - df_BufferIdx;
|
||||
if (n > size) {
|
||||
|
Loading…
Reference in New Issue
Block a user