Skip to content

Commit ca2e015

Browse files
committed
Added vertical speed to autopilot
1 parent 0feef48 commit ca2e015

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

static/js/custom/getSimData.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,14 @@ function displayData() {
112112
checkAndUpdateButton("#autopilot-airspeed-hold", autopilot_airspeed_hold);
113113
checkAndUpdateButton("#autopilot-attitude-hold", autopilot_attitude_hold);
114114
checkAndUpdateButton("#autopilot-backcourse-hold", autopilot_backcourse_hold);
115-
checkAndUpdateButton("#autopilot-approach-hold", autopilot_approach_hold)
115+
checkAndUpdateButton("#autopilot-approach-hold", autopilot_approach_hold);
116+
checkAndUpdateButton("#autopilot-vertical-hold", autopilot_vertical_hold);
116117

117118
$("#autopilot-heading-lock-dir").attr('placeholder', autopilot_heading_lock_dir);
118119
$("#autopilot-altitude-lock-var").attr('placeholder', autopilot_altitude_lock_var);
119120
$("#autopilot-airspeed-hold-var").attr('placeholder', autopilot_airspeed_hold_var);
120121
$("#autopilot-pitch-hold-ref").attr('placeholder', autopilot_pitch_hold_ref);
122+
¢("#autopilot-vertical-hold-ref"),attr('placeholder', autopilot_vertical_hold_var);
121123

122124
//Control surfaces
123125
$("#gear-handle-position").html(gear_handle_position);

templates/glass.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,18 @@ <h3 class="card-title"><span id=airspeed>?</span></h3>
363363
</div>
364364
</td>
365365
</tr>
366+
<tr>
367+
<td>Vertical Speed</td>
368+
<td width="100"><button onclick="temporaryAlert('Error', 'Vertical speed cannot be enabled/disabled from here - please do so in simulator', 'error')" id="autopilot-vertical-hold" type="button" class="btn m-1 btn-danger" style="width: 75px">?</button></td>
369+
<td>
370+
<div class="input-group sim-input-field">
371+
<input id="autopilot-vertical-hold-var" type="text" class="form-control" placeholder="?" aria-describedby="basic-addon2">
372+
<div class="input-group-append">
373+
<button onclick='triggerSimEventFromField ("AP_VS_VAR_SET_ENGLISH", "autopilot-vertical-hold-var", "Setting vertical speed hold")' class="btn btn-outline-primary" type="button">Set</button>
374+
</div>
375+
</div>
376+
</td>
377+
</tr>
366378
<tr>
367379
<td>Airspeed</td>
368380
<td width="100"><button onclick="triggerSimEvent('AP_AIRSPEED_HOLD')" id="autopilot-airspeed-hold" type="button" class="btn m-1 btn-danger" style="width: 75px">?</button></td>

0 commit comments

Comments
 (0)