From ca39ece6cbe0bbdc1716d8761b2debb10767a0ba Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 21 Jan 2016 13:48:41 +1100 Subject: [PATCH] StorageManager: added storage region for signing keys --- libraries/StorageManager/StorageManager.cpp | 8 ++++---- libraries/StorageManager/StorageManager.h | 7 ++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/libraries/StorageManager/StorageManager.cpp b/libraries/StorageManager/StorageManager.cpp index a2d90f4e4b..b79bb92fff 100644 --- a/libraries/StorageManager/StorageManager.cpp +++ b/libraries/StorageManager/StorageManager.cpp @@ -44,8 +44,8 @@ const StorageManager::StorageArea StorageManager::layout_default[STORAGE_NUM_ARE { StorageParam, 4096, 1280}, { StorageRally, 5376, 300}, { StorageFence, 5676, 256}, - { StorageMission, 5932, 2132}, // leave 4 byte gap for PX4 - // sentinal and expansion + { StorageMission, 5932, 2132}, + { StorageKeys, 8064, 64}, #endif #if STORAGE_NUM_AREAS >= 12 { StorageParam, 8192, 1280}, @@ -70,8 +70,8 @@ const StorageManager::StorageArea StorageManager::layout_copter[STORAGE_NUM_AREA { StorageParam, 4096, 1280}, { StorageRally, 5376, 300}, { StorageFence, 5676, 256}, - { StorageMission, 5932, 2132}, // leave 128 byte gap for - // expansion and PX4 sentinal + { StorageMission, 5932, 2132}, + { StorageKeys, 8064, 64}, #endif #if STORAGE_NUM_AREAS >= 12 { StorageParam, 8192, 1280}, diff --git a/libraries/StorageManager/StorageManager.h b/libraries/StorageManager/StorageManager.h index 69ef2186a3..89b5718730 100644 --- a/libraries/StorageManager/StorageManager.h +++ b/libraries/StorageManager/StorageManager.h @@ -28,9 +28,9 @@ storage. Use larger areas for other boards */ #if HAL_STORAGE_SIZE >= 16384 -#define STORAGE_NUM_AREAS 12 +#define STORAGE_NUM_AREAS 13 #elif HAL_STORAGE_SIZE >= 8192 -#define STORAGE_NUM_AREAS 8 +#define STORAGE_NUM_AREAS 9 #elif HAL_STORAGE_SIZE >= 4096 #define STORAGE_NUM_AREAS 4 #else @@ -47,7 +47,8 @@ public: StorageParam = 0, StorageFence = 1, StorageRally = 2, - StorageMission = 3 + StorageMission = 3, + StorageKeys = 4 }; // erase whole of storage