@@ -155,6 +155,7 @@ function parseIncoming(msg) {
155155 //Force element updates
156156 ge("profileNumber").dispatchEvent(new CustomEvent('change'));
157157 ge("profileName").dispatchEvent(new CustomEvent('change'));
158+ ge("bootProfileNumber").dispatchEvent(new CustomEvent('change'));
158159 ge("measurementRateHz").dispatchEvent(new CustomEvent('change'));
159160 ge("baseTypeSurveyIn").dispatchEvent(new CustomEvent('change'));
160161 ge("baseTypeFixed").dispatchEvent(new CustomEvent('change'));
@@ -241,6 +242,7 @@ function validateFields() {
241242 //Profile Config
242243 checkElementValue("profileNumber", 1, 8, "Must be between 1 and 8", "collapseProfileConfig");
243244 checkElementString("profileName", 1, 49, "Must be 1 to 49 characters", "collapseProfileConfig");
245+ checkBitMapValue("bootProfileNumber", 1, 8, "activeProfiles", "Must be an active profile between 1 and 8", "collapseProfileConfig");
244246
245247 //GNSS Config
246248 checkElementValue("measurementRateHz", 0.00012, 10, "Must be between 0.00012 and 10Hz", "collapseGNSSConfig");
@@ -490,6 +492,19 @@ function checkConstellations() {
490492 clearError("ubxConstellations");
491493}
492494
495+ function checkBitMapValue(id, min, max, bitMap, errorText, collapseID) {
496+ value = ge(id).value;
497+ mask = ge(bitMap).value;
498+ if ((value < min) || (value > max) || ((mask & (1 << value)) == 0)) {
499+ ge(id + 'Error').innerHTML = 'Error: ' + errorText;
500+ ge(collapseID).classList.add('show');
501+ errorCount++;
502+ }
503+ else {
504+ clearError(id);
505+ }
506+ }
507+
493508function checkElementValue(id, min, max, errorText, collapseID) {
494509 value = ge(id).value;
495510 if (value < min || value > max) {
@@ -906,7 +921,7 @@ static const char *index_html = R"=====(
906921 </div>
907922
908923 <div class="form-group row mt-2">
909- <span id="profileList " style="display:inline; margin-left:20px;"><Strong>Profiles</strong></span>
924+ <span id="activeProfiles " style="display:inline; margin-left:20px;"><Strong>Profiles</strong></span>
910925 </div>
911926 <div class="form-group row">
912927 <span id="profile0Name" style="display:inline; margin-left:40px;">1: 12345678901234567890123456789012345678901234567890</span>
0 commit comments