diff options
author | Determinant <[email protected]> | 2024-08-31 23:42:13 -0700 |
---|---|---|
committer | Determinant <[email protected]> | 2024-08-31 23:42:43 -0700 |
commit | 02f63e8356ee5e3500507a588ef0afc41d75630b (patch) | |
tree | b9771e07be180eba1bd7075b978317a64c5d2f7e | |
parent | 1f311f1c0241f7a1c863d1e51f40b02e5d337821 (diff) |
add slip indicator to the PFD
-rwxr-xr-x | app.mjs | 7 | ||||
-rw-r--r-- | package-lock.json | 4 | ||||
-rw-r--r-- | package.json | 2 | ||||
-rw-r--r-- | profile.yaml | 13 |
4 files changed, 16 insertions, 10 deletions
@@ -413,7 +413,8 @@ const renderAttitudeIndicator = (c, display, values) => { const pitch = values[0] || 0; const roll = values[1] || 0; - let src = isObject(display.navs) ? display.navs[values[2]] : null; + const slip = values[2] || 0; + let src = isObject(display.navs) ? display.navs[values[3]] : null; if (!isObject(src)) { src = null; } @@ -512,6 +513,10 @@ const renderAttitudeIndicator = (c, display, values) => { c.moveTo(-3, -(bankR - 9)); c.lineTo(0, -(bankR - 1)); c.lineTo(3, -(bankR - 9)); + + const slipD = -slip * 2; + c.moveTo(-5 + slipD, -(bankR - 9)); + c.lineTo(5 + slipD, -(bankR - 9)); c.stroke(); // draw vertical deflection dots diff --git a/package-lock.json b/package-lock.json index ff5f407..a8193cd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "loupe-flightdeck", - "version": "0.0.4", + "version": "0.0.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "loupe-flightdeck", - "version": "0.0.4", + "version": "0.0.6", "dependencies": { "async": "^3.2.6", "canvas": "^2.11.2", diff --git a/package.json b/package.json index a7861e5..0a89f67 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "loupe-flightdeck", - "version": "0.0.5", + "version": "0.0.6", "description": "Turn your stream deck into a flight deck!", "repository": { "type": "git", diff --git a/profile.yaml b/profile.yaml index 691b6ad..68d48f5 100644 --- a/profile.yaml +++ b/profile.yaml @@ -140,20 +140,21 @@ source: - xplane_dataref: sim/cockpit/gyros/the_ind_ahars_pilot_deg # pitch - xplane_dataref: sim/cockpit/gyros/phi_ind_ahars_pilot_deg # roll + - xplane_dataref: sim/cockpit2/gauges/indicators/slip_deg - xplane_dataref: sim/cockpit2/radios/actuators/HSI_source_select_pilot # navigation source for HSI - xplane_dataref: sim/cockpit2/radios/indicators/hsi_vdef_dots_pilot - xplane_dataref: sim/cockpit2/radios/indicators/hsi_flag_glideslope_pilot # navs contains the mapping from the HSI source value (source[2]) to the index in source[] array navs: 2: - def: 3 - received: 4 + def: 4 + received: 5 0: - def: 3 - received: 4 + def: 4 + received: 5 1: - def: 3 - received: 4 + def: 4 + received: 5 - display: type: alt freq: 24 |