@@ -58,26 +58,30 @@ void identifyBoard()
58
58
59
59
// Order the following ID checks, by millivolt values high to low
60
60
61
- // GNSSDO: 1/1 --> 1571mV < 1650mV < 1729mV
61
+ // GNSSDO: 1/1 --> 1564mV < 1650mV < 1736mV
62
62
if (idWithAdc (idValue, 1 , 1 ))
63
- productVariant = RTK_MOSAIC_T;
63
+ productVariant = GNSSDO;
64
+
65
+ // GNSSDO+: 1/2.2 --> 2193mV < 2269mV < 2342mV
66
+ else if (idWithAdc (idValue, 1 , 2.2 ))
67
+ productVariant = GNSSDO_PLUS;
64
68
65
69
else
66
70
{
67
71
systemPrintln (" Out of band or nonexistent resistor IDs" );
68
- productVariant = RTK_UNKNOWN ;
72
+ productVariant = GNSSDO_UNKNOWN ;
69
73
}
70
74
}
71
75
72
76
void beginBoard ()
73
77
{
74
- if (productVariant == RTK_UNKNOWN )
78
+ if (productVariant == GNSSDO_UNKNOWN )
75
79
{
76
80
reportFatalError (" RTK Variant Unknown" );
77
81
}
78
82
79
83
// Setup hardware pins
80
- if (productVariant == RTK_MOSAIC_T )
84
+ if (productVariant == GNSSDO || productVariant == GNSSDO_PLUS )
81
85
{
82
86
// ESP32-WROVER-IE Pin Allocations:
83
87
// D0 : Boot + Boot Button
@@ -96,37 +100,32 @@ void beginBoard()
96
100
// D19 : I2C SCL2 (SiT5358)
97
101
// D21 : I2C SDA (OLED)
98
102
// D22 : I2C SCL (OLED)
99
- // D23 : N/C
103
+ // D23 : Serial TX Alt (mosaic-T COM3 RX)
100
104
// D25 : Serial TX (mosaic-T COM4 RX)
101
105
// D26 : Serial CTS (mosaic-T COM1 CTS)
102
106
// D27 : Serial RTS (mosaic-T COM1 RTS)
103
107
// D32 : Error LED
104
108
// D33 : Lock LED
105
- // A34 : N/C
109
+ // A34 : Serial RX Alt (mosaic-T COM3 TX)
106
110
// A35 : Device Sense (resistor divider)
107
111
// A36 : MRDY (mosaic-T module ready)
108
112
// A39 : N/C
109
113
110
- pin_errorLED = 32 ;
111
- pin_lockLED = 33 ;
112
-
113
- pin_serial0TX_Alt = 23 ;
114
- pin_serial0RX_Alt = 34 ;
115
- pin_serial1TX = 14 ;
116
- pin_serial1RX = 13 ;
117
- pin_serial1CTS = 26 ;
118
- pin_serial1RTS = 27 ;
119
-
120
- pin_serial2TX = 25 ;
114
+ pin_setupButton = 0 ;
121
115
pin_serial2RX = 4 ;
122
-
123
- pin_SDA1 = 21 ;
124
- pin_SCL1 = 22 ;
125
-
116
+ pin_serial1RX = 13 ;
117
+ pin_serial1TX = 14 ;
126
118
pin_SDA2 = 18 ;
127
119
pin_SCL2 = 19 ;
128
-
129
- pin_setupButton = 0 ;
120
+ pin_SDA1 = 21 ;
121
+ pin_SCL1 = 22 ;
122
+ pin_serial0TX_Alt = 23 ;
123
+ pin_serial2TX = 25 ;
124
+ pin_serial1CTS = 26 ;
125
+ pin_serial1RTS = 27 ;
126
+ pin_errorLED = 32 ;
127
+ pin_lockLED = 33 ;
128
+ pin_serial0RX_Alt = 34 ;
130
129
131
130
displayType = DISPLAY_128x64;
132
131
}
@@ -287,7 +286,7 @@ void beginFS()
287
286
// Set LEDs for output and configure PWM
288
287
void beginLEDs ()
289
288
{
290
- if (productVariant == RTK_MOSAIC_T )
289
+ if (productVariant == GNSSDO || productVariant == GNSSDO_PLUS )
291
290
{
292
291
pinMode (pin_errorLED, OUTPUT);
293
292
pinMode (pin_lockLED, OUTPUT);
@@ -317,7 +316,7 @@ void beginSystemState()
317
316
factoryReset (false ); // We do not have the SD semaphore
318
317
}
319
318
320
- if (productVariant == RTK_MOSAIC_T )
319
+ if (productVariant == GNSSDO || productVariant == GNSSDO_PLUS )
321
320
{
322
321
if (settings.lastState == STATE_NOT_SET) // Default after factory reset
323
322
settings.lastState = STATE_GNSS_NOT_CONFIGURED;
@@ -515,8 +514,16 @@ void pinI2C2Task(void *pvParameters)
515
514
void beginTCXO (TwoWire *i2cBus)
516
515
{
517
516
if (!i2cBus)
518
- reportFatalError (" Illegal TCXO i2cBus" );
519
-
517
+ {
518
+ // No i2cBus for TCXO
519
+ // There is some redundancy here. If online.tcxo is never set true,
520
+ // the myTCXO-> methods are never called...
521
+ myTCXO = new GNSSDO_TCXO ();
522
+ systemPrintln (" Illegal TCXO i2cBus! TCXO / OCXO not found?" );
523
+ strncpy (oscillatorType, " NONE" , sizeof (oscillatorType));
524
+ return ;
525
+ }
526
+
520
527
// In order of priority: use STP3593LF or SiT5811 if present
521
528
if (presentSTP3593LF)
522
529
{
@@ -578,6 +585,10 @@ void beginTCXO(TwoWire *i2cBus)
578
585
else
579
586
{
580
587
// No TCXO present!
588
+ // There is some redundancy here. If online.tcxo is never set true,
589
+ // the myTCXO-> methods are never called...
590
+ myTCXO = new GNSSDO_TCXO ();
591
+ systemPrintln (" TCXO / OCXO not found!" );
581
592
strncpy (oscillatorType, " NONE" , sizeof (oscillatorType));
582
593
return ;
583
594
}
@@ -622,6 +633,7 @@ int64_t getFrequencyControlWord()
622
633
void updateTCXOClockBias ()
623
634
{
624
635
tcxoClockBias_ms = gnssClockBias_ms; // Default to the PVTGeodetic RxClkBias
636
+ tcxoClockDrift_ppm = gnssClockDrift_ppm;
625
637
snprintf (rxClkBiasSource, sizeof (rxClkBiasSource), " PVT" );
626
638
627
639
if (settings.preferNonCompositeGPSBias || settings.preferNonCompositeGalileoBias ) // These are mutex
@@ -630,6 +642,7 @@ void updateTCXOClockBias()
630
642
if (fugroTimeSystems[index].updated ) // If we have the preferred non-composite bias, use that
631
643
{
632
644
tcxoClockBias_ms = fugroTimeSystems[index].RxClkBias_ms ;
645
+ tcxoClockDrift_ppm = fugroTimeSystems[index].RxClkDrift_ppm ;
633
646
fugroTimeSystems[index].updated = false ;
634
647
snprintf (rxClkBiasSource, sizeof (rxClkBiasSource), fugroTimeSystems[index].name );
635
648
}
0 commit comments