Skip to content

Commit 8453e0e

Browse files
committed
Merge branch 'release_candidate' into more_web_config_tweaks
2 parents f13550d + 4142eec commit 8453e0e

File tree

4 files changed

+19
-19
lines changed

4 files changed

+19
-19
lines changed

Firmware/RTK_Everywhere/Begin.ino

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -901,8 +901,7 @@ void tickerBegin()
901901
ledcSetup(ledBtChannel, pwmFreq, pwmResolution);
902902
ledcAttachPin(pin_bluetoothStatusLED, ledBtChannel);
903903
ledcWrite(ledBtChannel, 255); // Turn on BT LED at startup
904-
bluetoothLedTask.detach(); // Turn off any previous task
905-
bluetoothLedTask.attach(bluetoothLedTaskPace2Hz, tickerBluetoothLedUpdate); // Rate in seconds, callback
904+
//Attach happens in bluetoothStart()
906905
}
907906

908907
if (pin_gnssStatusLED != PIN_UNDEFINED)

Firmware/RTK_Everywhere/Bluetooth.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,9 @@ void bluetoothStart()
355355

356356
systemPrintln(deviceName);
357357

358+
bluetoothLedTask.detach(); // Reset BT LED blinker task rate to 2Hz
359+
bluetoothLedTask.attach(bluetoothLedTaskPace2Hz, tickerBluetoothLedUpdate); // Rate in seconds, callback
360+
358361
bluetoothState = BT_NOTCONNECTED;
359362
reportHeapNow(false);
360363
online.bluetooth = true;

Firmware/RTK_Everywhere/Network.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ void networkDisplayIpAddress(uint8_t networkType)
389389
{
390390
strcpy(ipAddress, networkGetIpAddress(networkType).toString().c_str());
391391
if (network->type == NETWORK_TYPE_WIFI)
392-
systemPrintf("%s '%s' IP address: %s, RSSI: %d\r\n", networkName[network->type], ipAddress, wifiGetSsid(), wifiGetRssi());
392+
systemPrintf("%s '%s' IP address: %s, RSSI: %d\r\n", networkName[network->type], wifiGetSsid(), ipAddress, wifiGetRssi());
393393
else
394394
systemPrintf("%s IP address: %s\r\n", networkName[network->type], ipAddress);
395395

Firmware/RTK_Everywhere/Tasks.ino

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,22 +1115,8 @@ void handleGnssDataTask(void *e)
11151115
// This is only called if ticker task is started so no pin tests are done
11161116
void tickerBluetoothLedUpdate()
11171117
{
1118-
// Blink on/off while we wait for BT connection
1119-
if (bluetoothGetState() == BT_NOTCONNECTED)
1120-
{
1121-
if (btFadeLevel == 0)
1122-
btFadeLevel = 255;
1123-
else
1124-
btFadeLevel = 0;
1125-
ledcWrite(ledBtChannel, btFadeLevel);
1126-
}
1127-
1128-
// Solid LED if BT Connected
1129-
else if (bluetoothGetState() == BT_CONNECTED)
1130-
ledcWrite(ledBtChannel, 255);
1131-
1132-
// Pulse LED while no BT and we wait for WiFi connection
1133-
else if (wifiState == WIFI_STATE_CONNECTING || wifiState == WIFI_STATE_CONNECTED)
1118+
// If we are in WiFi config mode, fade LED
1119+
if (inWiFiConfigMode() == true)
11341120
{
11351121
// Fade in/out the BT LED during WiFi AP mode
11361122
btFadeLevel += pwmFadeAmount;
@@ -1144,6 +1130,18 @@ void tickerBluetoothLedUpdate()
11441130

11451131
ledcWrite(ledBtChannel, btFadeLevel);
11461132
}
1133+
// Blink on/off while we wait for BT connection
1134+
else if (bluetoothGetState() == BT_NOTCONNECTED)
1135+
{
1136+
if (btFadeLevel == 0)
1137+
btFadeLevel = 255;
1138+
else
1139+
btFadeLevel = 0;
1140+
ledcWrite(ledBtChannel, btFadeLevel);
1141+
}
1142+
// Solid LED if BT Connected
1143+
else if (bluetoothGetState() == BT_CONNECTED)
1144+
ledcWrite(ledBtChannel, 255);
11471145
else
11481146
ledcWrite(ledBtChannel, 0);
11491147
}

0 commit comments

Comments
 (0)