MSFS2020 Magneto Starter Timeout bug?

Questions about deployment and use of Air Manager Instruments

Moderators: russ, Ralph

Post Reply
Message
Author
User avatar
samburner3
Posts: 16
Joined: Thu Apr 16, 2020 9:29 am
Location: Australia

MSFS2020 Magneto Starter Timeout bug?

#1 Post by samburner3 »

Hey all,

I have an Arduino hooked up to AM via SiMessagePort. I have wired up the key switch for Magneto. (off, R, L , both, start).
I have the key switch events flowing through to my hardware function nicely.

Here is my .lua script:

Code: Select all

hw_message_port_add("ARDUINO_MEGA2560_A", function (id, payload)
    print("received new message with id " .. id .. " " .. payload)
    local position = id
    if payload == "true" then -- true for button pressed, false for button released.

    
        -- Mappings:
            -- Magneto 1
                --Off = 58
                --Right = 54
                --Left = 55
                --Both = 56
                --Start = 57
            -- Magneto 2
                --Off = 4
                --Right = 5
                --Left = 7
                --Both = 2
                --Start = 3
    
        if position == 58 then --1 OFF
            xpl_command("sim/magnetos/magnetos_off_1")
            fsx_event("MAGNETO1_OFF")
            fs2020_event("MAGNETO1_SET", 0)
        elseif position == 4 then --2 OFF
            xpl_command("sim/magnetos/magnetos_off_2")
            fsx_event("MAGNETO2_OFF")
            fs2020_event("MAGNETO2_SET", 0)
        elseif position == 54 then --1 R
            xpl_command("sim/magnetos/magnetos_right_1")
            fsx_event("MAGNETO_RIGHT")
            fs2020_event("MAGNETO1_SET", 1)
        elseif position == 5 then --2 R
            xpl_command("sim/magnetos/magnetos_right_2")
            fsx_event("MAGNETO2_RIGHT")
            fs2020_event("MAGNETO2_SET", 1)
        elseif position == 55 then --1 L
            xpl_command("sim/magnetos/magnetos_left_1")
            fsx_event("MAGNETO_LEFT")
            fs2020_event("MAGNETO1_SET", 2)
        elseif position == 7 then --2 L
            xpl_command("sim/magnetos/magnetos_left_2")
            fsx_event("MAGNETO2_LEFT")
            fs2020_event("MAGNETO2_SET", 2)
        elseif position == 56 then --1 BOTH
            xpl_command("sim/magnetos/magnetos_both_1")
            fsx_event("MAGNETO_BOTH")
            fs2020_event("MAGNETO1_SET", 3)
        elseif position == 2 then --2 BOTH
            xpl_command("sim/magnetos/magnetos_both_2")
            fsx_event("MAGNETO2_BOTH")
            fs2020_event("MAGNETO2_SET", 3)
        elseif position == 57 then --1 START
            xpl_command("sim/starters/engage_starter_1")
            fsx_event("MAGNETO_START")
            fs2020_event("MAGNETO1_SET", 4)
        elseif position == 3 then --2 START
            xpl_command("sim/starters/engage_starter_2")
            fsx_event("MAGNETO2_START")
            fs2020_event("MAGNETO2_SET", 4)
        end
    elseif payload == "false" then
        if position == 57 then --1 START
            xpl_command("sim/starters/engage_starter_1", "END")
        elseif position == 3 then --2 START
            xpl_command("sim/starters/engage_starter_2", "END")
        end
    end
end)
The most important line is

Code: Select all

        elseif position == 57 then --1 START
            xpl_command("sim/starters/engage_starter_1")
            fsx_event("MAGNETO_START")
            fs2020_event("MAGNETO1_SET", 4)
It is working ok (with fs2020) however when I hold they key switch in the start position (

Code: Select all

fs2020_event("MAGNETO1_SET", 4)
) it auto times out back to BOTH before I have set the key back to both.
I can confirm it is not an issue with my Arduino sketch as I see the print log

Code: Select all

INFO - received new message with id 57 false
INFO - received new message with id 56 true
when I return the key back to BOTH from the start position.

I have tested this in the default Cessna 172 and also some pay ware aircraft with the same result.

This is a major issue since I can't hold the starter long enough for the engine to start...
This seems like a bug in MSFS or AM? Since again, when I return the key switch back to both the log says so.

I have also tried these data events for MSFS2020 with the same result:

Code: Select all

MAGNETO1_START
Last edited by samburner3 on Sun Sep 11, 2022 11:15 am, edited 1 time in total.

User avatar
samburner3
Posts: 16
Joined: Thu Apr 16, 2020 9:29 am
Location: Australia

Re: MSFS2020 Magneto Starter Timeout

#2 Post by samburner3 »

Confirming it works with x-plane, so looks like a MSFS2020 issue.

You can try yourself easily:
Screenshot 2022-09-11 210816.png
Download the "Magneto switch Cessna 172" from Sim Innovations in the hardware functions.
Connect to FS2020 and press run.
Once in the aircraft slide the slider across to 4 (start). You will see that MSFS2020 will automatically switch back to BOTH by it's self after a few seconds.
This is silly as on some aircraft it is not long enough to start the engine...

:evil: :evil: :evil:
I thought FS2020 would be ready for us home cockpit players but this is literally the first thing I have wired up and already its a blocker.
Back to x-plane :x

User avatar
samburner3
Posts: 16
Joined: Thu Apr 16, 2020 9:29 am
Location: Australia

Re: MSFS2020 Magneto Starter Timeout bug?

#3 Post by samburner3 »

Created bug on MSFS2020 forum here: https://forums.flightsimulator.com/t/ma ... ger/541970

User avatar
Ralph
Posts: 7878
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: MSFS2020 Magneto Starter Timeout bug?

#4 Post by Ralph »

That's indeed 'normal' FSX and FS2020 behavior.
It has been this way since FSX and it's the same in Prepar3D.

User avatar
samburner3
Posts: 16
Joined: Thu Apr 16, 2020 9:29 am
Location: Australia

Re: MSFS2020 Magneto Starter Timeout bug?

#5 Post by samburner3 »

Hmm, I wonder if there is a work around, maybe continually send the starter event in a loop from the .lua script while the switch is held down?
Or ideally a setting to disable it.

Curious if anyone else has a workaround / solved it somehow.

User avatar
Ralph
Posts: 7878
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: MSFS2020 Magneto Starter Timeout bug?

#6 Post by Ralph »

You can indeed maybe see if it goes back to BOTH and then send START again.

User avatar
samburner3
Posts: 16
Joined: Thu Apr 16, 2020 9:29 am
Location: Australia

Re: MSFS2020 Magneto Starter Timeout bug?

#7 Post by samburner3 »

Added as a question to MSFS devs here: https://devsupport.flightsimulator.com/ ... -home.html

Post Reply