diff --git a/flight/CopterControl/System/inc/pios_config_posix.h b/flight/CopterControl/System/inc/pios_config_posix.h index f7dd4aa2e..ed2351ea6 100644 --- a/flight/CopterControl/System/inc/pios_config_posix.h +++ b/flight/CopterControl/System/inc/pios_config_posix.h @@ -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 diff --git a/flight/PipXtreme/System/inc/pios_config_posix.h b/flight/PipXtreme/System/inc/pios_config_posix.h index ddf7ee5d4..9d589d634 100755 --- a/flight/PipXtreme/System/inc/pios_config_posix.h +++ b/flight/PipXtreme/System/inc/pios_config_posix.h @@ -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 diff --git a/flight/SimPosix/System/inc/pios_config.h b/flight/SimPosix/System/inc/pios_config.h index d4add3666..84d857f19 100644 --- a/flight/SimPosix/System/inc/pios_config.h +++ b/flight/SimPosix/System/inc/pios_config.h @@ -44,7 +44,6 @@ //#define PIOS_INCLUDE_I2C #define PIOS_INCLUDE_IRQ #define PIOS_INCLUDE_LED -#define PIOS_INCLUDE_SDCARD //#define PIOS_INCLUDE_IAP #define PIOS_INCLUDE_SERVO #define PIOS_INCLUDE_SPI diff --git a/flight/UAVObjects/inc/uavobjectmanager.h b/flight/UAVObjects/inc/uavobjectmanager.h index 62aff543d..7d774d5ae 100644 --- a/flight/UAVObjects/inc/uavobjectmanager.h +++ b/flight/UAVObjects/inc/uavobjectmanager.h @@ -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(); diff --git a/flight/UAVObjects/uavobjectmanager.c b/flight/UAVObjects/uavobjectmanager.c index 2b2b69018..c339af0fe 100644 --- a/flight/UAVObjects/uavobjectmanager.c +++ b/flight/UAVObjects/uavobjectmanager.c @@ -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). diff --git a/shared/uavobjectdefinition/systemalarms.xml b/shared/uavobjectdefinition/systemalarms.xml index cc20045b6..dd185cfa3 100644 --- a/shared/uavobjectdefinition/systemalarms.xml +++ b/shared/uavobjectdefinition/systemalarms.xml @@ -2,7 +2,7 @@ Alarms from OpenPilot to indicate failure conditions or warnings. Set by various modules. + elementnames="OutOfMemory,StackOverflow,CPUOverload,EventSystem,Telemetry,ManualControl,Actuator,Attitude,Sensors,Stabilization,Guidance,Battery,FlightTime,I2C,GPS,BootFault" defaultvalue="Uninitialised"/>