Skip to content

Commit

Permalink
No code changes - Apply VSC whitespace rules
Browse files Browse the repository at this point in the history
  • Loading branch information
nseidle committed Dec 2, 2024
1 parent 83a7eec commit 57750fa
Show file tree
Hide file tree
Showing 43 changed files with 1,356 additions and 1,323 deletions.
31 changes: 16 additions & 15 deletions Firmware/RTK_Everywhere/Begin.ino
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,11 @@ void beginBoard()
{
// Specify the GNSS radio
#ifdef COMPILE_UM980
gnss = (GNSS *) new GNSS_UM980();
#else // COMPILE_UM980
gnss = (GNSS *) new GNSS_None();
gnss = (GNSS *)new GNSS_UM980();
#else // COMPILE_UM980
gnss = (GNSS *)new GNSS_None();
systemPrintln("<<<<<<<<<< !!!!!!!!!! UM980 NOT COMPILED !!!!!!!!!! >>>>>>>>>>");
#endif // COMPILE_UM980
#endif // COMPILE_UM980

present.brand = BRAND_SPARKFUN;
present.psram_2mb = true;
Expand All @@ -215,8 +215,8 @@ void beginBoard()
present.button_powerHigh = true; // Button is pressed when high
present.beeper = true;
present.gnss_to_uart = true;
present.antennaPhaseCenter_mm = 115.7; //Default to Torch helical APC
present.needsExternalPpl = true; // Uses the PointPerfect Library
present.antennaPhaseCenter_mm = 115.7; // Default to Torch helical APC
present.needsExternalPpl = true; // Uses the PointPerfect Library
present.galileoHasCapable = true;
present.multipathMitigation = true; // UM980 has MPM, other platforms do not
present.minCno = true;
Expand Down Expand Up @@ -610,12 +610,12 @@ void beginBoard()
// mosaic COM3 is available as a generic COM port. The firmware configures the baud. Nothing else.

// Specify the GNSS radio
#ifdef COMPILE_MOSAICX5
gnss = (GNSS *) new GNSS_MOSAIC();
#else // COMPILE_MOSAICX5
gnss = (GNSS *) new GNSS_None();
#ifdef COMPILE_MOSAICX5
gnss = (GNSS *)new GNSS_MOSAIC();
#else // COMPILE_MOSAICX5
gnss = (GNSS *)new GNSS_None();
systemPrintln("<<<<<<<<<< !!!!!!!!!! MOSAICX5 NOT COMPILED !!!!!!!!!! >>>>>>>>>>");
#endif // COMPILE_MOSAICX5
#endif // COMPILE_MOSAICX5

present.brand = BRAND_SPARKPNT;
present.psram_4mb = true;
Expand Down Expand Up @@ -690,8 +690,8 @@ void beginBoard()
present.brand = BRAND_SPARKPNT;
present.psram_2mb = true;
present.gnss_lg290p = true;
present.antennaPhaseCenter_mm = 42.0; //Default to SPK6618H APC
present.needsExternalPpl = true; // Uses the PointPerfect Library
present.antennaPhaseCenter_mm = 42.0; // Default to SPK6618H APC
present.needsExternalPpl = true; // Uses the PointPerfect Library
present.gnss_to_uart = true;

// The following are present on the optional shield. Devices will be marked offline if shield is not present.
Expand All @@ -718,7 +718,7 @@ void beginBoard()
pin_PICO = 26;
pin_microSD_CS = 27;

pin_gpioExpanderInterrupt = 14; //Pin 'AOI' on Portability Shield
pin_gpioExpanderInterrupt = 14; // Pin 'AOI' on Portability Shield

pin_bluetoothStatusLED = 0; // Green status LED
// pin_gnssStatusLED = 13;
Expand Down Expand Up @@ -1243,7 +1243,8 @@ void beginFuelGauge()
// Check to see if we are dangerously low
if (batteryLevelPercent < 5 && batteryChargingPercentPerHour < 0.5) // 5% and not charging
{
systemPrintf("Battery too low: %d%%. Charging rate: %0.1f%%/hr. Please charge. Shutting down...\r\n", batteryLevelPercent, batteryChargingPercentPerHour);
systemPrintf("Battery too low: %d%%. Charging rate: %0.1f%%/hr. Please charge. Shutting down...\r\n",
batteryLevelPercent, batteryChargingPercentPerHour);

if (online.display == true)
displayMessage("Charge Battery", 0);
Expand Down
4 changes: 2 additions & 2 deletions Firmware/RTK_Everywhere/Bluetooth.ino
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ void bluetoothUpdate()
bool bluetoothIsConnected()
{
#ifdef COMPILE_BT
if(bluetoothGetState() == BT_OFF)
return(false);
if (bluetoothGetState() == BT_OFF)
return (false);

if (settings.bluetoothRadioType == BLUETOOTH_RADIO_SPP_AND_BLE)
{
Expand Down
29 changes: 14 additions & 15 deletions Firmware/RTK_Everywhere/Cellular.ino
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
//----------------------------------------

#ifdef COMPILE_CELLULAR
#ifdef COMPILE_CELLULAR

// The following define is used to avoid confusion between the cellular
// code and the GNSS code where PPP has a completely different meaning.
// The remaining references to PPP in this code are present due to values
// from the PPP (Point-to-Point Protocol) driver and ARDUINO_EVENT_PPP_*
// events.
#define CELLULAR PPP
#define CELLULAR PPP

//----------------------------------------
// Cellular interface definitions

#define CELLULAR_MODEM_MODEL PPP_MODEM_GENERIC
#define CELLULAR_MODEM_MODEL PPP_MODEM_GENERIC

#define CELLULAR_MODEM_APN "internet"
#define CELLULAR_MODEM_PIN NULL // Personal Identification Number: String in double quotes
#define CELLULAR_MODEM_APN "internet"
#define CELLULAR_MODEM_PIN NULL // Personal Identification Number: String in double quotes

#define CELLULAR_BOOT_DELAY DELAY_SEC(15) // Delay after boot before starting cellular
#define CELLULAR_BOOT_DELAY DELAY_SEC(15) // Delay after boot before starting cellular

#define CELLULAR_ATTACH_POLL_INTERVAL 100 // Milliseconds
#define CELLULAR_ATTACH_POLL_INTERVAL 100 // Milliseconds

//----------------------------------------

Expand All @@ -44,7 +44,7 @@ void cellularAttached(NetIndex_t index, uintptr_t parameter, bool debug)
cellularIsAttached = CELLULAR.attached();
if (cellularIsAttached)
{
// Attached to a mobile network, continue
// Attached to a mobile network, continue
// Display the network information
systemPrintf("Cellular attached to %s\r\n", CELLULAR.operatorName().c_str());

Expand All @@ -69,7 +69,7 @@ void cellularAttached(NetIndex_t index, uintptr_t parameter, bool debug)
// Switch into a state where data may be sent and received
if (debug)
systemPrintln("Switching to data mode...");
CELLULAR.mode(ESP_MODEM_MODE_CMUX); // Data and Command mixed mode
CELLULAR.mode(ESP_MODEM_MODE_CMUX); // Data and Command mixed mode

// Get the next sequence entry
networkSequenceNextEntry(index, debug);
Expand All @@ -86,10 +86,8 @@ void cellularEvent(arduino_event_id_t event)
String module;

// Take the network offline if necessary
if (networkIsInterfaceOnline(NETWORK_CELLULAR)
&& (event != ARDUINO_EVENT_ETH_GOT_IP)
&& (event != ARDUINO_EVENT_ETH_GOT_IP6)
&& (event != ARDUINO_EVENT_PPP_CONNECTED))
if (networkIsInterfaceOnline(NETWORK_CELLULAR) && (event != ARDUINO_EVENT_ETH_GOT_IP) &&
(event != ARDUINO_EVENT_ETH_GOT_IP6) && (event != ARDUINO_EVENT_PPP_CONNECTED))
{
networkMarkOffline(NETWORK_CELLULAR);
}
Expand Down Expand Up @@ -200,7 +198,8 @@ void cellularStart(NetIndex_t index, uintptr_t parameter, bool debug)
// Configure the cellular modem
CELLULAR.setApn(CELLULAR_MODEM_APN);
CELLULAR.setPin(CELLULAR_MODEM_PIN);
CELLULAR.setResetPin(pin_Cellular_Reset, cellularModemResetLow); // v3.0.2 allows you to set the reset delay, but we don't need it
CELLULAR.setResetPin(pin_Cellular_Reset,
cellularModemResetLow); // v3.0.2 allows you to set the reset delay, but we don't need it
CELLULAR.setPins(pin_Cellular_TX, pin_Cellular_RX, pin_Cellular_RTS, pin_Cellular_CTS, CELLULAR_MODEM_FC);

// Now let the PPP turn the modem back on again if needed - with a 200ms reset
Expand Down Expand Up @@ -234,4 +233,4 @@ void cellularStop(NetIndex_t index, uintptr_t parameter, bool debug)
networkSequenceNextEntry(index, debug);
}

#endif // COMPILE_CELLULAR
#endif // COMPILE_CELLULAR
Loading

0 comments on commit 57750fa

Please sign in to comment.