calibx / msfsdeck

MSFS Plugin for LoupeDeck Live & CT
Apache License 2.0
47 stars 12 forks source link

Heading Not Setting to Current heading in Airliner Mode #219

Open CaptainAS007 opened 1 year ago

CaptainAS007 commented 1 year ago

Pressing and Holding Heading Rotary when in AP (2) Workspace/Profile sets the heading to current heading which is correct, But it does not work in Airliner(1) WorkSpace/Profile. The rotating the Heading rotary does change the heading, but holding it down does not set it to current heading.

CaptainAS007 commented 1 year ago

I looked at the source code for both and notice that in the Airliner a few Resets are commented out. Here is the code from both:

AP

case "Back Course": this._bindings[16].SetControllerValue(1); break; case "Altitude Reset": this._bindings[0].SetControllerValue((Int64)(Math.Round(this._bindings[1].ControllerValue / 100d, 0) 100)); break; case "Heading Reset": this._bindings[2].SetControllerValue(this._bindings[3].ControllerValue); break; case "Speed Reset": this._bindings[4].SetControllerValue((Int64)(Math.Round(this._bindings[5].ControllerValue / 100d, 0) 100)); break; case "VS Speed Reset": this._bindings[6].SetControllerValue((Int64)(Math.Round(this._bindings[7].ControllerValue / 100d, 0) * 100)); break;

Airliner

            case "Back Course":
                this._bindings[20].SetControllerValue(1);
                break;
            case "Altitude Reset":
                //this._bindings[18].SetControllerValue(1);
                break;
            case "Heading Reset":
                //this._bindings[18].SetControllerValue(1);
                break;
            case "Speed Reset":
                //this._bindings[18].SetControllerValue(1);
                break;
            case "VS Speed Reset":
                //this._bindings[18].SetControllerValue(1);
                break;

Not sure if you ran into issues, or just forgot to go back and uncomment that code and add the correct values.

After I figure out how to compile and make it it ready to load, I will be happy to help out with changes and fixes.

calibx commented 1 year ago

Hi, Yes, it was desactivated because activating ALT AP using the knob wan't something realistic in a airliner : the knob click set the alt value but not trigger the AP ALT.

CaptainAS007 commented 1 year ago

I copied the entire section that was commented, but the main issue I brought up was pressing and holding the Heading in Airliner doens't reset it, but it does in the AP profile (round button 2 at bottom). That should also work in Airliner mode.