Skip to content

Commit 8f76cf9

Browse files
committed
Rename GPSDO_Firmware
1 parent a49e5f3 commit 8f76cf9

39 files changed

+149
-87
lines changed

.github/workflows/build-for-release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ on:
44
branches:
55

66
env:
7-
FILENAME_PREFIX: RTK_mosaic-T_Firmware
7+
FILENAME_PREFIX: GPSDO_Firmware
88
FIRMWARE_VERSION_MAJOR: 1
9-
FIRMWARE_VERSION_MINOR: 1
9+
FIRMWARE_VERSION_MINOR: 0
1010
CORE_VERSION: 3.0.1
1111

1212
jobs:
@@ -85,16 +85,16 @@ jobs:
8585
cp Firmware/app3M_fat9M_16MB.csv /home/runner/.arduino15/packages/esp32/hardware/esp32/${{ env.CORE_VERSION }}/tools/partitions/app3M_fat9M_16MB.csv
8686

8787
- name: Compile Sketch
88-
run: arduino-cli compile --fqbn "esp32:esp32:esp32":DebugLevel=${{ env.DEBUG_LEVEL }} ./Firmware/RTK_mosaic-T_Firmware/RTK_mosaic-T_Firmware.ino
88+
run: arduino-cli compile --fqbn "esp32:esp32:esp32":DebugLevel=${{ env.DEBUG_LEVEL }} ./Firmware/GPSDO_Firmware/GPSDO_Firmware.ino
8989
--build-property build.partitions=app3M_fat9M_16MB
9090
--build-property upload.maximum_size=3145728
9191
--build-property "compiler.cpp.extra_flags=-MMD -c \"-DFIRMWARE_VERSION_MAJOR=$FIRMWARE_VERSION_MAJOR\" \"-DFIRMWARE_VERSION_MINOR=$FIRMWARE_VERSION_MINOR\""
9292
--export-binaries
9393

9494
- name: Rename binary
9595
run: |
96-
cd Firmware/RTK_mosaic-T_Firmware/build/esp32.esp32.esp32/
97-
mv RTK_mosaic-T_Firmware.ino.bin ../../../Binaries/${{ env.FILENAME_PREFIX }}${{ env.FILE_ENDING_UNDERSCORE }}.bin
96+
cd Firmware/GPSDO_Firmware/build/esp32.esp32.esp32/
97+
mv GPSDO_Firmware.ino.bin ../../../Binaries/${{ env.FILENAME_PREFIX }}${{ env.FILE_ENDING_UNDERSCORE }}.bin
9898
9999
- name: Commit and push binary
100100
uses: actions-js/push@master

.github/workflows/non-release-build.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
branches:
55

66
env:
7-
FILENAME_PREFIX: RTK_mosaic-T_Firmware
7+
FILENAME_PREFIX: GPSDO_Firmware
88
FIRMWARE_VERSION_MAJOR: 9
99
FIRMWARE_VERSION_MINOR: 9
1010
CORE_VERSION: 3.0.1
@@ -85,7 +85,7 @@ jobs:
8585
cp Firmware/app3M_fat9M_16MB.csv /home/runner/.arduino15/packages/esp32/hardware/esp32/${{ env.CORE_VERSION }}/tools/partitions/app3M_fat9M_16MB.csv
8686

8787
- name: Compile Sketch
88-
run: arduino-cli compile --fqbn "esp32:esp32:esp32":DebugLevel=${{ env.DEBUG_LEVEL }} ./Firmware/RTK_mosaic-T_Firmware/RTK_mosaic-T_Firmware.ino
88+
run: arduino-cli compile --fqbn "esp32:esp32:esp32":DebugLevel=${{ env.DEBUG_LEVEL }} ./Firmware/GPSDO_Firmware/GPSDO_Firmware.ino
8989
--build-property build.partitions=app3M_fat9M_16MB
9090
--build-property upload.maximum_size=3145728
9191
--build-property "compiler.cpp.extra_flags=-MMD -c \"-DFIRMWARE_VERSION_MAJOR=$FIRMWARE_VERSION_MAJOR\" \"-DFIRMWARE_VERSION_MINOR=$FIRMWARE_VERSION_MINOR\""
@@ -97,13 +97,13 @@ jobs:
9797
9898
- name: Create artifact directory
9999
run: |
100-
cd Firmware/RTK_mosaic-T_Firmware/build/esp32.esp32.esp32/
100+
cd Firmware/GPSDO_Firmware/build/esp32.esp32.esp32/
101101
mkdir ${{ env.ARTIFACT }}
102-
mv RTK_mosaic-T_Firmware.ino.bin ${{ env.ARTIFACT }}
102+
mv GPSDO_Firmware.ino.bin ${{ env.ARTIFACT }}
103103
104104
- name: Upload artifact directory to action - avoid double-zip
105105
uses: actions/upload-artifact@v3
106106
with:
107107
name: ${{ env.ARTIFACT }}
108-
path: Firmware/RTK_mosaic-T_Firmware/build/esp32.esp32.esp32/${{ env.ARTIFACT }}
108+
path: Firmware/GPSDO_Firmware/build/esp32.esp32.esp32/${{ env.ARTIFACT }}
109109
retention-days: 7
-428 KB
Binary file not shown.
-430 KB
Binary file not shown.

Firmware/RTK_mosaic-T_Firmware/Begin.ino renamed to Firmware/GPSDO_Firmware/Begin.ino

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ void identifyBoard()
5858

5959
// Order the following ID checks, by millivolt values high to low
6060

61-
// RTK mosaic-T: 1/1 --> 1571mV < 1650mV < 1729mV
61+
// GPSDO: 1/1 --> 1571mV < 1650mV < 1729mV
6262
if (idWithAdc(idValue, 1, 1))
6363
productVariant = RTK_MOSAIC_T;
6464

@@ -180,9 +180,15 @@ void beginConsole(uint32_t baud, bool allowAlt)
180180
{
181181
// Don't try to print here. serialConsole may not have been initialized
182182

183+
static bool begun = false;
184+
185+
if (begun)
186+
systemFlush();
187+
183188
if ((!allowAlt) || (!settings.enableTCPServer))
184189
{
185190
serialConsole.begin(baud, SERIAL_8N1, pin_serial0RX, pin_serial0TX);
191+
begun = true;
186192
}
187193
else
188194
{
@@ -193,13 +199,11 @@ void beginConsole(uint32_t baud, bool allowAlt)
193199
else
194200
{
195201
serialConsole.begin(baud, SERIAL_8N1, pin_serial0RX_Alt, pin_serial0TX_Alt);
202+
begun = true;
196203
}
197204
}
198205

199-
delay(10);
200-
201-
while (serialConsole.available())
202-
serialConsole.read();
206+
clearBuffer(); // Does a flush too
203207
}
204208

205209
// We want the UART1 interrupts to be pinned to core 0 to avoid competing with I2C interrupts

Firmware/RTK_mosaic-T_Firmware/Display.ino renamed to Firmware/GPSDO_Firmware/Display.ino

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,11 @@ void beginDisplay(TwoWire *i2cBus)
8383

8484
systemPrintln("Display started");
8585

86-
// Display the SparkFun LOGO
86+
// Display the SparkPNT LOGO
8787
oled->erase();
88-
x = (oled->getWidth() - logoSparkFun_Width) / 2;
89-
y = (oled->getHeight() - logoSparkFun_Height) / 2;
90-
displayBitmap(x, y, logoSparkFun_Width, logoSparkFun_Height, logoSparkFun);
88+
x = (oled->getWidth() - logoSparkPNT_Width) / 2;
89+
y = (oled->getHeight() - logoSparkPNT_Height) / 2;
90+
displayBitmap(x, y, logoSparkPNT_Width, logoSparkPNT_Height, logoSparkPNT);
9191
oled->display();
9292
splashStart = millis();
9393
return;
@@ -191,7 +191,7 @@ void displaySplash()
191191
if (online.display == true)
192192
{
193193
// Display SparkFun Logo for at least 1 second
194-
unsigned long minSplashFor = 1000;
194+
unsigned long minSplashFor = 10000;
195195
while ((millis() - splashStart) < minSplashFor)
196196
delay(10);
197197

File renamed without changes.

Firmware/RTK_mosaic-T_Firmware/GNSS.ino renamed to Firmware/GPSDO_Firmware/GNSS.ino

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ bool sendWithResponse(String message, const char *reply, unsigned long timeout,
8787
// Ensure GNSS is communicating on COM4. Request IPStatus
8888
void beginGNSS()
8989
{
90-
systemPrintln("Begin GNSS - requesting IPStatus");
90+
if (!inMainMenu)
91+
systemPrintln("Begin GNSS - requesting IPStatus");
9192

9293
int retries = 20; // The mosaic takes a few seconds to wake up after power on
9394

@@ -104,7 +105,8 @@ void beginGNSS()
104105
return;
105106
}
106107

107-
systemPrintln("GNSS online. IPStatus requested");
108+
if (!inMainMenu)
109+
systemPrintln("GNSS online. IPStatus requested");
108110
online.gnss = true;
109111
}
110112

@@ -152,7 +154,8 @@ bool initializeGNSS()
152154
if (!online.gnss)
153155
return false;
154156

155-
systemPrintln("Initialize GNSS");
157+
if (!inMainMenu)
158+
systemPrintln("Initialize GNSS");
156159

157160
flushRX(250);
158161

@@ -214,7 +217,8 @@ bool initializeGNSS()
214217
return false;
215218
}
216219

217-
systemPrintln("GNSS initialized");
220+
if (!inMainMenu)
221+
systemPrintln("GNSS initialized");
218222
return true;
219223
}
220224

@@ -223,7 +227,8 @@ bool configureGNSSPPS()
223227
if (!online.gnss)
224228
return false;
225229

226-
systemPrintln("Configuring GNSS PPS");
230+
if (!inMainMenu)
231+
systemPrintln("Configuring GNSS PPS");
227232

228233
String ppsParams = String("spps, ");
229234
ppsParams += String(mosaicPPSParametersInterval[settings.ppsInterval]) + String(", ");
@@ -249,7 +254,8 @@ bool configureGNSSPPS()
249254
return false;
250255
}
251256

252-
systemPrintln("GNSS PPS configured");
257+
if (!inMainMenu)
258+
systemPrintln("GNSS PPS configured");
253259
return true;
254260
}
255261

@@ -258,7 +264,8 @@ bool configureGNSSTCPServer()
258264
if (!online.gnss)
259265
return false;
260266

261-
systemPrintln("Configuring GNSS TCP Server");
267+
if (!inMainMenu)
268+
systemPrintln("Configuring GNSS TCP Server");
262269

263270
String tcpParams = String("siss, IPS1, ");
264271

@@ -304,6 +311,7 @@ bool configureGNSSTCPServer()
304311
}
305312
}
306313

307-
systemPrintln("GNSS TCP Server configured");
314+
if (!inMainMenu)
315+
systemPrintln("GNSS TCP Server configured");
308316
return true;
309317
}

Firmware/RTK_mosaic-T_Firmware/RTK_mosaic-T_Firmware.ino renamed to Firmware/GPSDO_Firmware/GPSDO_Firmware.ino

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
SparkFun Electronics
44
Paul Clark
55
6-
This is the firmware for the SparkFun RTK mosaic-T.
6+
This is the firmware for the SparkFun GPSDO.
77
It runs on an ESP32 and communicates with the mosaic-T and SiT5358.
88
99
Compiled with Arduino v1.8.19 with ESP32 core v3.0.1.
@@ -420,6 +420,17 @@ void loop()
420420
delay(10);
421421
}
422422

423+
// Perform any essential background tasks while waiting for input from the user
424+
// This is just regular code, not a true task. If we ran it in a task, we'd need semaphores etc.
425+
// to avoid COM port collisions...
426+
void performBackgroundTasks()
427+
{
428+
DMW_c("updateSystemState");
429+
updateSystemState(); // Keep updating the system state. This keeps the TCXO updated.
430+
431+
delay(1); // Yield to processor
432+
}
433+
423434
// Once we have a fix, sync system clock to GNSS
424435
void updateRTC()
425436
{

0 commit comments

Comments
 (0)