AP_GPS: Ensure that all ublox configuration failure reasons have a description

This commit is contained in:
Michael du Breuil 2019-03-30 11:55:31 -07:00 committed by Peter Barker
parent da2cf627d8
commit 833bc8f12a
2 changed files with 4 additions and 1 deletions

View File

@ -1335,8 +1335,10 @@ static const char *reasons[] = {"navigation rate",
"navigation settings", "navigation settings",
"GNSS settings", "GNSS settings",
"SBAS settings", "SBAS settings",
"PVT rate"}; "PVT rate",
"time pulse settings"};
static_assert((1 << ARRAY_SIZE(reasons)) == CONFIG_LAST, "UBLOX: Missing configuration description");
void void
AP_GPS_UBLOX::broadcast_configuration_failure_reason(void) const { AP_GPS_UBLOX::broadcast_configuration_failure_reason(void) const {

View File

@ -73,6 +73,7 @@
#define CONFIG_SBAS (1<<12) #define CONFIG_SBAS (1<<12)
#define CONFIG_RATE_PVT (1<<13) #define CONFIG_RATE_PVT (1<<13)
#define CONFIG_TP5 (1<<14) #define CONFIG_TP5 (1<<14)
#define CONFIG_LAST (1<<15) // this must always be the last bit
#define CONFIG_REQUIRED_INITIAL (CONFIG_RATE_NAV | CONFIG_RATE_POSLLH | CONFIG_RATE_STATUS | CONFIG_RATE_VELNED) #define CONFIG_REQUIRED_INITIAL (CONFIG_RATE_NAV | CONFIG_RATE_POSLLH | CONFIG_RATE_STATUS | CONFIG_RATE_VELNED)