Skip to content

Commit 02cb9a3

Browse files
authored
Merge pull request #713 from sparkfun/pcUpdates
pcUpdates
2 parents 5ac7d47 + 0296a8b commit 02cb9a3

File tree

4 files changed

+25
-3
lines changed

4 files changed

+25
-3
lines changed

Firmware/RTK_Everywhere/Begin.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1822,7 +1822,7 @@ bool i2cBusInitialization(TwoWire *i2cBus, int sda, int scl, int clockKHz)
18221822
// Determine if any devices are on the bus
18231823
if (deviceFound == false)
18241824
{
1825-
systemPrintln("No devices found on the I2C bus");
1825+
systemPrintln("No devices found on this I2C bus");
18261826
return false;
18271827
}
18281828
return true;

Firmware/RTK_Everywhere/RTK_Everywhere.ino

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1310,6 +1310,7 @@ void setup()
13101310
gnssDetectReceiverType(); // If we don't know the receiver from the platform, auto-detect it. Uses settings.
13111311

13121312
DMW_b("commandIndexFillActual");
1313+
recordSystemSettings(); // Ensure the possible settings are saved - before we call commandIndexFillActual
13131314
commandIndexFillActual(); // Shrink the commandIndex table now we're certain what GNSS we have
13141315
loadSettings(); // Reload the settings after shrinking commandIndex
13151316
recordSystemSettings(); // Save the reduced settings now we're certain what GNSS we have

Firmware/RTK_Everywhere/menuMessages.ino

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,10 +553,16 @@ void checkGNSSArrayDefaults()
553553
if (present.gnss_zedf9p)
554554
{
555555
if (settings.dynamicModel == 254)
556+
{
557+
defaultsApplied = true;
556558
settings.dynamicModel = DYN_MODEL_PORTABLE;
559+
}
557560

558561
if (settings.enableExtCorrRadio == 254)
562+
{
563+
defaultsApplied = true;
559564
settings.enableExtCorrRadio = true;
565+
}
560566

561567
if (settings.ubxMessageRates[0] == 254)
562568
{
@@ -593,10 +599,16 @@ void checkGNSSArrayDefaults()
593599
else if (present.gnss_um980)
594600
{
595601
if (settings.dynamicModel == 254)
602+
{
603+
defaultsApplied = true;
596604
settings.dynamicModel = UM980_DYN_MODEL_SURVEY;
605+
}
597606

598607
if (settings.enableExtCorrRadio == 254)
608+
{
609+
defaultsApplied = true;
599610
settings.enableExtCorrRadio = false;
611+
}
600612

601613
if (settings.um980Constellations[0] == 254)
602614
{
@@ -640,10 +652,16 @@ void checkGNSSArrayDefaults()
640652
else if (present.gnss_mosaicX5)
641653
{
642654
if (settings.dynamicModel == 254)
655+
{
656+
defaultsApplied = true;
643657
settings.dynamicModel = MOSAIC_DYN_MODEL_QUASISTATIC;
658+
}
644659

645660
if (settings.enableExtCorrRadio == 254)
661+
{
662+
defaultsApplied = true;
646663
settings.enableExtCorrRadio = true;
664+
}
647665

648666
if (settings.mosaicConstellations[0] == 254)
649667
{
@@ -701,7 +719,10 @@ void checkGNSSArrayDefaults()
701719
else if (present.gnss_lg290p)
702720
{
703721
if (settings.enableExtCorrRadio == 254)
722+
{
723+
defaultsApplied = true;
704724
settings.enableExtCorrRadio = false;
725+
}
705726

706727
if (settings.lg290pConstellations[0] == 254)
707728
{

Firmware/RTK_Everywhere/settings.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1318,7 +1318,7 @@ const RTK_Settings_Entry rtkSettingsEntries[] =
13181318
{ 1, 1, 0, 1, 1, 1, 1, 1, 1, ALL, _int, 0, & settings.correctionsSourcesLifetime_s, "correctionsSourcesLifetime", },
13191319
{ 1, 1, 1, 1, 1, 1, 1, 1, 1, ALL, tCorrSPri, CORR_NUM, & settings.correctionsSourcesPriority, "correctionsPriority_", },
13201320
{ 0, 0, 0, 1, 1, 1, 1, 1, 1, ALL, _bool, 0, & settings.debugCorrections, "debugCorrections", },
1321-
{ 1, 1, 0, 1, 1, 1, 0, 1, 1, ALL, _bool, 0, & settings.enableExtCorrRadio, "enableExtCorrRadio", },
1321+
{ 1, 1, 0, 1, 1, 1, 0, 1, 1, ALL, _uint8_t, 0, & settings.enableExtCorrRadio, "enableExtCorrRadio", }, // uint8_t needed for 254
13221322
{ 1, 1, 0, 1, 1, 0, 0, 1, 0, NON, _uint8_t, 0, & settings.extCorrRadioSPARTNSource, "extCorrRadioSPARTNSource", },
13231323

13241324
// F
@@ -1588,7 +1588,7 @@ const RTK_Settings_Entry rtkSettingsEntries[] =
15881588
{ 0, 0, 0, 1, 1, 1, 1, 1, 1, ALL, _int, 0, & settings.gnssHandlerBufferSize, "gnssHandlerBufferSize", },
15891589

15901590
// Rover operation
1591-
{ 1, 1, 0, 1, 1, 1, 1, 1, 1, ALL, _uint8_t, 0, & settings.dynamicModel, "dynamicModel", },
1591+
{ 1, 1, 0, 1, 1, 1, 1, 1, 0, ALL, _uint8_t, 0, & settings.dynamicModel, "dynamicModel", },
15921592
{ 0, 0, 0, 1, 1, 1, 1, 1, 1, ALL, _bool, 0, & settings.enablePrintRoverAccuracy, "enablePrintRoverAccuracy", },
15931593
{ 1, 1, 0, 1, 1, 1, 1, 1, 1, ALL, _int16_t, 0, & settings.minCNO, "minCNO", },
15941594
{ 1, 1, 0, 1, 1, 1, 1, 1, 1, ALL, _uint8_t, 0, & settings.minElev, "minElev", },

0 commit comments

Comments
 (0)