AP_BoardConfig: added BRD_SD_FENCE

allow for fence storage on microSD
This commit is contained in:
Andrew Tridgell 2024-02-21 10:59:49 +11:00 committed by Peter Barker
parent a0f74af407
commit f0890f8882
2 changed files with 14 additions and 0 deletions

View File

@ -354,6 +354,14 @@ const AP_Param::GroupInfo AP_BoardConfig::var_info[] = {
// @RebootRequired: True // @RebootRequired: True
// @User: Advanced // @User: Advanced
AP_GROUPINFO("SD_MISSION", 24, AP_BoardConfig, sdcard_storage.mission_kb, 0), AP_GROUPINFO("SD_MISSION", 24, AP_BoardConfig, sdcard_storage.mission_kb, 0),
// @Param: SD_FENCE
// @DisplayName: SDCard Fence size
// @Description: This sets the amount of storage in kilobytes reserved on the microsd card in fence.stg for fence storage.
// @Range: 0 64
// @RebootRequired: True
// @User: Advanced
AP_GROUPINFO("SD_FENCE", 29, AP_BoardConfig, sdcard_storage.fence_kb, 0),
#endif #endif
// index 25 used by SER5_RTSCTS // index 25 used by SER5_RTSCTS

View File

@ -221,6 +221,11 @@ public:
static uint16_t get_sdcard_mission_kb(void) { static uint16_t get_sdcard_mission_kb(void) {
return _singleton? _singleton->sdcard_storage.mission_kb.get() : 0; return _singleton? _singleton->sdcard_storage.mission_kb.get() : 0;
} }
// return number of kb of fence storage to use on microSD
static uint16_t get_sdcard_fence_kb(void) {
return _singleton? _singleton->sdcard_storage.fence_kb.get() : 0;
}
#endif #endif
private: private:
@ -244,6 +249,7 @@ private:
#if AP_SDCARD_STORAGE_ENABLED #if AP_SDCARD_STORAGE_ENABLED
struct { struct {
AP_Int16 mission_kb; AP_Int16 mission_kb;
AP_Int16 fence_kb;
} sdcard_storage; } sdcard_storage;
#endif #endif