From b4620235dd2ea7f2363fd3662c6456cfda5596b7 Mon Sep 17 00:00:00 2001 From: Dominic Clifton Date: Mon, 8 Sep 2014 10:41:17 +0100 Subject: [PATCH] Adding note about potential flash usage optimization in GPS code. --- src/main/io/gps.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/io/gps.c b/src/main/io/gps.c index 0167cd587c..e8e63e500c 100644 --- a/src/main/io/gps.c +++ b/src/main/io/gps.c @@ -128,8 +128,11 @@ typedef struct ubloxSbas_s { uint8_t message[UBLOX_SBAS_MESSAGE_LENGTH]; } ubloxSbas_t; + + // Note: these must be defined in the same order is sbasMode_e since no lookup table is used. static const ubloxSbas_t ubloxSbas[] = { + // NOTE this could be optimized to save a few bytes of flash space since the same prefix is used for each command. { SBAS_AUTO, { 0xB5, 0x62, 0x06, 0x16, 0x08, 0x00, 0x03, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0xE5}}, { SBAS_EGNOS, { 0xB5, 0x62, 0x06, 0x16, 0x08, 0x00, 0x03, 0x07, 0x03, 0x00, 0x51, 0x08, 0x00, 0x00, 0x8A, 0x41}}, { SBAS_WAAS, { 0xB5, 0x62, 0x06, 0x16, 0x08, 0x00, 0x03, 0x07, 0x03, 0x00, 0x04, 0xE0, 0x04, 0x00, 0x19, 0x9D}},