From 11a00e26976a68a317b75e6c491a0127b7a39da5 Mon Sep 17 00:00:00 2001 From: Dominic Clifton Date: Fri, 22 Aug 2014 21:05:55 +0100 Subject: [PATCH] Move 'boxes' out of ram and into flash - saves quite a bit of ram. --- src/main/io/serial_msp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/io/serial_msp.c b/src/main/io/serial_msp.c index c55a02be0..8f883eb05 100755 --- a/src/main/io/serial_msp.c +++ b/src/main/io/serial_msp.c @@ -137,11 +137,13 @@ extern int16_t debug[4]; // FIXME dependency on mw.c #define ACTIVATE_MASK 0xFFF // see -struct box_t { +typedef struct box_e { const uint8_t boxIndex; // this is from boxnames enum const char *boxName; // GUI-readable box name const uint8_t permanentId; // -} boxes[] = { +} box_t; + +static const box_t const boxes[] = { { BOXARM, "ARM;", 0 }, { BOXANGLE, "ANGLE;", 1 }, { BOXHORIZON, "HORIZON;", 2 },