mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-17 02:52:12 +01:00
Need to add a small delay after save for the load to work correctly. Odd.
This commit is contained in:
parent
e8cf606f16
commit
e341a37bd1
@ -242,7 +242,10 @@ static void objectUpdatedCb(UAVObjEvent * ev)
|
||||
}
|
||||
// Save selected instance
|
||||
retval = UAVObjSave(obj, objper.InstanceID);
|
||||
|
||||
|
||||
// Not sure why this is needed
|
||||
vTaskDelay(10);
|
||||
|
||||
// Verify saving worked
|
||||
if (retval == 0)
|
||||
retval = UAVObjLoad(obj, objper.InstanceID);
|
||||
|
@ -721,10 +721,11 @@ int32_t UAVObjLoad(UAVObjHandle obj, uint16_t instId)
|
||||
return -1;
|
||||
|
||||
// Fire event on success
|
||||
if (PIOS_FLASHFS_ObjLoad(obj, instId, instEntry->data) == 0)
|
||||
int32_t retval;
|
||||
if ((retval = PIOS_FLASHFS_ObjLoad(obj, instId, instEntry->data)) == 0)
|
||||
sendEvent(objEntry, instId, EV_UNPACKED);
|
||||
else
|
||||
return -1;
|
||||
return retval;
|
||||
#endif
|
||||
|
||||
#if defined(PIOS_INCLUDE_SDCARD)
|
||||
|
Loading…
x
Reference in New Issue
Block a user