Skip to content

Commit 4cf000c

Browse files
committed
GNSS: Add gnssCmdUpdateConstellations called by menuCommands
1 parent b64114b commit 4cf000c

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

Firmware/RTK_Everywhere/GNSS.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,4 +396,7 @@ class GNSS
396396
virtual void update();
397397
};
398398

399+
// Update the constellations following a set command
400+
bool gnssCmdUpdateConstellations(int commandIndex);
401+
399402
#endif // __GNSS_H__

Firmware/RTK_Everywhere/GNSS.ino

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,3 +427,14 @@ void gnssFirmwareRemoveUpdateFile(const char *filename)
427427
}
428428

429429
//----------------------------------------
430+
// Update the constellations following a set command
431+
//----------------------------------------
432+
bool gnssCmdUpdateConstellations(int commandIndex)
433+
{
434+
if (gnss == nullptr)
435+
return false;
436+
437+
return gnss->setConstellations();
438+
}
439+
440+
//----------------------------------------

Firmware/RTK_Everywhere/settings.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1284,7 +1284,7 @@ const RTK_Settings_Entry rtkSettingsEntries[] =
12841284
// constellation_ is common to all GNSS, but not all support (e.g.) NavIC
12851285
// messageRateNMEA_, messageRateRTCMBase_, and messageRateRTCMRover_ are common to UM980 and LG290P
12861286
// The qualifier is defined inside updateSettingWithValue, parseLine
1287-
{ 0, 0, 1, 1, 1, 1, 1, 1, 1, ALL, 1, tCmnCnst, 0, nullptr, "constellation_", nullptr, },
1287+
{ 0, 0, 1, 1, 1, 1, 1, 1, 1, ALL, 1, tCmnCnst, 0, nullptr, "constellation_", gnssCmdUpdateConstellations, },
12881288
{ 0, 0, 1, 1, 1, 1, 1, 1, 1, ALL, 1, tCmnRtNm, 0, nullptr, "messageRateNMEA_", nullptr, },
12891289
{ 0, 0, 1, 1, 1, 1, 1, 1, 1, ALL, 1, tCnRtRtB, 0, nullptr, "messageRateRTCMBase_", nullptr, },
12901290
{ 0, 0, 1, 1, 1, 1, 1, 1, 1, ALL, 1, tCnRtRtR, 0, nullptr, "messageRateRTCMRover_", nullptr, },
@@ -1462,7 +1462,7 @@ const RTK_Settings_Entry rtkSettingsEntries[] =
14621462

14631463
// Mosaic
14641464
#ifdef COMPILE_MOSAICX5
1465-
{ 1, 1, 1, 0, 0, 1, 0, 0, 0, MX5, 0, tMosaicConst, MAX_MOSAIC_CONSTELLATIONS, & settings.mosaicConstellations, "constellation_", nullptr, },
1465+
{ 1, 1, 1, 0, 0, 1, 0, 0, 0, MX5, 0, tMosaicConst, MAX_MOSAIC_CONSTELLATIONS, & settings.mosaicConstellations, "constellation_", gnssCmdUpdateConstellations, },
14661466
{ 1, 1, 1, 0, 0, 1, 0, 0, 0, MX5, 0, tMosaicMSNmea, MAX_MOSAIC_NMEA_MSG, & settings.mosaicMessageStreamNMEA, "messageStreamNMEA_", nullptr, },
14671467
{ 1, 1, 1, 0, 0, 1, 0, 0, 0, MX5, 0, tMosaicSINmea, MOSAIC_NUM_NMEA_STREAMS, & settings.mosaicStreamIntervalsNMEA, "streamIntervalNMEA_", nullptr, },
14681468
{ 1, 1, 1, 0, 0, 1, 0, 0, 0, MX5, 0, tMosaicMIRvRT, MAX_MOSAIC_RTCM_V3_INTERVAL_GROUPS, & settings.mosaicMessageIntervalsRTCMv3Rover, "messageIntervalRTCMRover_", nullptr, },
@@ -1727,7 +1727,7 @@ const RTK_Settings_Entry rtkSettingsEntries[] =
17271727

17281728
// ublox GNSS Receiver
17291729
#ifdef COMPILE_ZED
1730-
{ 1, 1, 1, 1, 1, 0, 0, 1, 0, ZED, 0, tUbxConst, MAX_UBX_CONSTELLATIONS, & settings.ubxConstellations[0], "constellation_", nullptr, },
1730+
{ 1, 1, 1, 1, 1, 0, 0, 1, 0, ZED, 0, tUbxConst, MAX_UBX_CONSTELLATIONS, & settings.ubxConstellations[0], "constellation_", gnssCmdUpdateConstellations, },
17311731
{ 0, 1, 1, 1, 1, 0, 0, 1, 0, ZED, 0, tUbxMsgRt, MAX_UBX_MSG, & settings.ubxMessageRates[0], "ubxMessageRate_", nullptr, },
17321732
{ 0, 1, 1, 1, 1, 0, 0, 1, 0, ZED, 0, tUbMsgRtb, MAX_UBX_MSG_RTCM, & settings.ubxMessageRatesBase[0], "ubxMessageRateBase_", nullptr, },
17331733
#endif // COMPILE_ZED
@@ -1761,7 +1761,7 @@ const RTK_Settings_Entry rtkSettingsEntries[] =
17611761
{ 1, 1, 0, 0, 0, 0, 1, 0, 0, ALL, 0, _bool, 0, & settings.enableTiltCompensation, "enableTiltCompensation", nullptr, },
17621762

17631763
#ifdef COMPILE_UM980
1764-
{ 1, 1, 1, 0, 0, 0, 1, 0, 0, U98, 0, tUmConst, MAX_UM980_CONSTELLATIONS, & settings.um980Constellations, "constellation_", nullptr, },
1764+
{ 1, 1, 1, 0, 0, 0, 1, 0, 0, U98, 0, tUmConst, MAX_UM980_CONSTELLATIONS, & settings.um980Constellations, "constellation_", gnssCmdUpdateConstellations, },
17651765
{ 0, 1, 1, 0, 0, 0, 1, 0, 0, U98, 0, tUmMRNmea, MAX_UM980_NMEA_MSG, & settings.um980MessageRatesNMEA, "messageRateNMEA_", nullptr, },
17661766
{ 0, 1, 1, 0, 0, 0, 1, 0, 0, U98, 0, tUmMRBaRT, MAX_UM980_RTCM_MSG, & settings.um980MessageRatesRTCMBase, "messageRateRTCMBase_", nullptr, },
17671767
{ 0, 1, 1, 0, 0, 0, 1, 0, 0, U98, 0, tUmMRRvRT, MAX_UM980_RTCM_MSG, & settings.um980MessageRatesRTCMRover, "messageRateRTCMRover_", nullptr, },
@@ -1810,7 +1810,7 @@ const RTK_Settings_Entry rtkSettingsEntries[] =
18101810
// g s x k 2 c h d d x 2 Type Qual Variable Name afterSetCmd
18111811

18121812
#ifdef COMPILE_LG290P
1813-
{ 1, 1, 1, 0, 0, 0, 0, 0, 1, L29, 1, tLgConst, MAX_LG290P_CONSTELLATIONS, & settings.lg290pConstellations, "constellation_", nullptr, },
1813+
{ 1, 1, 1, 0, 0, 0, 0, 0, 1, L29, 1, tLgConst, MAX_LG290P_CONSTELLATIONS, & settings.lg290pConstellations, "constellation_", gnssCmdUpdateConstellations, },
18141814
{ 0, 1, 1, 0, 0, 0, 0, 0, 1, L29, 1, tLgMRNmea, MAX_LG290P_NMEA_MSG, & settings.lg290pMessageRatesNMEA, "messageRateNMEA_", nullptr, },
18151815
{ 0, 1, 1, 0, 0, 0, 0, 0, 1, L29, 1, tLgMRBaRT, MAX_LG290P_RTCM_MSG, & settings.lg290pMessageRatesRTCMBase, "messageRateRTCMBase_", nullptr, },
18161816
{ 0, 1, 1, 0, 0, 0, 0, 0, 1, L29, 1, tLgMRRvRT, MAX_LG290P_RTCM_MSG, & settings.lg290pMessageRatesRTCMRover, "messageRateRTCMRover_", nullptr, },

0 commit comments

Comments
 (0)