mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-29 07:24:13 +01:00
CC-15 Settings: Delete settings from flash chip (hacky sector based saving)
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2663 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
97acaa2402
commit
8b2034ea05
@ -836,6 +836,15 @@ int32_t UAVObjLoad(UAVObjHandle obj, uint16_t instId)
|
|||||||
*/
|
*/
|
||||||
int32_t UAVObjDelete(UAVObjHandle obj, uint16_t instId)
|
int32_t UAVObjDelete(UAVObjHandle obj, uint16_t instId)
|
||||||
{
|
{
|
||||||
|
#if defined(PIOS_INCLUDE_FLASH_SECTOR_SETTINGS)
|
||||||
|
ObjectList* objEntry = (ObjectList*)obj;
|
||||||
|
|
||||||
|
if(objEntry == NULL)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
uint32_t addr = (objEntry->id & FLASH_MASK);
|
||||||
|
PIOS_Flash_W25X_EraseSector(addr);
|
||||||
|
#endif
|
||||||
#if defined(PIOS_INCLUDE_SDCARD)
|
#if defined(PIOS_INCLUDE_SDCARD)
|
||||||
ObjectList* objEntry;
|
ObjectList* objEntry;
|
||||||
uint8_t filename[14];
|
uint8_t filename[14];
|
||||||
|
Loading…
Reference in New Issue
Block a user