mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
Flashfs: Missed calculation of the header crc for monolitihic write
This commit is contained in:
parent
84dd1dbc40
commit
85bfa7dcf9
@ -249,6 +249,7 @@ int32_t PIOS_FLASHFS_ObjSave(UAVObjHandle obj, uint16_t instId, uint8_t * data)
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Update CRC
|
// Update CRC
|
||||||
|
crc = PIOS_CRC_updateCRC(0, (uint8_t *) &header, sizeof(header));
|
||||||
crc = PIOS_CRC_updateCRC(crc, (uint8_t *) data, UAVObjGetNumBytes(obj));
|
crc = PIOS_CRC_updateCRC(crc, (uint8_t *) data, UAVObjGetNumBytes(obj));
|
||||||
|
|
||||||
if(PIOS_Flash_Jedec_EraseSector(addr) != 0)
|
if(PIOS_Flash_Jedec_EraseSector(addr) != 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user