@@ -501,8 +501,7 @@ function parseIncoming(msg) {
501
501
correctionsSourcePriorities . push ( correctionPriority ) ;
502
502
}
503
503
else {
504
- console . log ( "Too many corrections sources" ) ;
505
- console . log ( correctionsSourceNames . length ) ;
504
+ console . log ( "Too many corrections sources: " , correctionsSourceNames . length ) ;
506
505
}
507
506
}
508
507
else if ( id . includes ( "checkingNewFirmware" ) ) {
@@ -922,15 +921,7 @@ function validateFields() {
922
921
// }
923
922
924
923
//PointPerfect Config
925
- if ( ge ( "pointPerfectService" ) . value > 0 ) {
926
- value = ge ( "pointPerfectDeviceProfileToken" ) . value ;
927
- if ( value . length > 0 )
928
- checkElementString ( "pointPerfectDeviceProfileToken" , 36 , 36 , "Must be 36 characters" , "collapsePPConfig" ) ;
929
- }
930
- else {
931
- clearElement ( "pointPerfectDeviceProfileToken" , "" ) ;
932
- ge ( "autoKeyRenewal" ) . checked = true ;
933
- }
924
+ checkPointPerfectService ( ) ;
934
925
935
926
//Port Config
936
927
if ( ge ( "enableExternalPulse" ) . checked == true ) {
@@ -1091,8 +1082,8 @@ function saveConfig() {
1091
1082
clearSuccess ( 'saveBtn' ) ;
1092
1083
}
1093
1084
else {
1094
- sendData ( ) ;
1095
1085
clearError ( 'saveBtn' ) ;
1086
+ sendData ( ) ;
1096
1087
showSuccess ( 'saveBtn' , "Saving..." ) ;
1097
1088
}
1098
1089
@@ -1111,6 +1102,30 @@ function checkConstellations() {
1111
1102
clearError ( "gnssConstellations" ) ;
1112
1103
}
1113
1104
1105
+ function checkPointPerfectService ( ) {
1106
+ if ( ge ( "pointPerfectService" ) . value > 0 ) {
1107
+ value = ge ( "pointPerfectDeviceProfileToken" ) . value ;
1108
+ if ( value . length > 0 )
1109
+ checkElementString ( "pointPerfectDeviceProfileToken" , 36 , 36 , "Must be 36 characters" , "collapsePPConfig" ) ;
1110
+
1111
+ if ( networkCount ( ) == 0 ) {
1112
+ showError ( 'pointPerfectService' , "This PointPerfect service requires at least one WiFi network" ) ;
1113
+ ge ( "collapsePPConfig" ) . classList . add ( 'show' ) ;
1114
+ ge ( "collapseWiFiConfig" ) . classList . add ( 'show' ) ;
1115
+ errorCount ++ ;
1116
+ }
1117
+ else {
1118
+ clearError ( "pointPerfectService" ) ;
1119
+ }
1120
+
1121
+ }
1122
+ else {
1123
+ clearElement ( "pointPerfectDeviceProfileToken" , "" ) ;
1124
+ ge ( "autoKeyRenewal" ) . checked = true ;
1125
+ clearError ( "pointPerfectService" ) ;
1126
+ }
1127
+ }
1128
+
1114
1129
function checkBitMapValue ( id , min , max , bitMap , errorText , collapseID ) {
1115
1130
value = ge ( id ) . value ;
1116
1131
mask = ge ( bitMap ) . value ;
@@ -1682,16 +1697,13 @@ document.addEventListener("DOMContentLoaded", (event) => {
1682
1697
} ) ;
1683
1698
1684
1699
ge ( "pointPerfectService" ) . addEventListener ( "change" , function ( ) {
1685
- if ( ge ( "pointPerfectService" ) . value == 1 ) {
1700
+ if ( ge ( "pointPerfectService" ) . value == 1 ) { //Flex RTCM
1686
1701
hide ( "ppSettingsLBandNAConfig" ) ;
1687
- show ( "ppSettingsRtcmConfig" ) ;
1688
1702
}
1689
- else if ( ge ( "pointPerfectService" ) . value == 2 ) {
1690
- hide ( "ppSettingsRtcmConfig" ) ;
1703
+ else if ( ge ( "pointPerfectService" ) . value == 2 ) { //Flex L-Band NA
1691
1704
show ( "ppSettingsLBandNAConfig" ) ;
1692
1705
}
1693
- else { //"pointPerfectService").value == 0
1694
- hide ( "ppSettingsRtcmConfig" ) ;
1706
+ else { //"pointPerfectService").value == 0 //Disabled
1695
1707
hide ( "ppSettingsLBandNAConfig" ) ;
1696
1708
}
1697
1709
} ) ;
0 commit comments