StorageManager: allow for 15k storage

this is for F4 boards using flash storage. They were using 8k, but can
actually fit 16k. This is optimised for lots of param space as we
expect to have a lot of customised params for OSD support
This commit is contained in:
Andrew Tridgell 2018-06-23 17:57:37 +10:00
parent 49de205a06
commit b983caa97e
2 changed files with 10 additions and 0 deletions

View File

@ -48,6 +48,10 @@ const StorageManager::StorageArea StorageManager::layout_default[STORAGE_NUM_ARE
{ StorageKeys, 8064, 64},
{ StorageBindInfo,8128, 56},
#endif
#if STORAGE_NUM_AREAS == 11
// optimised for lots of parameters for 15k boards with OSD
{ StorageParam, 8192, 7168},
#endif
#if STORAGE_NUM_AREAS >= 12
{ StorageParam, 8192, 1280},
{ StorageRally, 9472, 300},
@ -75,6 +79,10 @@ const StorageManager::StorageArea StorageManager::layout_copter[STORAGE_NUM_AREA
{ StorageKeys, 8064, 64},
{ StorageBindInfo,8128, 56},
#endif
#if STORAGE_NUM_AREAS == 11
// optimised for lots of parameters for 15k boards with OSD
{ StorageParam, 8192, 7168},
#endif
#if STORAGE_NUM_AREAS >= 12
{ StorageParam, 8192, 1280},
{ StorageRally, 9472, 300},

View File

@ -28,6 +28,8 @@
*/
#if HAL_STORAGE_SIZE >= 16384
#define STORAGE_NUM_AREAS 14
#elif HAL_STORAGE_SIZE >= 15360
#define STORAGE_NUM_AREAS 11
#elif HAL_STORAGE_SIZE >= 8192
#define STORAGE_NUM_AREAS 10
#elif HAL_STORAGE_SIZE >= 4096