@@ -58,26 +58,30 @@ void identifyBoard()
5858
5959 // Order the following ID checks, by millivolt values high to low
6060
61- // GNSSDO: 1/1 --> 1571mV < 1650mV < 1729mV
61+ // GNSSDO: 1/1 --> 1564mV < 1650mV < 1736mV
6262 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;
6468
6569 else
6670 {
6771 systemPrintln (" Out of band or nonexistent resistor IDs" );
68- productVariant = RTK_UNKNOWN ;
72+ productVariant = GNSSDO_UNKNOWN ;
6973 }
7074}
7175
7276void beginBoard ()
7377{
74- if (productVariant == RTK_UNKNOWN )
78+ if (productVariant == GNSSDO_UNKNOWN )
7579 {
7680 reportFatalError (" RTK Variant Unknown" );
7781 }
7882
7983 // Setup hardware pins
80- if (productVariant == RTK_MOSAIC_T )
84+ if (productVariant == GNSSDO || productVariant == GNSSDO_PLUS )
8185 {
8286 // ESP32-WROVER-IE Pin Allocations:
8387 // D0 : Boot + Boot Button
@@ -96,37 +100,32 @@ void beginBoard()
96100 // D19 : I2C SCL2 (SiT5358)
97101 // D21 : I2C SDA (OLED)
98102 // D22 : I2C SCL (OLED)
99- // D23 : N/C
103+ // D23 : Serial TX Alt (mosaic-T COM3 RX)
100104 // D25 : Serial TX (mosaic-T COM4 RX)
101105 // D26 : Serial CTS (mosaic-T COM1 CTS)
102106 // D27 : Serial RTS (mosaic-T COM1 RTS)
103107 // D32 : Error LED
104108 // D33 : Lock LED
105- // A34 : N/C
109+ // A34 : Serial RX Alt (mosaic-T COM3 TX)
106110 // A35 : Device Sense (resistor divider)
107111 // A36 : MRDY (mosaic-T module ready)
108112 // A39 : N/C
109113
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 ;
121115 pin_serial2RX = 4 ;
122-
123- pin_SDA1 = 21 ;
124- pin_SCL1 = 22 ;
125-
116+ pin_serial1RX = 13 ;
117+ pin_serial1TX = 14 ;
126118 pin_SDA2 = 18 ;
127119 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 ;
130129
131130 displayType = DISPLAY_128x64;
132131 }
@@ -287,7 +286,7 @@ void beginFS()
287286// Set LEDs for output and configure PWM
288287void beginLEDs ()
289288{
290- if (productVariant == RTK_MOSAIC_T )
289+ if (productVariant == GNSSDO || productVariant == GNSSDO_PLUS )
291290 {
292291 pinMode (pin_errorLED, OUTPUT);
293292 pinMode (pin_lockLED, OUTPUT);
@@ -317,7 +316,7 @@ void beginSystemState()
317316 factoryReset (false ); // We do not have the SD semaphore
318317 }
319318
320- if (productVariant == RTK_MOSAIC_T )
319+ if (productVariant == GNSSDO || productVariant == GNSSDO_PLUS )
321320 {
322321 if (settings.lastState == STATE_NOT_SET) // Default after factory reset
323322 settings.lastState = STATE_GNSS_NOT_CONFIGURED;
@@ -515,8 +514,16 @@ void pinI2C2Task(void *pvParameters)
515514void beginTCXO (TwoWire *i2cBus)
516515{
517516 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+
520527 // In order of priority: use STP3593LF or SiT5811 if present
521528 if (presentSTP3593LF)
522529 {
@@ -578,6 +585,10 @@ void beginTCXO(TwoWire *i2cBus)
578585 else
579586 {
580587 // 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!" );
581592 strncpy (oscillatorType, " NONE" , sizeof (oscillatorType));
582593 return ;
583594 }
@@ -622,6 +633,7 @@ int64_t getFrequencyControlWord()
622633void updateTCXOClockBias ()
623634{
624635 tcxoClockBias_ms = gnssClockBias_ms; // Default to the PVTGeodetic RxClkBias
636+ tcxoClockDrift_ppm = gnssClockDrift_ppm;
625637 snprintf (rxClkBiasSource, sizeof (rxClkBiasSource), " PVT" );
626638
627639 if (settings.preferNonCompositeGPSBias || settings.preferNonCompositeGalileoBias ) // These are mutex
@@ -630,6 +642,7 @@ void updateTCXOClockBias()
630642 if (fugroTimeSystems[index].updated ) // If we have the preferred non-composite bias, use that
631643 {
632644 tcxoClockBias_ms = fugroTimeSystems[index].RxClkBias_ms ;
645+ tcxoClockDrift_ppm = fugroTimeSystems[index].RxClkDrift_ppm ;
633646 fugroTimeSystems[index].updated = false ;
634647 snprintf (rxClkBiasSource, sizeof (rxClkBiasSource), fugroTimeSystems[index].name );
635648 }
0 commit comments