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.04k forks source link

Sim freezes when changing ADIRS realism setting from Real to Fast while ADIRS is aligning #7139

Open fahdriyami opened 2 years ago

fahdriyami commented 2 years ago

Aircraft Version

Experimental

Build info

{
  "built": "2022-04-30T21:14:26+00:00",
  "ref": "experimental",
  "sha": "4e39b85b1a29014f04ffe030ed95ba5ebc70d960",
  "actor": "aguther",
  "event_name": "manual",
  "pretty_release_name": "experimental:4e39b85b"
}

Describe the bug

While the plane is in the process of aligning the ADIRS with the realism set to Real in EFB, changing the realism setting to Fast causes the sim to stop responding.

Expected behavior

Acceleration of ADIRS align time.

Steps to reproduce

  1. Ensure that ADIRS realism setting is set to Real in the EFB.
  2. Restart the simulator.
  3. Reload into flight.
  4. Turn external power on.
  5. Turn both batteries on.
  6. Turn all three ADIRS knobs to NAV.
  7. Change ADIRS realism setting to Fast in the EFB.
  8. Sim freezes.

References (optional)

No response

Additional info (optional)

Running Sim Update 9

Discord Username (optional)

No response

juliansebline commented 2 years ago

Hello! What do you mean by "freezes" ? You cannot press any button? The ADIRS do not align?

I've tested and I have spotted that the alignment time (A32NX_ADIRS_REMAINING_IR_ALIGNMENT_TIME) is not set to 90 seconds if FAST is set. Therefore there's a bug here, indeed. But I still can press buttons and eventually the ADIRS are aligned.

fahdriyami commented 2 years ago

By freezes I mean I cannot interact with the sim at all. Cant move the camera, cant press buttons etc. The sim stops responding.

davidwalschots commented 2 years ago

I've tested and I have spotted that the alignment time (A32NX_ADIRS_REMAINING_IR_ALIGNMENT_TIME) is not set to 90 seconds if FAST is set. Therefore there's a bug here, indeed. But I still can press buttons and eventually the ADIRS are aligned.

This is intentional. If you want to align with the FAST setting, then one has to configure it to be FAST and then only thereafter start the alignment process.

juliansebline commented 2 years ago

I've tested and I have spotted that the alignment time (A32NX_ADIRS_REMAINING_IR_ALIGNMENT_TIME) is not set to 90 seconds if FAST is set. Therefore there's a bug here, indeed. But I still can press buttons and eventually the ADIRS are aligned.

This is intentional. If you want to align with the FAST setting, then one has to configure it to be FAST and then only thereafter start the alignment process.

Roger that. Thank you

fahdriyami commented 2 years ago

This is intentional. If you want to align with the FAST setting, then one has to configure it to be FAST and then only thereafter start the alignment process.

Good to know. Although it doesn't feel very intuitive. The realization that its set to Real happens only after beginning to align. It would be great if it can be accelerated after-the-fact.

Besides that, are you able to reproduce the freeze? Or is that just on my end?

davidwalschots commented 2 years ago

Good to know. Although it doesn't feel very intuitive. The realization that its set to Real happens only after beginning to align. It would be great if it can be accelerated after-the-fact.

Allowing for going from the realistic setting to fast seems relatively easy, but adds additional complexity and raises various questions, which is why I've decided not to include it. Two examples of issues one runs into are:

I'd rather we don't include such logic in our aircraft systems' code.

Note that one can still align using a different setting by rotating the knobs from NAV to OFF, changing the setting, and then rotating from OFF to NAV.

Besides that, are you able to reproduce the freeze? Or is that just on my end?

I haven't looked into this at this point in time.

davidwalschots commented 2 years ago

I've attempted to reproduce the problem on the latest master (dbe5d99d75621533151413416a27523fc9c33454). My simulator didn't freeze, crash, or show any other unexpected behaviour.

tracernz commented 2 years ago

I suggest simply removing the real/fast/instant setting, and adding an instant align button to the EFB. Same logic can be shared for hot spawns then too (and later for cold & dark/turn-around/ready for taxi buttons when we can set the states like that).

juliansebline commented 2 years ago

This is intentional. If you want to align with the FAST setting, then one has to configure it to be FAST and then only thereafter start the alignment process.

Good to know. Although it doesn't feel very intuitive. The realization that its set to Real happens only after beginning to align. It would be great if it can be accelerated after-the-fact.

Besides that, are you able to reproduce the freeze? Or is that just on my end?

I haven't seen any unexpected behavior either.

dikkeduif commented 2 years ago
  • When switching to fast alignment and the fast alignment time is greater than the remaining realistic alignment time, which one do we choose?
  • When you're in fast alignment and switching to realistic alignment, do we continue, or do we start in real alignment at the same % of time you already progressed through fast alignment?

Why not make it easy and just restart alignment when you're in the middle each time you switch fast <-> realistic, unless you are already aligned do nothing.

davidwalschots commented 2 years ago

Why not make it easy and just restart alignment when you're in the middle each time you switch fast <-> realistic, unless you are already aligned do nothing.

Because then we'd end up with some being confused about that particular implementation. 😀

In the end my thought on it is still that:

I'd rather we don't include such logic in our aircraft systems' code.