Skip to content

Commit 91f426f

Browse files
committed
Non-impact comment and function cleanup
1 parent 43ba79e commit 91f426f

File tree

2 files changed

+11
-15
lines changed

2 files changed

+11
-15
lines changed

Firmware/RTK_Surveyor/Begin.ino

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,9 @@ void beginSD()
207207
}
208208

209209
online.microSD = true;
210+
211+
Serial.println(F("microSD online"));
212+
scanForFirmware(); //See if SD card contains new firmware that should be loaded at startup
210213
}
211214
else
212215
{
@@ -225,7 +228,7 @@ void beginUART2()
225228
"UARTStart", //Just for humans
226229
2000, //Stack Size
227230
NULL, //Task input parameter
228-
0, // Priority, with 3 (configMAX_PRIORITIES - 1) being the highest, and 0 being the lowest.
231+
0, // Priority, with 3 (configMAX_PRIORITIES - 1) being the highest, and 0 being the lowest
229232
&pinUART2TaskHandle, //Task handle
230233
0); //Core where task should run, 0=core, 1=Arduino
231234

@@ -472,6 +475,6 @@ void beginSystemState()
472475
"BtnCheck", //Just for humans
473476
buttonTaskStackSize, //Stack Size
474477
NULL, //Task input parameter
475-
ButtonCheckTaskPriority, //Priority, with 3 (configMAX_PRIORITIES - 1) being the highest, and 0 being the lowest.
478+
ButtonCheckTaskPriority,
476479
&ButtonCheckTaskHandle); //Task handle
477480
}

Firmware/RTK_Surveyor/RTK_Surveyor.ino

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const int FIRMWARE_VERSION_MINOR = 6;
4343

4444
#define COMPILE_WIFI //Comment out to remove all WiFi functionality
4545
#define COMPILE_BT //Comment out to disable all Bluetooth
46-
//#define ENABLE_DEVELOPER //Uncomment this line to enable special developer modes (don't check power button at startup)
46+
#define ENABLE_DEVELOPER //Uncomment this line to enable special developer modes (don't check power button at startup)
4747

4848
//Define the RTK board identifier:
4949
// This is an int which is unique to this variant of the RTK Surveyor hardware which allows us
@@ -217,7 +217,7 @@ uint8_t rBuffer[SERIAL_SIZE_RX]; //Buffer for reading from F9P to SPP
217217
uint8_t wBuffer[SERIAL_SIZE_RX]; //Buffer for writing from incoming SPP to F9P
218218
TaskHandle_t F9PSerialReadTaskHandle = NULL; //Store handles so that we can kill them if user goes into WiFi NTRIP Server mode
219219
TaskHandle_t F9PSerialWriteTaskHandle = NULL; //Store handles so that we can kill them if user goes into WiFi NTRIP Server mode
220-
const uint8_t F9PSerialWriteTaskPriority = 1; //3 being the highest, and 0 being the lowest.
220+
const uint8_t F9PSerialWriteTaskPriority = 1; //3 being the highest, and 0 being the lowest
221221
const uint8_t F9PSerialReadTaskPriority = 1;
222222

223223
TaskHandle_t pinUART2TaskHandle = NULL; //Dummy task to start UART2 on core 0.
@@ -271,7 +271,7 @@ Button *setupBtn = NULL; //We can't instantiate the buttons here because we don'
271271
Button *powerBtn = NULL;
272272

273273
TaskHandle_t ButtonCheckTaskHandle = NULL;
274-
const uint8_t ButtonCheckTaskPriority = 1; //3 being the highest, and 0 being the lowest.
274+
const uint8_t ButtonCheckTaskPriority = 1; //3 being the highest, and 0 being the lowest
275275
const int buttonTaskStackSize = 2000;
276276

277277
const int shutDownButtonTime = 2000; //ms press and hold before shutdown
@@ -356,34 +356,27 @@ void setup()
356356
Serial.begin(115200); //UART0 for programming and debugging
357357

358358
Wire.begin(); //Start I2C on core 1
359-
//Wire.setClock(400000);
360-
Wire.setClock(100000);
359+
Wire.setClock(100000); //Confirm we are at 100kHz
361360

362361
beginGNSS(); //Connect to GNSS
363362

364363
beginEEPROM(); //Start EEPROM and SD for settings
364+
//eepromErase(); //Must be before first use of EEPROM. Currently in beginBoard().
365365

366366
beginBoard(); //Determine what hardware platform we are running on
367367

368368
beginDisplay(); //Check if an external Qwiic OLED is attached
369369

370370
beginLEDs(); //LED and PWM setup
371371

372-
//eepromErase();
373-
374372
beginSD(); //Test if SD is present
375-
if (online.microSD == true)
376-
{
377-
Serial.println(F("microSD online"));
378-
scanForFirmware(); //See if SD card contains new firmware that should be loaded at startup
379-
}
380373

381374
loadSettings(); //Attempt to load settings after SD is started so we can read the settings file if available
382375

383376
beginUART2(); //Start UART2 on core 0, used to receive serial from ZED and pass out over SPP
384377

385378
beginFuelGauge(); //Configure battery fuel guage monitor
386-
checkBatteryLevels(); //Force display so you see battery level immediately at power on
379+
checkBatteryLevels(); //Force check so you see battery level immediately at power on
387380

388381
configureGNSS(); //Configure ZED module
389382

0 commit comments

Comments
 (0)