Skip to content

Commit

Permalink
Merge pull request #538 from sparkfun/release_candidate
Browse files Browse the repository at this point in the history
Merge v3.6 changes
  • Loading branch information
nseidle authored Jul 27, 2023
2 parents 1c6ffc5 + 5e9ed31 commit 3d5677d
Show file tree
Hide file tree
Showing 30 changed files with 2,223 additions and 807 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/compile-rtk-firmware.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
env:
FILENAME_PREFIX: RTK_Surveyor_Firmware
FIRMWARE_VERSION_MAJOR: 3
FIRMWARE_VERSION_MINOR: 5
FIRMWARE_VERSION_MINOR: 6
POINTPERFECT_TOKEN: ${{ secrets.POINTPERFECT_TOKEN }}

jobs:
Expand Down
7 changes: 4 additions & 3 deletions Firmware/RTK_Surveyor/Begin.ino
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,9 @@ void beginBoard()
strncpy(platformPrefix, "Reference Station", sizeof(platformPrefix) - 1);
}

systemPrintf("SparkFun RTK %s v%d.%d-%s\r\n", platformPrefix, FIRMWARE_VERSION_MAJOR, FIRMWARE_VERSION_MINOR,
__DATE__);
char versionString[21];
getFirmwareVersion(versionString, sizeof(versionString), true);
systemPrintf("SparkFun RTK %s %s\r\n", platformPrefix, versionString);

// Get unit MAC address
esp_read_mac(wifiMACAddress, ESP_MAC_WIFI_STA);
Expand Down Expand Up @@ -980,7 +981,7 @@ void beginSystemState()
if (systemState > STATE_NOT_SET)
{
systemPrintln("Unknown state - factory reset");
factoryReset();
factoryReset(false); //We do not have the SD semaphore
}

if (productVariant == RTK_SURVEYOR)
Expand Down
8 changes: 5 additions & 3 deletions Firmware/RTK_Surveyor/Bluetooth.ino
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@ void bluetoothStart()
// while (bluetoothPinned == false) // Wait for task to run once
// delay(1);

if (bluetoothSerial->begin(deviceName) == false)
if (bluetoothSerial->begin(deviceName, false, settings.sppRxQueueSize, settings.sppTxQueueSize) ==
false) // localName, isMaster, rxBufferSize, txBufferSize
{
systemPrintln("An error occurred initializing Bluetooth");

Expand Down Expand Up @@ -235,7 +236,8 @@ void bluetoothStart()
void pinBluetoothTask(void *pvParameters)
{
#ifdef COMPILE_BT
if (bluetoothSerial->begin(deviceName) == false)
if (bluetoothSerial->begin(deviceName, false, settings.sppRxQueueSize, settings.sppTxQueueSize) ==
false) // localName, isMaster, rxBufferSize,
{
systemPrintln("An error occurred initializing Bluetooth");

Expand All @@ -246,7 +248,7 @@ void pinBluetoothTask(void *pvParameters)
bluetoothPinned = true;

vTaskDelete(nullptr); // Delete task once it has run once
#endif // COMPILE_BT
#endif // COMPILE_BT
}

// This function stops BT so that it can be restarted later
Expand Down
26 changes: 11 additions & 15 deletions Firmware/RTK_Surveyor/Display.ino
Original file line number Diff line number Diff line change
Expand Up @@ -636,11 +636,7 @@ void displaySplash()

yPos = yPos + fontHeight + 7;
char unitFirmware[50];
if (ENABLE_DEVELOPER)
snprintf(unitFirmware, sizeof(unitFirmware), "v%d.%d-DEV", FIRMWARE_VERSION_MAJOR, FIRMWARE_VERSION_MINOR);
else
snprintf(unitFirmware, sizeof(unitFirmware), "v%d.%d", FIRMWARE_VERSION_MAJOR, FIRMWARE_VERSION_MINOR);

getFirmwareVersion(unitFirmware, sizeof(unitFirmware), false);
printTextCenter(unitFirmware, yPos, QW_FONT_5X7, 1, false);

oled.display();
Expand Down Expand Up @@ -1006,7 +1002,7 @@ uint32_t setWiFiIcon_TwoRadios()
{
firstRadioSpotTimer = millis();

if (wifiIncomingRTCM == true || wifiOutgoingRTCM == true)
if (netIncomingRTCM == true || netOutgoingRTCM == true)
firstRadioSpotBlink ^= 1; // Share the spot
else
firstRadioSpotBlink = false;
Expand All @@ -1032,15 +1028,15 @@ uint32_t setWiFiIcon_TwoRadios()
else
{
// Share the spot. Determine if we need to indicate Up, or Down
if (wifiIncomingRTCM == true)
if (netIncomingRTCM == true)
{
icons |= ICON_DOWN_ARROW_LEFT;
wifiIncomingRTCM = false; // Reset, set during NTRIP Client
netIncomingRTCM = false; // Reset, set during NTRIP Client
}
else if (wifiOutgoingRTCM == true)
else if (netOutgoingRTCM == true)
{
icons |= ICON_UP_ARROW_LEFT;
wifiOutgoingRTCM = false; // Reset, set during NTRIP Server
netOutgoingRTCM = false; // Reset, set during NTRIP Server
}
else
{
Expand Down Expand Up @@ -1093,7 +1089,7 @@ uint32_t setWiFiIcon_ThreeRadios()
{
thirdRadioSpotTimer = millis();

if (wifiIncomingRTCM == true || wifiOutgoingRTCM == true)
if (netIncomingRTCM == true || netOutgoingRTCM == true)
thirdRadioSpotBlink ^= 1; // Share the spot
else
thirdRadioSpotBlink = false;
Expand All @@ -1119,15 +1115,15 @@ uint32_t setWiFiIcon_ThreeRadios()
else
{
// Share the spot. Determine if we need to indicate Up, or Down
if (wifiIncomingRTCM == true)
if (netIncomingRTCM == true)
{
icons |= ICON_DOWN_ARROW_RIGHT;
wifiIncomingRTCM = false; // Reset, set during NTRIP Client
netIncomingRTCM = false; // Reset, set during NTRIP Client
}
else if (wifiOutgoingRTCM == true)
else if (netOutgoingRTCM == true)
{
icons |= ICON_UP_ARROW_RIGHT;
wifiOutgoingRTCM = false; // Reset, set during NTRIP Server
netOutgoingRTCM = false; // Reset, set during NTRIP Server
}
else
{
Expand Down
25 changes: 4 additions & 21 deletions Firmware/RTK_Surveyor/Form.ino
Original file line number Diff line number Diff line change
Expand Up @@ -573,8 +573,7 @@ void createSettingsString(char *newSettings)
stringRecord(newSettings, "platformPrefix", platformPrefix);

char apRtkFirmwareVersion[86];
snprintf(apRtkFirmwareVersion, sizeof(apRtkFirmwareVersion), "v%d.%d-%s", FIRMWARE_VERSION_MAJOR,
FIRMWARE_VERSION_MINOR, __DATE__);
getFirmwareVersion(apRtkFirmwareVersion, sizeof(apRtkFirmwareVersion), true);
stringRecord(newSettings, "rtkFirmwareVersion", apRtkFirmwareVersion);

if (!configureViaEthernet) // ZED type is unknown if we are in configure-via-ethernet mode
Expand Down Expand Up @@ -652,10 +651,6 @@ void createSettingsString(char *newSettings)
stringRecord(newSettings, "ntripClient_MountPointPW", settings.ntripClient_MountPointPW);
stringRecord(newSettings, "ntripClient_TransmitGGA", settings.ntripClient_TransmitGGA);

// stringRecord(newSettings, "ntripServerUseWiFiNotEthernet", settings.ntripServerUseWiFiNotEthernet); //For future
// expansion stringRecord(newSettings, "ntripClientUseWiFiNotEthernet", settings.ntripClientUseWiFiNotEthernet);
// //For future expansion

// Sensor Fusion Config
stringRecord(newSettings, "enableSensorFusion", settings.enableSensorFusion);
stringRecord(newSettings, "autoIMUmountAlignment", settings.autoIMUmountAlignment);
Expand Down Expand Up @@ -1163,12 +1158,6 @@ void updateSettingWithValue(const char *settingName, const char *settingValueStr
else if (strcmp(settingName, "ntripClient_TransmitGGA") == 0)
settings.ntripClient_TransmitGGA = settingValueBool;

// For future expansion
// else if (strcmp(settingName, "ntripServerUseWiFiNotEthernet") == 0)
// settings.ntripServerUseWiFiNotEthernet = settingValueBool;
// else if (strcmp(settingName, "ntripClientUseWiFiNotEthernet") == 0)
// settings.ntripClientUseWiFiNotEthernet = settingValueBool;

else if (strcmp(settingName, "serialTimeoutGNSS") == 0)
settings.serialTimeoutGNSS = settingValue;
else if (strcmp(settingName, "pointPerfectDeviceProfileToken") == 0)
Expand Down Expand Up @@ -1350,7 +1339,7 @@ void updateSettingWithValue(const char *settingName, const char *settingValueStr
requestChangeState(STATE_ROVER_NOT_STARTED); // If update failed, return to Rover mode.
}
else if (strcmp(settingName, "factoryDefaultReset") == 0)
factoryReset();
factoryReset(false); //We do not have the sdSemaphore
else if (strcmp(settingName, "exitAndReset") == 0)
{
// Confirm receipt
Expand Down Expand Up @@ -1457,14 +1446,8 @@ void updateSettingWithValue(const char *settingName, const char *settingValueStr
if (otaCheckVersion(reportedVersion, sizeof(reportedVersion)))
{
// We got a version number, now determine if it's newer or not
char currentVersion[20];
if (enableRCFirmware == false)
snprintf(currentVersion, sizeof(currentVersion), "%d.%d", FIRMWARE_VERSION_MAJOR,
FIRMWARE_VERSION_MINOR);
else
snprintf(currentVersion, sizeof(currentVersion), "%d.%d-%s", FIRMWARE_VERSION_MAJOR,
FIRMWARE_VERSION_MINOR, __DATE__);

char currentVersion[21];
getFirmwareVersion(currentVersion, sizeof(currentVersion), enableRCFirmware);
if (isReportedVersionNewer(reportedVersion, currentVersion) == true)
{
log_d("New version detected");
Expand Down
Loading

0 comments on commit 3d5677d

Please sign in to comment.