AP_GPS: Enforce max of 10 GSOF outputs per the manual

Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
This commit is contained in:
Ryan Friedman 2023-05-19 09:36:59 -06:00 committed by Peter Barker
parent 77e169b226
commit f092c22915
1 changed files with 3 additions and 0 deletions

View File

@ -46,6 +46,9 @@ AP_GPS_GSOF::AP_GPS_GSOF(AP_GPS &_gps, AP_GPS::GPS_State &_state,
AP_HAL::UARTDriver *_port) :
AP_GPS_Backend(_gps, _state, _port)
{
// https://receiverhelp.trimble.com/oem-gnss/index.html#GSOFmessages_Overview.html?TocPath=Output%2520Messages%257CGSOF%2520Messages%257COverview%257C_____0
static_assert(ARRAY_SIZE(gsofmsgreq) <= 10, "The maximum number of outputs allowed with GSOF is 10.");
msg.state = Msg_Parser::State::STARTTX;
// baud request for port 0