flybywiresim / aircraft

The A32NX & A380X Project are community driven open source projects to create free Airbus aircraft in Microsoft Flight Simulator that are as close to reality as possible.
https://flybywiresim.com
GNU General Public License v3.0
4.97k stars 1.03k forks source link

LS scale flickering with "Sync EFIS controls between Captain and F/O" ON #8880

Open becas22 opened 1 week ago

becas22 commented 1 week ago

Aircraft Version

Development

Build info

{
    "built": "2024-09-05T19:26:32+00:00",
    "ref": "refs/heads/a380x-experimental",
    "sha": "69fbc8e859df03ab2009fe44e2d707e34c6a6e30",
    "actor": "flogross89",
    "event_name": "manual",
    "pretty_release_name": "a380x-experimental:69fbc8e8",
    "version": "a380x-v0.12.0-a380x-experimental.69fbc8e"
}

Describe the bug

With a single LS p/b on, the LS scale flickers. With both LS p/b on, the LS scale displays normally

Expected behavior

LS scale displaying normally

Steps to reproduce

  1. Turn on CPT LS scale
  2. Notice flickering
  3. Turn off CPT LS scale and turn on F/O LS scale
  4. Notice flickering

References (optional)

No response

Additional info (optional)

No response

Discord Username (optional)

Bernardo R

becas22 commented 1 week ago

Related to "Sync EFIS controls between Captain and F/O"

flogross89 commented 1 week ago

It seems, that BTN_LS_x_FILTER_ACTIVE is both written from FlyByWireInterface::updateFoSide and A380_COCKPIT.xml

tracernz commented 1 week ago

It seems, that BTN_LS_x_FILTER_ACTIVE is both written from FlyByWireInterface::updateFoSide and A380_COCKPIT.xml

That’s the EFIS sync. Maybe something wrong in the A380 xml trying to write the var all the time?

This will do it https://github.com/flybywiresim/aircraft/blob/1a3ddc505bb7aa3878d0e4bf8a2502981eb91d85/fbw-a380x/src/base/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/model/A380_COCKPIT.xml#L109. We should either get rid of the indirection here, or change the sync code to use the driving Lvar.

flogross89 commented 1 week ago

It seems, that BTN_LS_x_FILTER_ACTIVE is both written from FlyByWireInterface::updateFoSide and A380_COCKPIT.xml

That’s the EFIS sync. Maybe something wrong in the A380 xml trying to write the var all the time?

This will do it

https://github.com/flybywiresim/aircraft/blob/1a3ddc505bb7aa3878d0e4bf8a2502981eb91d85/fbw-a380x/src/base/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/model/A380_COCKPIT.xml#L109

. We should either get rid of the indirection here, or change the sync code to use the driving Lvar.

Yep, the architecture surrounding these LS filters and their SimVars is still dubious, maybe there's another, better way. Maybe we should get rid of BTN_LS_x_FILTER_ACTIVE, and only use A380X_EFIS_x_LS_BUTTON_IS_ON. We have separate PFD code anyways, and slightly different semantics behind that button

tracernz commented 1 week ago

Yep, the architecture surrounding these LS filters and their SimVars is still dubious

The cockpit controls architecture is such that anybody can write the local vars to change the state. That can be Mobiflight/SPAD/AAO, XML behaviours, the sync code etc. The template in the A380 constantly overwriting them with some other value breaks the design.