mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-01 09:24:10 +01:00
Merge remote-tracking branch 'origin/hyper/OP-661' into next
This commit is contained in:
commit
06a6e367b0
@ -33,7 +33,6 @@
|
||||
#define PIOS_INCLUDE_SYS
|
||||
#define PIOS_INCLUDE_DELAY
|
||||
#define PIOS_INCLUDE_LED
|
||||
#define PIOS_INCLUDE_SDCARD
|
||||
#define PIOS_INCLUDE_FREERTOS
|
||||
#define PIOS_INCLUDE_COM
|
||||
#define PIOS_INCLUDE_UDP
|
||||
|
@ -463,15 +463,6 @@ static void updateSystemAlarms()
|
||||
AlarmsClear(SYSTEMALARMS_ALARM_STACKOVERFLOW);
|
||||
}
|
||||
|
||||
#if defined(PIOS_INCLUDE_SDCARD)
|
||||
// Check for SD card
|
||||
if (PIOS_SDCARD_IsMounted() == 0) {
|
||||
AlarmsSet(SYSTEMALARMS_ALARM_SDCARD, SYSTEMALARMS_ALARM_ERROR);
|
||||
} else {
|
||||
AlarmsClear(SYSTEMALARMS_ALARM_SDCARD);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Check for event errors
|
||||
UAVObjGetStats(&objStats);
|
||||
EventGetStats(&evStats);
|
||||
|
@ -33,7 +33,6 @@
|
||||
#define PIOS_INCLUDE_SYS
|
||||
#define PIOS_INCLUDE_DELAY
|
||||
#define PIOS_INCLUDE_LED
|
||||
#define PIOS_INCLUDE_SDCARD
|
||||
#define PIOS_INCLUDE_FREERTOS
|
||||
#define PIOS_INCLUDE_COM
|
||||
#define PIOS_INCLUDE_UDP
|
||||
|
@ -46,13 +46,6 @@
|
||||
#define UAVOBJ_GCS_TELEMETRY_UPDATE_MODE_SHIFT 6
|
||||
#define UAVOBJ_UPDATE_MODE_MASK 0x3
|
||||
|
||||
|
||||
// FIXME: All this typedef for SDCARD needs to be abstracted away
|
||||
#if !defined(PIOS_INCLUDE_SDCARD)
|
||||
typedef struct {} FILEINFO;
|
||||
#endif
|
||||
|
||||
|
||||
typedef void* UAVObjHandle;
|
||||
|
||||
/**
|
||||
@ -164,8 +157,10 @@ int32_t UAVObjPack(UAVObjHandle obj_handle, uint16_t instId, uint8_t* dataOut);
|
||||
int32_t UAVObjSave(UAVObjHandle obj_handle, uint16_t instId);
|
||||
int32_t UAVObjLoad(UAVObjHandle obj_handle, uint16_t instId);
|
||||
int32_t UAVObjDelete(UAVObjHandle obj_handle, uint16_t instId);
|
||||
#if defined(PIOS_INCLUDE_SDCARD)
|
||||
int32_t UAVObjSaveToFile(UAVObjHandle obj_handle, uint16_t instId, FILEINFO* file);
|
||||
UAVObjHandle UAVObjLoadFromFile(FILEINFO* file);
|
||||
#endif
|
||||
int32_t UAVObjSaveSettings();
|
||||
int32_t UAVObjLoadSettings();
|
||||
int32_t UAVObjDeleteSettings();
|
||||
|
@ -668,6 +668,7 @@ unlock_exit:
|
||||
return rc;
|
||||
}
|
||||
|
||||
#if defined(PIOS_INCLUDE_SDCARD)
|
||||
/**
|
||||
* Save the data of the specified object instance to the file system (SD card).
|
||||
* The object will be appended and the file will not be closed.
|
||||
@ -682,7 +683,6 @@ int32_t UAVObjSaveToFile(UAVObjHandle obj_handle, uint16_t instId,
|
||||
{
|
||||
PIOS_Assert(obj_handle);
|
||||
|
||||
#if defined(PIOS_INCLUDE_SDCARD)
|
||||
uint32_t bytesWritten;
|
||||
// Check for file system availability
|
||||
if (PIOS_SDCARD_IsMounted() == 0) {
|
||||
@ -741,9 +741,9 @@ int32_t UAVObjSaveToFile(UAVObjHandle obj_handle, uint16_t instId,
|
||||
}
|
||||
// Done
|
||||
xSemaphoreGiveRecursive(mutex);
|
||||
#endif /* PIOS_INCLUDE_SDCARD */
|
||||
return 0;
|
||||
}
|
||||
#endif /* PIOS_INCLUDE_SDCARD */
|
||||
|
||||
/**
|
||||
* Save the data of the specified object to the file system (SD card).
|
||||
@ -811,6 +811,7 @@ int32_t UAVObjSave(UAVObjHandle obj_handle, uint16_t instId)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(PIOS_INCLUDE_SDCARD)
|
||||
/**
|
||||
* Load an object from the file system (SD card).
|
||||
* @param[in] file File to read from
|
||||
@ -818,7 +819,6 @@ int32_t UAVObjSave(UAVObjHandle obj_handle, uint16_t instId)
|
||||
*/
|
||||
UAVObjHandle UAVObjLoadFromFile(FILEINFO * file)
|
||||
{
|
||||
#if defined(PIOS_INCLUDE_SDCARD)
|
||||
uint32_t bytesRead;
|
||||
struct UAVOBase *objEntry;
|
||||
InstanceHandle instEntry;
|
||||
@ -898,10 +898,8 @@ UAVObjHandle UAVObjLoadFromFile(FILEINFO * file)
|
||||
// Unlock
|
||||
xSemaphoreGiveRecursive(mutex);
|
||||
return obj_handle;
|
||||
#else /* PIOS_INCLUDE_SDCARD */
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
#endif /* PIOS_INCLUDE_SDCARD */
|
||||
|
||||
/**
|
||||
* Load an object from the file system (SD card).
|
||||
|
@ -1385,26 +1385,6 @@
|
||||
id="Telemetry-Critical"
|
||||
style="fill:#cf0e0e;fill-opacity:1;stroke:#ffffff;stroke-width:0.29055119;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
|
||||
</g>
|
||||
<g
|
||||
style="display:inline"
|
||||
inkscape:label="SDCard-OK"
|
||||
id="layer1"
|
||||
inkscape:groupmode="layer" />
|
||||
<g
|
||||
style="display:inline"
|
||||
inkscape:label="SDCard-Warning"
|
||||
id="layer6"
|
||||
inkscape:groupmode="layer" />
|
||||
<g
|
||||
style="display:inline"
|
||||
inkscape:label="SDCard-Error"
|
||||
id="layer11"
|
||||
inkscape:groupmode="layer" />
|
||||
<g
|
||||
style="display:inline"
|
||||
inkscape:label="SDCard-Critical"
|
||||
id="layer20"
|
||||
inkscape:groupmode="layer" />
|
||||
<g
|
||||
style="display:none"
|
||||
inkscape:label="Memory-OK"
|
||||
|
Before Width: | Height: | Size: 236 KiB After Width: | Height: | Size: 235 KiB |
@ -2,7 +2,7 @@
|
||||
<object name="SystemAlarms" singleinstance="true" settings="false">
|
||||
<description>Alarms from OpenPilot to indicate failure conditions or warnings. Set by various modules.</description>
|
||||
<field name="Alarm" units="" type="enum" options="Uninitialised,OK,Warning,Error,Critical"
|
||||
elementnames="OutOfMemory,StackOverflow,CPUOverload,EventSystem,SDCard,Telemetry,ManualControl,Actuator,Attitude,Sensors,Stabilization,Guidance,AHRSComms,Battery,FlightTime,I2C,GPS,BootFault" defaultvalue="Uninitialised"/>
|
||||
elementnames="OutOfMemory,StackOverflow,CPUOverload,EventSystem,Telemetry,ManualControl,Actuator,Attitude,Sensors,Stabilization,Guidance,Battery,FlightTime,I2C,GPS,BootFault" defaultvalue="Uninitialised"/>
|
||||
<access gcs="readwrite" flight="readwrite"/>
|
||||
<telemetrygcs acked="true" updatemode="onchange" period="0"/>
|
||||
<telemetryflight acked="true" updatemode="onchange" period="0"/>
|
||||
|
Loading…
Reference in New Issue
Block a user