PFD CDI softkey cycles nav source; demo reflects dataref writes
The CDI softkey was in the PFD root row but had no handler — it never cycled the HSI/CDI source (GPS↔VLOC1↔VLOC2). Wire it to write cdiSrc (HSI_source_select_pilot, now writable), cycling GPS→NAV1→NAV2. Also fix a latent demo bug: the 'needs a live sim socket' guard sat above the setDataref/command handlers, so in DEMO (no sim socket) every dataref write (transponder code, baro, AP bugs, CDI) was silently dropped. Reflect writes locally before that guard so cockpit controls respond without a sim. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -134,6 +134,7 @@ export const WRITABLE_DATAREFS = {
|
||||
apSpdBug: 'sim/cockpit2/autopilot/airspeed_dial_kts_mach',
|
||||
xpdrMode: 'sim/cockpit2/radios/actuators/transponder_mode', // 0 off,1 stby,2 on,3 alt
|
||||
xpdrCode: 'sim/cockpit2/radios/actuators/transponder_code', // 4-digit squawk
|
||||
cdiSrc: 'sim/cockpit2/radios/actuators/HSI_source_select_pilot', // 0 NAV1 · 1 NAV2 · 2 GPS (CDI softkey cycles it)
|
||||
};
|
||||
|
||||
// Commands the frontend may TRIGGER (autopilot mode buttons etc.).
|
||||
|
||||
Reference in New Issue
Block a user