Include AP modes in info window.

This commit is contained in:
Oliver Jowett 2017-06-16 10:40:22 +01:00
parent 8a52108d77
commit f45a7d61a5
3 changed files with 16 additions and 4 deletions

View file

@ -217,8 +217,14 @@
<div class="infoData infoRowFluid fourColumnSection4"><span id="selected_intent_heading"/></div> <div class="infoData infoRowFluid fourColumnSection4"><span id="selected_intent_heading"/></div>
</div> </div>
<div> <div>
<div class="infoHeading infoRowFluid fourColumnSection1">Alt setting:</div> <div class="infoHeading infoRowFluid fourColumnSection1">AP modes:</div>
<div class="infoData infoRowFluid fourColumnSection2"><span id="selected_alt_setting"/></div> <div class="infoData infoRowFluid fourColumnSection2"><span id="selected_intent_modes"/></div>
<div class="infoHeading infoRowFluid fourColumnSection3">Alt setting:</div>
<div class="infoData infoRowFluid fourColumnSection4"><span id="selected_alt_setting"/></div>
</div>
</div>
<div class="infoBlockSection lightGreyBackground">
<div>
<div class="infoHeading infoRowFluid fourColumnSection1">ADS-B:</div> <div class="infoHeading infoRowFluid fourColumnSection1">ADS-B:</div>
<div class="infoData infoRowFluid fourColumnSection2"><span id="selected_version"/></div> <div class="infoData infoRowFluid fourColumnSection2"><span id="selected_version"/></div>
</div> </div>

View file

@ -23,6 +23,7 @@ function PlaneObject(icao) {
this.roll = null; this.roll = null;
this.intent_alt = null; this.intent_alt = null;
this.intent_heading = null; this.intent_heading = null;
this.intent_modes = null;
this.alt_setting = null; this.alt_setting = null;
this.baro_rate = null; this.baro_rate = null;
this.geom_rate = null; this.geom_rate = null;
@ -430,7 +431,7 @@ PlaneObject.prototype.updateData = function(receiver_timestamp, data) {
var fields = ["altitude", "alt_geom", "gs", "ias", "tas", "track", var fields = ["altitude", "alt_geom", "gs", "ias", "tas", "track",
"track_rate", "mag_heading", "true_heading", "mach", "track_rate", "mag_heading", "true_heading", "mach",
"roll", "intent_alt", "intent_heading", "roll", "intent_alt", "intent_heading", "intent_modes",
"alt_setting", "baro_rate", "geom_rate", "flight", "alt_setting", "baro_rate", "geom_rate", "flight",
"squawk", "category", "version"]; "squawk", "category", "version"];

View file

@ -961,7 +961,12 @@ function refreshSelected() {
$('#selected_alt_setting').text(selected.alt_setting.toFixed(1) + " hPa"); $('#selected_alt_setting').text(selected.alt_setting.toFixed(1) + " hPa");
} }
$('#selected_intent_alt').text(format_altitude_long(selected.intent_alt, 0, DisplayUnits)); $('#selected_intent_alt').text(format_altitude_long(selected.intent_alt, 0, DisplayUnits));
$('#selected_intent_heading').text(format_track_long(selected.intent_heading)) $('#selected_intent_heading').text(format_track_long(selected.intent_heading));
if (selected.intent_modes == null) {
$('#selected_intent_modes').text("n/a");
} else {
$('#selected_intent_modes').text(selected.intent_modes.join());
}
if (selected.version == null) { if (selected.version == null) {
$('#selected_version').text('none'); $('#selected_version').text('none');