Welcome to the forum for MobiFlight! Feel free to reach out to the community in case you have questions, issues or just want to share great ideas or details about your latest home cockpit project.
You like MobiFlight? Donate via PayPal and support the MobiFlight development. Thanks!
The community support for MobiFlight has moved exclusively over to our Discord server. Register for free and enjoy more interactive functions like image and video upload, voice chat. More than 7,000 registered users around the world make it a great experience!
See you on our MobiFlight Community Discord server.
A HUGE Thank You to everyone who participated in the forum, especially obviously to Pizman and Stephan who did an outstanding job over so many years providing an incredible service to the MobiFlight community.
The forum is still providing a lot of good content, hence we keep this information accessible.
This may be a very stupid question, but how about just reading Lvars in order to display the value in a 7 segment display? I have a fully functional COM/NAV panel so I thought it wouldn't be that hard to build an auto pilot panel. However, I would like to use it with my Aerosoft A320 and that's where I'm running into a problem that I can't seem to wrap my little head around.
I got the LUA script for the A320 with all the functions for reading and writing the Lvars but I'm just sitting here with a Mega board and a MAX7219 7 segment display trying to figure out what to do in order to just get the FCU altitude on to that display. I'm probably missing the basic knowledge on the relationship between FSX, FSUIPC, LUA and Arduino.
Code:
function turb_button(offset, value) if (value == 1) then ipc.writeLvar("ASCRJ_FCP_XFR=SET", 1) else ipc.writeLvar("ASCRJ_FCP_XFR=SET", 0) end end function turb_button_led(offset, value) if (value == 1) then ipc.writeLvar("ASCRJ_FCP_TURB_LED", 1) else ipc.writeLvar("ASCRJ_FCP_TURB_LED", 0) end end event.offset("66C0","UB","turb_button") event.offset("66C2","UB","turb_button_led")
At first you not decleare your button. If i understand the system correct then your Mobiflight button must write the Offset ( 66C0 in that case) to "1" on press and to "0" on release.
Please confirm you do that !
2.Why you work with offsets here for the Inputs. You cn assigne with Mobiflight Keycommands or VJOY Buttons or Virtual Joystick Buttons or LUA Macros
The reason why is that on the CRJ700 AP, each button has an LED associated with it that lights up. The aircraft I am working with does not have standard FCUIPC offsets so I cannot just select an output on Mobiflight for LED and assign it to a generic offset - This does not work. So my objective is to assign a new FSUIPC offset to the button so I can trigger it on the Mobiflight output option and assign it to the LED.
function turb_button(offset, value)
if (value == 1) then ipc.writeLvar("ASCRJ_FCP_XFR=SET", 1)
else ipc.writeLvar("ASCRJ_FCP_XFR=SET", 0)
.....
function turb_button_led(offset, value)
if (value == 1) then
ipc.writeLvar("ASCRJ_FCP_TURB_LED", 1)