MobiFlight Community Support

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! 

05/03/2024 - This forum is read-only

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.

icon
Avatar
nico1984
Posts: 3
Hi guys,

last days i am progressing with macros and lvars quite well to controll my A2A C172.
But some switches do not stay on permanently but just for a sencond as I press the button which I assigned in FSUIPC.
I have those issues with switching on Announciator Panel Test or Flood Lights on/off. I wrote lua scripts for both to test but in each case
the buttons work just for a second and then return to off position.

Here is my lua for the Flood Light 1 Switch. I see the floodlight in the panel shining for half a second once i press the button assigned.
But how can I let it remain in the on-position? I had the same issue with writing simple Macros (L:FloodLight1Sitch=SET) ... and setting Values via FSUIPC or Mobiflight, it does not stay in the on position permanently.

function Flood_1_On ()
ipc.writeLvar("L:FloodLight1Switch", 1)
return
end

function Flood_1_Off ()
ipc.writeLvar("L:FloodLight1Switch", 0)
return
end

function Flood_1_Toggle ()
Flood1 = ipc.readLvar("L:FloodLight1Switch")
if Flood1 == 0 then
Flood_1_On ()
else
Flood_1_Off ()
end
return
end

Flood_1_Toggle ()
return

Can anyone help me?
Best regards
2022-12-27 00:19
icon