Skip to content

Commit 569cecd

Browse files
committed
Add Sensor Config to AP html.
1 parent 77a6089 commit 569cecd

File tree

4 files changed

+32
-4
lines changed

4 files changed

+32
-4
lines changed

Firmware/RTK_Surveyor/AP-Config/src/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ function parseIncoming(msg) {
3939
ge("muxChannel2").innerHTML = "Wheel/Dir Encoder";
4040

4141
hide("baseConfig"); //Hide Base Config section
42+
show("sensorConfig"); //Hide Base Config section
4243

4344
hide("msgUBX_NAV_SVIN"); //Hide unsupported messages
4445
hide("msgUBX_RTCM_1005");
@@ -130,7 +131,7 @@ function sendData() {
130131
settingCSV += clsElements[x].id + "," + clsElements[x].checked + ",";
131132
}
132133

133-
//console.log(settingCSV);
134+
console.log("Sending: " + settingCSV);
134135
ws.send(settingCSV);
135136
}
136137

Firmware/RTK_Surveyor/Form.ino

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,9 @@ void createSettingsString(char* settingsCSV)
273273
stringRecord(settingsCSV, "mountPoint", settings.mountPoint);
274274
stringRecord(settingsCSV, "mountPointPW", settings.mountPointPW);
275275

276+
//Sensor Fusion Config
277+
stringRecord(settingsCSV, "autoIMUmountAlignment", settings.autoIMUmountAlignment);
278+
276279
//System Config
277280
stringRecord(settingsCSV, "enableLogging", settings.enableLogging);
278281
stringRecord(settingsCSV, "maxLogTime_minutes", settings.maxLogTime_minutes);
@@ -360,6 +363,8 @@ void updateSettingWithValue(const char *settingName, const char* settingValueStr
360363
settings.enableLogging = settingValueBool;
361364
else if (strcmp(settingName, "dataPortChannel") == 0)
362365
settings.dataPortChannel = (muxConnectionType_e)settingValue;
366+
else if (strcmp(settingName, "autoIMUmountAlignment") == 0)
367+
settings.autoIMUmountAlignment = settingValue;
363368

364369
//Unused variables - read to avoid errors
365370
else if (strcmp(settingName, "measurementRateSec") == 0) {}

Firmware/RTK_Surveyor/RTK_Surveyor.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
const int FIRMWARE_VERSION_MAJOR = 1;
4242
const int FIRMWARE_VERSION_MINOR = 5;
4343

44-
//#define COMPILE_WIFI 1 //Comment out to remove all WiFi functionality
45-
//#define COMPILE_BT 1 //Comment out to disable all Bluetooth
44+
#define COMPILE_WIFI 1 //Comment out to remove all WiFi functionality
45+
#define COMPILE_BT 1 //Comment out to disable all Bluetooth
4646

4747
//Define the RTK board identifier:
4848
// This is an int which is unique to this variant of the RTK Surveyor hardware which allows us

Firmware/RTK_Surveyor/form.h

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ function parseIncoming(msg) {
5353
ge("muxChannel2").innerHTML = "Wheel/Dir Encoder";
5454

5555
hide("baseConfig"); //Hide Base Config section
56+
show("sensorConfig"); //Hide Base Config section
5657

5758
hide("msgUBX_NAV_SVIN"); //Hide unsupported messages
5859
hide("msgUBX_RTCM_1005");
@@ -144,7 +145,7 @@ function sendData() {
144145
settingCSV += clsElements[x].id + "," + clsElements[x].checked + ",";
145146
}
146147

147-
//console.log(settingCSV);
148+
console.log("Sending: " + settingCSV);
148149
ws.send(settingCSV);
149150
}
150151

@@ -1455,6 +1456,27 @@ static const char *index_html = R"=====(
14551456
</div>
14561457
</div>
14571458

1459+
<!-- --------- Sensor Fusion Config --------- -->
1460+
1461+
<div class="d-grid gap-2">
1462+
<button class="btn btn-primary mt-3 toggle-btn" id="sensorConfig" type="button" data-toggle="collapse"
1463+
data-target="#collapseSensorConfig" aria-expanded="false" aria-controls="collapseSensorConfig"
1464+
style="display:none;">
1465+
Sensor Configuration <i class="caret-icon bi bi-caret-down-fill"></i>
1466+
</button>
1467+
</div>
1468+
<div class="collapse" id="collapseSensorConfig">
1469+
<div class="card card-body">
1470+
1471+
<div class="form-check">
1472+
<label class="form-check-label" for="autoIMUmountAlignment">Enable Auto IMU-mount
1473+
Alignment</label>
1474+
<input class="form-check-input" type="checkbox" value="" id="autoIMUmountAlignment">
1475+
</div>
1476+
1477+
</div>
1478+
</div>
1479+
14581480
<!-- --------- Ports Config --------- -->
14591481

14601482
<div class="d-grid gap-2">

0 commit comments

Comments
 (0)