mirror of
https://github.com/alexhopeoconnor/firmware.git
synced 2026-10-16 16:41:33 +10:00
add flush to filesystem before closing write file.
This commit is contained in:
@@ -142,12 +142,14 @@ void XModemAdapter::handlePacket(meshtastic_XModem xmodemPacket)
|
||||
case meshtastic_XModem_Control_EOT:
|
||||
// End of transmission
|
||||
sendControl(meshtastic_XModem_Control_ACK);
|
||||
file.flush();
|
||||
file.close();
|
||||
isReceiving = false;
|
||||
break;
|
||||
case meshtastic_XModem_Control_CAN:
|
||||
// Cancel transmission and remove file
|
||||
sendControl(meshtastic_XModem_Control_ACK);
|
||||
file.flush();
|
||||
file.close();
|
||||
FSCom.remove(filename);
|
||||
isReceiving = false;
|
||||
|
||||
Reference in New Issue
Block a user