mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-04-08 00:53:48 +02: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_SYS
|
||||||
#define PIOS_INCLUDE_DELAY
|
#define PIOS_INCLUDE_DELAY
|
||||||
#define PIOS_INCLUDE_LED
|
#define PIOS_INCLUDE_LED
|
||||||
#define PIOS_INCLUDE_SDCARD
|
|
||||||
#define PIOS_INCLUDE_FREERTOS
|
#define PIOS_INCLUDE_FREERTOS
|
||||||
#define PIOS_INCLUDE_COM
|
#define PIOS_INCLUDE_COM
|
||||||
#define PIOS_INCLUDE_UDP
|
#define PIOS_INCLUDE_UDP
|
||||||
|
@ -463,15 +463,6 @@ static void updateSystemAlarms()
|
|||||||
AlarmsClear(SYSTEMALARMS_ALARM_STACKOVERFLOW);
|
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
|
// Check for event errors
|
||||||
UAVObjGetStats(&objStats);
|
UAVObjGetStats(&objStats);
|
||||||
EventGetStats(&evStats);
|
EventGetStats(&evStats);
|
||||||
|
@ -33,7 +33,6 @@
|
|||||||
#define PIOS_INCLUDE_SYS
|
#define PIOS_INCLUDE_SYS
|
||||||
#define PIOS_INCLUDE_DELAY
|
#define PIOS_INCLUDE_DELAY
|
||||||
#define PIOS_INCLUDE_LED
|
#define PIOS_INCLUDE_LED
|
||||||
#define PIOS_INCLUDE_SDCARD
|
|
||||||
#define PIOS_INCLUDE_FREERTOS
|
#define PIOS_INCLUDE_FREERTOS
|
||||||
#define PIOS_INCLUDE_COM
|
#define PIOS_INCLUDE_COM
|
||||||
#define PIOS_INCLUDE_UDP
|
#define PIOS_INCLUDE_UDP
|
||||||
|
@ -46,13 +46,6 @@
|
|||||||
#define UAVOBJ_GCS_TELEMETRY_UPDATE_MODE_SHIFT 6
|
#define UAVOBJ_GCS_TELEMETRY_UPDATE_MODE_SHIFT 6
|
||||||
#define UAVOBJ_UPDATE_MODE_MASK 0x3
|
#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;
|
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 UAVObjSave(UAVObjHandle obj_handle, uint16_t instId);
|
||||||
int32_t UAVObjLoad(UAVObjHandle obj_handle, uint16_t instId);
|
int32_t UAVObjLoad(UAVObjHandle obj_handle, uint16_t instId);
|
||||||
int32_t UAVObjDelete(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);
|
int32_t UAVObjSaveToFile(UAVObjHandle obj_handle, uint16_t instId, FILEINFO* file);
|
||||||
UAVObjHandle UAVObjLoadFromFile(FILEINFO* file);
|
UAVObjHandle UAVObjLoadFromFile(FILEINFO* file);
|
||||||
|
#endif
|
||||||
int32_t UAVObjSaveSettings();
|
int32_t UAVObjSaveSettings();
|
||||||
int32_t UAVObjLoadSettings();
|
int32_t UAVObjLoadSettings();
|
||||||
int32_t UAVObjDeleteSettings();
|
int32_t UAVObjDeleteSettings();
|
||||||
|
@ -668,6 +668,7 @@ unlock_exit:
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(PIOS_INCLUDE_SDCARD)
|
||||||
/**
|
/**
|
||||||
* Save the data of the specified object instance to the file system (SD card).
|
* 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.
|
* 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);
|
PIOS_Assert(obj_handle);
|
||||||
|
|
||||||
#if defined(PIOS_INCLUDE_SDCARD)
|
|
||||||
uint32_t bytesWritten;
|
uint32_t bytesWritten;
|
||||||
// Check for file system availability
|
// Check for file system availability
|
||||||
if (PIOS_SDCARD_IsMounted() == 0) {
|
if (PIOS_SDCARD_IsMounted() == 0) {
|
||||||
@ -741,9 +741,9 @@ int32_t UAVObjSaveToFile(UAVObjHandle obj_handle, uint16_t instId,
|
|||||||
}
|
}
|
||||||
// Done
|
// Done
|
||||||
xSemaphoreGiveRecursive(mutex);
|
xSemaphoreGiveRecursive(mutex);
|
||||||
#endif /* PIOS_INCLUDE_SDCARD */
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif /* PIOS_INCLUDE_SDCARD */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Save the data of the specified object to the file system (SD card).
|
* 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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(PIOS_INCLUDE_SDCARD)
|
||||||
/**
|
/**
|
||||||
* Load an object from the file system (SD card).
|
* Load an object from the file system (SD card).
|
||||||
* @param[in] file File to read from
|
* @param[in] file File to read from
|
||||||
@ -818,7 +819,6 @@ int32_t UAVObjSave(UAVObjHandle obj_handle, uint16_t instId)
|
|||||||
*/
|
*/
|
||||||
UAVObjHandle UAVObjLoadFromFile(FILEINFO * file)
|
UAVObjHandle UAVObjLoadFromFile(FILEINFO * file)
|
||||||
{
|
{
|
||||||
#if defined(PIOS_INCLUDE_SDCARD)
|
|
||||||
uint32_t bytesRead;
|
uint32_t bytesRead;
|
||||||
struct UAVOBase *objEntry;
|
struct UAVOBase *objEntry;
|
||||||
InstanceHandle instEntry;
|
InstanceHandle instEntry;
|
||||||
@ -898,10 +898,8 @@ UAVObjHandle UAVObjLoadFromFile(FILEINFO * file)
|
|||||||
// Unlock
|
// Unlock
|
||||||
xSemaphoreGiveRecursive(mutex);
|
xSemaphoreGiveRecursive(mutex);
|
||||||
return obj_handle;
|
return obj_handle;
|
||||||
#else /* PIOS_INCLUDE_SDCARD */
|
|
||||||
return NULL;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif /* PIOS_INCLUDE_SDCARD */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load an object from the file system (SD card).
|
* Load an object from the file system (SD card).
|
||||||
|
@ -1385,26 +1385,6 @@
|
|||||||
id="Telemetry-Critical"
|
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" />
|
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>
|
||||||
<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
|
<g
|
||||||
style="display:none"
|
style="display:none"
|
||||||
inkscape:label="Memory-OK"
|
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">
|
<object name="SystemAlarms" singleinstance="true" settings="false">
|
||||||
<description>Alarms from OpenPilot to indicate failure conditions or warnings. Set by various modules.</description>
|
<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"
|
<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"/>
|
<access gcs="readwrite" flight="readwrite"/>
|
||||||
<telemetrygcs acked="true" updatemode="onchange" period="0"/>
|
<telemetrygcs acked="true" updatemode="onchange" period="0"/>
|
||||||
<telemetryflight acked="true" updatemode="onchange" period="0"/>
|
<telemetryflight acked="true" updatemode="onchange" period="0"/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user