Skip to content

Commit 2c9c410

Browse files
Mark JessopMark Jessop
authored andcommitted
Add fix for paylods with no modulation field
1 parent cad4b96 commit 2c9c410

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

js/tracker.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1527,7 +1527,15 @@ function updateVehicleInfo(vcallsign, newPosition) {
15271527

15281528
// Decide if we should enable the 'Float' button.
15291529
// Enable this based on either a very low ascent rate, or if the payload is using WSPR (in which case it's likely a picoballoon)
1530-
var float_button_enabled = (newPosition.gps_alt > 3000 && vehicle.ascent_rate < 1 && vehicle.ascent_rate > -1) || (vehicle.curr_position.data.modulation.includes('WSPR'));
1530+
var float_button_enabled = (newPosition.gps_alt > 3000 && vehicle.ascent_rate < 1 && vehicle.ascent_rate > -1);
1531+
1532+
if(vehicle.vehicle_type != "car"){
1533+
if(vehicle.curr_position.data.hasOwnProperty('modulation')){
1534+
if(vehicle.curr_position.data.modulation.includes('WSPR')){
1535+
float_button_enabled = true;
1536+
}
1537+
}
1538+
}
15311539

15321540

15331541
//desktop

0 commit comments

Comments
 (0)