Skip to content

Commit e1c8352

Browse files
authored
Merge pull request #745 from LeeLeahy2/update-constellations
GNSS: Add gnssCmdUpdateConstellations called by menuCommands
2 parents 2656e6d + 4cf000c commit e1c8352

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
@@ -1294,7 +1294,7 @@ const RTK_Settings_Entry rtkSettingsEntries[] =
12941294
// constellation_ is common to all GNSS, but not all support (e.g.) NavIC
12951295
// messageRateNMEA_, messageRateRTCMBase_, and messageRateRTCMRover_ are common to UM980 and LG290P
12961296
// The qualifier is defined inside updateSettingWithValue, parseLine
1297-
{ 0, 0, 1, 1, 1, 1, 1, 1, 1, ALL, 1, tCmnCnst, 0, nullptr, "constellation_", nullptr, },
1297+
{ 0, 0, 1, 1, 1, 1, 1, 1, 1, ALL, 1, tCmnCnst, 0, nullptr, "constellation_", gnssCmdUpdateConstellations, },
12981298
{ 0, 0, 1, 1, 1, 1, 1, 1, 1, ALL, 1, tCmnRtNm, 0, nullptr, "messageRateNMEA_", nullptr, },
12991299
{ 0, 0, 1, 1, 1, 1, 1, 1, 1, ALL, 1, tCnRtRtB, 0, nullptr, "messageRateRTCMBase_", nullptr, },
13001300
{ 0, 0, 1, 1, 1, 1, 1, 1, 1, ALL, 1, tCnRtRtR, 0, nullptr, "messageRateRTCMRover_", nullptr, },
@@ -1488,7 +1488,7 @@ const RTK_Settings_Entry rtkSettingsEntries[] =
14881488

14891489
// Mosaic
14901490
#ifdef COMPILE_MOSAICX5
1491-
{ 1, 1, 1, 0, 0, 1, 0, 0, 0, MX5, 0, tMosaicConst, MAX_MOSAIC_CONSTELLATIONS, & settings.mosaicConstellations, "constellation_", nullptr, },
1491+
{ 1, 1, 1, 0, 0, 1, 0, 0, 0, MX5, 0, tMosaicConst, MAX_MOSAIC_CONSTELLATIONS, & settings.mosaicConstellations, "constellation_", gnssCmdUpdateConstellations, },
14921492
{ 1, 1, 1, 0, 0, 1, 0, 0, 0, MX5, 0, tMosaicMSNmea, MAX_MOSAIC_NMEA_MSG, & settings.mosaicMessageStreamNMEA, "messageStreamNMEA_", nullptr, },
14931493
{ 1, 1, 1, 0, 0, 1, 0, 0, 0, MX5, 0, tMosaicSINmea, MOSAIC_NUM_NMEA_STREAMS, & settings.mosaicStreamIntervalsNMEA, "streamIntervalNMEA_", nullptr, },
14941494
{ 1, 1, 1, 0, 0, 1, 0, 0, 0, MX5, 0, tMosaicMIRvRT, MAX_MOSAIC_RTCM_V3_INTERVAL_GROUPS, & settings.mosaicMessageIntervalsRTCMv3Rover, "messageIntervalRTCMRover_", nullptr, },
@@ -1753,7 +1753,7 @@ const RTK_Settings_Entry rtkSettingsEntries[] =
17531753

17541754
// ublox GNSS Receiver
17551755
#ifdef COMPILE_ZED
1756-
{ 1, 1, 1, 1, 1, 0, 0, 1, 0, ZED, 0, tUbxConst, MAX_UBX_CONSTELLATIONS, & settings.ubxConstellations[0], "constellation_", nullptr, },
1756+
{ 1, 1, 1, 1, 1, 0, 0, 1, 0, ZED, 0, tUbxConst, MAX_UBX_CONSTELLATIONS, & settings.ubxConstellations[0], "constellation_", gnssCmdUpdateConstellations, },
17571757
{ 0, 1, 1, 1, 1, 0, 0, 1, 0, ZED, 0, tUbxMsgRt, MAX_UBX_MSG, & settings.ubxMessageRates[0], "ubxMessageRate_", nullptr, },
17581758
{ 0, 1, 1, 1, 1, 0, 0, 1, 0, ZED, 0, tUbMsgRtb, MAX_UBX_MSG_RTCM, & settings.ubxMessageRatesBase[0], "ubxMessageRateBase_", nullptr, },
17591759
#endif // COMPILE_ZED
@@ -1787,7 +1787,7 @@ const RTK_Settings_Entry rtkSettingsEntries[] =
17871787
{ 1, 1, 0, 0, 0, 0, 1, 0, 0, ALL, 0, _bool, 0, & settings.enableTiltCompensation, "enableTiltCompensation", nullptr, },
17881788

17891789
#ifdef COMPILE_UM980
1790-
{ 1, 1, 1, 0, 0, 0, 1, 0, 0, U98, 0, tUmConst, MAX_UM980_CONSTELLATIONS, & settings.um980Constellations, "constellation_", nullptr, },
1790+
{ 1, 1, 1, 0, 0, 0, 1, 0, 0, U98, 0, tUmConst, MAX_UM980_CONSTELLATIONS, & settings.um980Constellations, "constellation_", gnssCmdUpdateConstellations, },
17911791
{ 0, 1, 1, 0, 0, 0, 1, 0, 0, U98, 0, tUmMRNmea, MAX_UM980_NMEA_MSG, & settings.um980MessageRatesNMEA, "messageRateNMEA_", nullptr, },
17921792
{ 0, 1, 1, 0, 0, 0, 1, 0, 0, U98, 0, tUmMRBaRT, MAX_UM980_RTCM_MSG, & settings.um980MessageRatesRTCMBase, "messageRateRTCMBase_", nullptr, },
17931793
{ 0, 1, 1, 0, 0, 0, 1, 0, 0, U98, 0, tUmMRRvRT, MAX_UM980_RTCM_MSG, & settings.um980MessageRatesRTCMRover, "messageRateRTCMRover_", nullptr, },
@@ -1836,7 +1836,7 @@ const RTK_Settings_Entry rtkSettingsEntries[] =
18361836
// g s x k 2 c h d d x 2 Type Qual Variable Name afterSetCmd
18371837

18381838
#ifdef COMPILE_LG290P
1839-
{ 1, 1, 1, 0, 0, 0, 0, 0, 1, L29, 1, tLgConst, MAX_LG290P_CONSTELLATIONS, & settings.lg290pConstellations, "constellation_", nullptr, },
1839+
{ 1, 1, 1, 0, 0, 0, 0, 0, 1, L29, 1, tLgConst, MAX_LG290P_CONSTELLATIONS, & settings.lg290pConstellations, "constellation_", gnssCmdUpdateConstellations, },
18401840
{ 0, 1, 1, 0, 0, 0, 0, 0, 1, L29, 1, tLgMRNmea, MAX_LG290P_NMEA_MSG, & settings.lg290pMessageRatesNMEA, "messageRateNMEA_", nullptr, },
18411841
{ 0, 1, 1, 0, 0, 0, 0, 0, 1, L29, 1, tLgMRBaRT, MAX_LG290P_RTCM_MSG, & settings.lg290pMessageRatesRTCMBase, "messageRateRTCMBase_", nullptr, },
18421842
{ 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)