Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StorageManager: allow for CANDNA storage on F405 boards #16219

Merged
merged 1 commit into from
Jan 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions libraries/StorageManager/StorageManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,12 @@ const StorageManager::StorageArea StorageManager::layout[STORAGE_NUM_AREAS] = {
#if STORAGE_NUM_AREAS == 11
// optimised for lots of parameters for 15k boards with OSD
{ StorageParam, 8192, 7168},
#elif STORAGE_NUM_AREAS == 12
// optimised for lots of parameters for 15k boards with OSD, plus room for CAN DNA
{ StorageParam, 8192, 6144},
{ StorageCANDNA, 14336, 1024},
#endif
#if STORAGE_NUM_AREAS >= 12
#if STORAGE_NUM_AREAS >= 13
{ StorageParam, 8192, 1280},
{ StorageRally, 9472, 300},
{ StorageFence, 9772, 256},
Expand Down Expand Up @@ -98,8 +102,12 @@ const StorageManager::StorageArea StorageManager::layout[STORAGE_NUM_AREAS] = {
#if STORAGE_NUM_AREAS == 11
// optimised for lots of parameters for 15k boards with OSD
{ StorageParam, 8192, 7168},
#elif STORAGE_NUM_AREAS == 12
// optimised for lots of parameters for 15k boards with OSD, plus room for CAN DNA
{ StorageParam, 8192, 6144},
{ StorageCANDNA, 14336, 1024},
#endif
#if STORAGE_NUM_AREAS >= 12
#if STORAGE_NUM_AREAS >= 13
{ StorageParam, 8192, 1280},
{ StorageRally, 9472, 300},
{ StorageFence, 9772, 256},
Expand Down
2 changes: 2 additions & 0 deletions libraries/StorageManager/StorageManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
*/
#if HAL_STORAGE_SIZE >= 16384
#define STORAGE_NUM_AREAS 15
#elif HAL_STORAGE_SIZE >= 15360 && defined(HAL_NUM_CAN_IFACES)
#define STORAGE_NUM_AREAS 12
#elif HAL_STORAGE_SIZE >= 15360
#define STORAGE_NUM_AREAS 11
#elif HAL_STORAGE_SIZE >= 8192
Expand Down