@@ -1233,9 +1233,60 @@ function load_gps(log) {
1233
1233
heading . innerHTML = "GPS " + ( inst + 1 )
1234
1234
fieldset . appendChild ( heading )
1235
1235
1236
+ // Try and decode the type param
1237
+ let types = [ ]
1238
+ types [ 0 ] = "None"
1239
+ types [ 1 ] = "AUTO"
1240
+ types [ 2 ] = "uBlox"
1241
+ types [ 5 ] = "NMEA"
1242
+ types [ 6 ] = "SiRF"
1243
+ types [ 7 ] = "HIL"
1244
+ types [ 8 ] = "SwiftNav"
1245
+ types [ 9 ] = "DroneCAN"
1246
+ types [ 10 ] = "SBF"
1247
+ types [ 11 ] = "GSOF"
1248
+ types [ 13 ] = "ERB"
1249
+ types [ 14 ] = "MAV"
1250
+ types [ 15 ] = "NOVA"
1251
+ types [ 16 ] = "HemisphereNMEA"
1252
+ types [ 17 ] = "uBlox-MovingBaseline-Base"
1253
+ types [ 18 ] = "uBlox-MovingBaseline-Rover"
1254
+ types [ 19 ] = "MSP"
1255
+ types [ 20 ] = "AllyStar"
1256
+ types [ 21 ] = "ExternalAHRS"
1257
+ types [ 22 ] = "DroneCAN-MovingBaseline-Base"
1258
+ types [ 23 ] = "DroneCAN-MovingBaseline-Rover"
1259
+ types [ 24 ] = "UnicoreNMEA"
1260
+ types [ 25 ] = "UnicoreMovingBaselineNMEA"
1261
+ types [ 26 ] = "SBF-DualAntenna"
1262
+
1263
+ if ( types [ gps_info . type ] != null ) {
1264
+ fieldset . appendChild ( document . createTextNode ( "Type " + gps_info . type + ": " + types [ gps_info . type ] ) )
1265
+ fieldset . appendChild ( document . createElement ( "br" ) )
1266
+ }
1267
+
1236
1268
fieldset . appendChild ( document . createTextNode ( gps_info . device ) )
1237
1269
fieldset . appendChild ( document . createElement ( "br" ) )
1238
1270
1271
+ // If DroneCAN type we can print the node name
1272
+ if ( ( gps_info . type == 9 ) || ( gps_info . type == 22 ) || ( gps_info . type == 23 ) ) {
1273
+
1274
+ // Can't tell which bus, so give up if the node ID is found on both
1275
+ let can_device
1276
+ let can_count = 0
1277
+ for ( const [ driver_num , can_driver ] of Object . entries ( can ) ) {
1278
+ if ( gps_info . node_id in can_driver ) {
1279
+ can_device = can_driver [ gps_info . node_id ] [ 0 ]
1280
+ can_count ++
1281
+ }
1282
+ }
1283
+
1284
+ if ( ( can_device != null ) && ( can_count == 1 ) ) {
1285
+ fieldset . appendChild ( document . createTextNode ( "Name: " + can_device . name ) )
1286
+ fieldset . appendChild ( document . createElement ( "br" ) )
1287
+ }
1288
+ }
1289
+
1239
1290
return fieldset
1240
1291
}
1241
1292
0 commit comments