Skip to content

Commit 68e3f5c

Browse files
committed
Fix Bluetooth on AP config
1 parent 29f531a commit 68e3f5c

File tree

3 files changed

+29
-34
lines changed

3 files changed

+29
-34
lines changed

Firmware/RTK_Surveyor/AP-Config/index.html

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1468,7 +1468,7 @@ <h2>
14681468

14691469
<div class="form-check">
14701470
<div class="form-check mt-3">
1471-
<label class="form-check-label" for="forgetRadios">Enable Forget All Radios</label>
1471+
<label class="form-check-label" for="enableForgetRadios">Enable Forget All Radios</label>
14721472
<input class="form-check-input" type="checkbox" value="" id="enableForgetRadios" unchecked>
14731473
<span class="tt" data-bs-placement="right"
14741474
title="To prevent accidental deletion of paired radios the checkbox must first be checked before the button is pressed.">
@@ -1550,25 +1550,21 @@ <h2>
15501550
</div>
15511551
</div>
15521552

1553-
<div class="col-sm-7 col-12 mt-2" id="bluetoothOptions">
1554-
Bluetooth<span class="tt" data-bs-placement="right"
1553+
<br>
1554+
<div id="bluetoothRadioTypeDropdown" class="mb-2">
1555+
<label for="bluetoothRadioType">Bluetooth Protocol: </label>
1556+
<select name="bluetoothRadioType" id="bluetoothRadioType" class="form-dropdown">
1557+
<option value="0">SPP</option>
1558+
<option value="1">BLE</option>
1559+
<option value="2">Off</option>
1560+
</select>
1561+
<span class="tt" data-bs-placement="right"
15551562
title="Communicate using Classic Bluetooth Serial Port Profile (SPP), Bluetooth Low-Energy (BLE), or turn Bluetooth off. Default: SPP as nearly all GIS applications use SPP.">
15561563
<span class="icon-info-circle text-primary ms-2"></span>
1557-
</span><br>
1558-
1559-
<input type="radio" id="btSPP" name="bluetoothRadioType" value="0"
1560-
class="form-radio box-margin20" checked>
1561-
<label for="btSPP">SPP</label><br>
1562-
1563-
<input type="radio" id="btBLE" name="bluetoothRadioType" value="1"
1564-
class="form-radio box-margin20">
1565-
<label for="btBLE">BLE</label><br>
1566-
1567-
<input type="radio" id="btOff" name="bluetoothRadioType" value="2"
1568-
class="form-radio box-margin20">
1569-
<label for="btOff">Off</label><br>
1564+
</span>
15701565
</div>
15711566

1567+
15721568
<div class="form-check mt-3">
15731569
<label class="form-check-label" for="enableFactoryDefaults">Enable Factory Defaults</label>
15741570
<input class="form-check-input" type="checkbox" value="" id="enableFactoryDefaults" unchecked>

Firmware/RTK_Surveyor/Form.ino

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -632,10 +632,12 @@ void updateSettingWithValue(const char *settingName, const char* settingValueStr
632632
settings.antennaHeight = settingValue;
633633
else if (strcmp(settingName, "antennaReferencePoint") == 0)
634634
settings.antennaReferencePoint = settingValue;
635-
else if (strcmp(settingName, "btType") == 0)
636-
settings.fixedBaseCoordinateType = (BluetoothRadioType_e)settingValue; //0 = SPP, 1 = BLE, 2 = Off
635+
else if (strcmp(settingName, "bluetoothRadioType") == 0)
636+
settings.bluetoothRadioType = (BluetoothRadioType_e)settingValue; //0 = SPP, 1 = BLE, 2 = Off
637637
else if (strcmp(settingName, "espnowBroadcast") == 0)
638638
settings.espnowBroadcast = settingValueBool;
639+
else if (strcmp(settingName, "radioType") == 0)
640+
settings.radioType = (RadioType_e)settingValue; //0 = Radio off, 1 = ESP-Now
639641

640642
//Unused variables - read to avoid errors
641643
else if (strcmp(settingName, "measurementRateSec") == 0) {}
@@ -644,6 +646,7 @@ void updateSettingWithValue(const char *settingName, const char* settingValueStr
644646
else if (strcmp(settingName, "saveToArduino") == 0) {}
645647
else if (strcmp(settingName, "enableFactoryDefaults") == 0) {}
646648
else if (strcmp(settingName, "enableFirmwareUpdate") == 0) {}
649+
else if (strcmp(settingName, "enableForgetRadios") == 0) {}
647650

648651
//Special actions
649652
else if (strcmp(settingName, "firmwareFileName") == 0)

Firmware/RTK_Surveyor/form.h

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2406,7 +2406,7 @@ static const char *index_html = R"=====(
24062406

24072407
<div class="form-check">
24082408
<div class="form-check mt-3">
2409-
<label class="form-check-label" for="forgetRadios">Enable Forget All Radios</label>
2409+
<label class="form-check-label" for="enableForgetRadios">Enable Forget All Radios</label>
24102410
<input class="form-check-input" type="checkbox" value="" id="enableForgetRadios" unchecked>
24112411
<span class="tt" data-bs-placement="right"
24122412
title="To prevent accidental deletion of paired radios the checkbox must first be checked before the button is pressed.">
@@ -2488,25 +2488,21 @@ static const char *index_html = R"=====(
24882488
</div>
24892489
</div>
24902490

2491-
<div class="col-sm-7 col-12 mt-2" id="bluetoothOptions">
2492-
Bluetooth<span class="tt" data-bs-placement="right"
2491+
<br>
2492+
<div id="bluetoothRadioTypeDropdown" class="mb-2">
2493+
<label for="bluetoothRadioType">Bluetooth Protocol: </label>
2494+
<select name="bluetoothRadioType" id="bluetoothRadioType" class="form-dropdown">
2495+
<option value="0">SPP</option>
2496+
<option value="1">BLE</option>
2497+
<option value="2">Off</option>
2498+
</select>
2499+
<span class="tt" data-bs-placement="right"
24932500
title="Communicate using Classic Bluetooth Serial Port Profile (SPP), Bluetooth Low-Energy (BLE), or turn Bluetooth off. Default: SPP as nearly all GIS applications use SPP.">
24942501
<span class="icon-info-circle text-primary ms-2"></span>
2495-
</span><br>
2496-
2497-
<input type="radio" id="btSPP" name="bluetoothRadioType" value="0"
2498-
class="form-radio box-margin20" checked>
2499-
<label for="btSPP">SPP</label><br>
2500-
2501-
<input type="radio" id="btBLE" name="bluetoothRadioType" value="1"
2502-
class="form-radio box-margin20">
2503-
<label for="btBLE">BLE</label><br>
2504-
2505-
<input type="radio" id="btOff" name="bluetoothRadioType" value="2"
2506-
class="form-radio box-margin20">
2507-
<label for="btOff">Off</label><br>
2502+
</span>
25082503
</div>
25092504

2505+
25102506
<div class="form-check mt-3">
25112507
<label class="form-check-label" for="enableFactoryDefaults">Enable Factory Defaults</label>
25122508
<input class="form-check-input" type="checkbox" value="" id="enableFactoryDefaults" unchecked>

0 commit comments

Comments
 (0)