Sending events to FS2020 issue
Sending events to FS2020 issue
Hello !
I'm new on SimInnovations.
I setup a panel for a PA28 for FS2020, everything works well for instruments.
Except that i would like to send events with fs2020_event method but no effects on FS2020.
I misunderstood something.
I tried with many events, with instruments or hardware function, it seems they never sent.
Thanks for your help
Sylvain.
I'm new on SimInnovations.
I setup a panel for a PA28 for FS2020, everything works well for instruments.
Except that i would like to send events with fs2020_event method but no effects on FS2020.
I misunderstood something.
I tried with many events, with instruments or hardware function, it seems they never sent.
Thanks for your help
Sylvain.
Re: Sending events to FS2020 issue
Hi Sylvain,
First up welcome to the forum. Glad to see another Air Manager user.
What you have posted should work. Fs2020 events are used in many of the air manager community instruments also. Can you confirm if any of these established instruments are working? If not perhaps you do not have the latest Plug-in or have a connection issue. There is a connection issue troubleshooting guide on the Sim innovations wiki but in most cases a firewall is the culprit.
Hope this helps.
First up welcome to the forum. Glad to see another Air Manager user.
What you have posted should work. Fs2020 events are used in many of the air manager community instruments also. Can you confirm if any of these established instruments are working? If not perhaps you do not have the latest Plug-in or have a connection issue. There is a connection issue troubleshooting guide on the Sim innovations wiki but in most cases a firewall is the culprit.
Hope this helps.
Air Manager panels at https://www.experimentalsimavionics.com
Youtube Channel https://www.youtube.com/channel/UC8ZqXX ... kfZMq5BKig
Air Manager API Tutorial Video Series https://youtube.com/playlist?list=PLNr0 ... baT4gJKg5D
Youtube Channel https://www.youtube.com/channel/UC8ZqXX ... kfZMq5BKig
Air Manager API Tutorial Video Series https://youtube.com/playlist?list=PLNr0 ... baT4gJKg5D
Re: Sending events to FS2020 issue
Obviously you didn't read his post.
I'm new on SimInnovations.
I setup a panel for a PA28 for FS2020, everything works well for instruments.
Joe. CISSP, MSc.
- Keith Baxter
- Posts: 4685
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: Sending events to FS2020 issue
World war three on the way between two best friends. Where is the popcorn we are about to be entertained
Last edited by Keith Baxter on Thu Dec 08, 2022 11:00 am, edited 1 time in total.
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board, 32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card
Re: Sending events to FS2020 issue
Confused. Not sure what this means. Very randomKeith Baxter wrote: ↑Thu Dec 08, 2022 10:33 am World war three on the way between two best friends. Where is the popcorn.
Air Manager panels at https://www.experimentalsimavionics.com
Youtube Channel https://www.youtube.com/channel/UC8ZqXX ... kfZMq5BKig
Air Manager API Tutorial Video Series https://youtube.com/playlist?list=PLNr0 ... baT4gJKg5D
Youtube Channel https://www.youtube.com/channel/UC8ZqXX ... kfZMq5BKig
Air Manager API Tutorial Video Series https://youtube.com/playlist?list=PLNr0 ... baT4gJKg5D
Re: Sending events to FS2020 issue
Keith Baxter wrote: ↑Thu Dec 08, 2022 10:33 am World war three on the way between two best friends. Where is the popcorn we are about to be entertained
If you mean that the 'antipodean Barbie mafia' may be sharpening his crayons then it is unlikely as he (selectively) blocks my posts. He has done for ages but he turns off the block to read them occasionally so he can learn something.
Joe. CISSP, MSc.
Re: Sending events to FS2020 issue
Oh I see now. I was just alerted away from this forum that the silly old fool is trolling again. How childish.
For everyone else I don’t see messages from jph at all because I blocked him so long ago now for continually trolling me and wanting to start arguments. It’s been so long I’d forgotten he even existed. I’d rather stick to the point of the forum, helping others.
For everyone else I don’t see messages from jph at all because I blocked him so long ago now for continually trolling me and wanting to start arguments. It’s been so long I’d forgotten he even existed. I’d rather stick to the point of the forum, helping others.
Air Manager panels at https://www.experimentalsimavionics.com
Youtube Channel https://www.youtube.com/channel/UC8ZqXX ... kfZMq5BKig
Air Manager API Tutorial Video Series https://youtube.com/playlist?list=PLNr0 ... baT4gJKg5D
Youtube Channel https://www.youtube.com/channel/UC8ZqXX ... kfZMq5BKig
Air Manager API Tutorial Video Series https://youtube.com/playlist?list=PLNr0 ... baT4gJKg5D
Re: Sending events to FS2020 issue
If none of the events work and Air Manager is connected, then you can assume with 99.99% certainty that the firewall is the problem.
-
- Posts: 5346
- Joined: Thu Jul 27, 2017 12:22 am
Re: Sending events to FS2020 issue
In any case, just checked with existing Sim Innovations "Generic Pitch trim" and yes, it workssylvain01 wrote: ↑Wed Dec 07, 2022 5:18 pm Hello !
I'm new on SimInnovations.
I setup a panel for a PA28 for FS2020, everything works well for instruments.
Except that i would like to send events with fs2020_event method but no effects on FS2020.
I misunderstood something.
I tried with many events, with instruments or hardware function, it seems they never sent.
Thanks for your help
Sylvain.
Code: Select all
-- Trim with buttons
-- Up
function button_trim_up_pressed()
xpl_command("sim/flight_controls/pitch_trim_up", 1)
fsx_event("ELEV_TRIM_UP")
fs2020_event("ELEV_TRIM_UP")
end
function button_trim_up_released()
xpl_command("sim/flight_controls/pitch_trim_up", 0)
end
hw_button_add("Trim up", button_trim_up_pressed, button_trim_up_released)
-- Down
function button_trim_down_pressed()
xpl_command("sim/flight_controls/pitch_trim_down", 1)
fsx_event("ELEV_TRIM_DN")
fs2020_event("ELEV_TRIM_DN")
end
function button_trim_down_released()
xpl_command("sim/flight_controls/pitch_trim_down", 0)
end
hw_button_add("Trim down", button_trim_down_pressed, button_trim_down_released)
-- Trim with potentiometer
hw_adc_input_add("Pitch trim potentiometer", function(value)
xpl_dataref_write("sim/cockpit2/controls/elevator_trim", "FLOAT", -1 + (value * 2) )
end)
-- Trim with rotary encoder
prop_accel = user_prop_add_integer("Acceleration", 1, 10, 1, "Optional acceleration factor for rotary encoder")
hw_dial_add("Pitch trim encoder", user_prop_get(prop_accel), function(direction)
if direction == -1 then
xpl_command("sim/flight_controls/pitch_trim_down")
fsx_event("ELEV_TRIM_DN")
fs2020_event("ELEV_TRIM_DN")
else
xpl_command("sim/flight_controls/pitch_trim_up")
fsx_event("ELEV_TRIM_UP")
fs2020_event("ELEV_TRIM_UP")
end
end)
Here with "Generic - Aileron trim"
Code: Select all
adc_lowest = user_prop_add_real("Lowest", 0.0, 0.4, 0.0, "Lowest value of your ADC output")
adc_highest = user_prop_add_real("Highest", 0.6, 1.0, 1.0, "Highest value of your ADC output")
local aileron_range = { { user_prop_get(adc_lowest), -16383 },
{ user_prop_get(adc_highest), 16383 } }
hw_adc_input_add("Aileron", function(adc_val)
fs2020_event("AILERON_SET", interpolate_linear(aileron_range, adc_val) )
fsx_event("AILERON_SET", interpolate_linear(aileron_range, adc_val) )
xpl_dataref_write("sim/flightmodel/controls/ail_trim", "FLOAT", -1 + adc_val * 2)
end)
Last edited by SimPassion on Fri Dec 09, 2022 11:03 pm, edited 1 time in total.
Re: Sending events to FS2020 issue
Hi
I finally decided to uninstall AirManager + plugins + user folder (i did a backup) and reinstall everything.
So now it is working, also with my previous user folder.
Don't able to understand what's happened, but not a big deal.
Thanks you for your help !:)
I finally decided to uninstall AirManager + plugins + user folder (i did a backup) and reinstall everything.
So now it is working, also with my previous user folder.
Don't able to understand what's happened, but not a big deal.
Thanks you for your help !:)