Already sorry for my English, it's google translate...
I'm working on modifying an existing script to make RealSimGear's GNS430 unit work
I was able to find all the functions and set every button to work with.
I have a problem that I can't solve
here is the code used
Code: Select all
-- Button CDI
hw_button_add("ARDUINO_MEGA2560_A_D32",function()
fs2020_event("TOGGLE_GPS_DRIVES_NAV1")
log("GPS : " .. g_unit)
end)
My log does return GPS 2 to me, but the function still acts on GPS 1
From what I could find and tried without much success being a beginner with Air Manager and Lua the value must be on "FALSE" and I cannot modify this value locally to precisely send the function to the GPS2
According to the command.ini file of RSG the function is defined as follows
Code: Select all
BTN_CDI+=TOGGLE_GS_DRIVES_NAV1#2
Thank you
Arnaud
SOLUTED
I found the solution
1. I reset the RSG firmware
2. Installed their software
3. Read variables for the GNS430 in COM2
4. I changed the variable
Code: Select all
hw_button_add("ARDUINO_MEGA2560_A_D32",function()
fs2020_event("H:AS430_CDI_PUSH")
log("GPS : " .. g_unit)
end)
Despite my research I had not found this variable, I will reprogram with AM
Thanks for all the help
Arnaud