January 23, 20197 yr You know how I love this aircraft as much as I like management things simple. So would it be possible to merge the gross weight counter set button (in the payload manager) + its activation in the aircraft (mouse center wheel button) and to activate them just when the beacon light is switched on ? When we do so the payload is supposed to be done and the door closed, so.... Anticol in RED ans that's set. I admit that often I forgot one of them or both.... What do you think? Pascal Edited January 23, 20197 yr by Cool
January 23, 20197 yr 5 hours ago, Cool said: You know how I love this aircraft as much as I like management things simple. So would it be possible to merge the gross weight counter set button (in the payload manager) + its activation in the aircraft (mouse center wheel button) and to activate them just when the beacon light is switched on ? When we do so the payload is supposed to be done and the door closed, so.... Anticol in RED ans that's set. I admit that often I forgot one of them or both.... What do you think? Pascal Pascal, Since you asked I will say that I don't think this is very realistic, and not really needed since loading the counters and turning on the beacon and strobe lights is not time sensitive since you are still sitting on the ground at this point, but "to each his own". The Lua script below will turn on the beacon and strobe lights, load the gross weight counter and start the gross weight and fuel counters. Use FSUIPC to assign a key or button to activate the script. Al -- F50CntrsBcn&Strb.Lua script to turn on F50 Strobe & Beacon Lights and Fuel/Gross Wt Counters ipc.writeUB (0x0281, 1) -- turn on Beacon and Strobe Lights ipc.sleep (100) -- 0.1 sec delay gross_weight = ipc.readDBL (0x30C0) -- get current gross weight of a/c gross_wt = gross_weight/10 -- divide by 10 (for Falcon50 counter implementation) ipc.writeLvar ("L:GROSS_LBS", gross_wt) -- write to Falcon50 panel gross weight counter ipc.sleep (100) ipc.writeLvar ("L:FUEL_RESET4",1) -- set fuel used counter to 0 ipc.writeLvar ("L:FUEL_CALC4",1) -- start calculating fuel being used ipc.writeLvar ("L:GROSS_START",1) -- start gross weight counter ipc.writeLvar ("L:FUEL_RESET4",0) -- reset variable ipc.writeLvar ("L:FUEL_CALC4",0) -- reset variable return Edited January 23, 20197 yr by ark
January 24, 20197 yr 14 hours ago, ark said: Pascal, Since you asked I will say that I don't think this is very realistic, and not really needed since loading the counters and turning on the beacon and strobe lights is not time sensitive since you are still sitting on the ground at this point, but "to each his own". The Lua script below will turn on the beacon and strobe lights, load the gross weight counter and start the gross weight and fuel counters. Use FSUIPC to assign a key or button to activate the script. Al -- F50CntrsBcn&Strb.Lua script to turn on F50 Strobe & Beacon Lights and Fuel/Gross Wt Counters ipc.writeUB (0x0281, 1) -- turn on Beacon and Strobe Lights ipc.sleep (100) -- 0.1 sec delay gross_weight = ipc.readDBL (0x30C0) -- get current gross weight of a/c gross_wt = gross_weight/10 -- divide by 10 (for Falcon50 counter implementation) ipc.writeLvar ("L:GROSS_LBS", gross_wt) -- write to Falcon50 panel gross weight counter ipc.sleep (100) ipc.writeLvar ("L:FUEL_RESET4",1) -- set fuel used counter to 0 ipc.writeLvar ("L:FUEL_CALC4",1) -- start calculating fuel being used ipc.writeLvar ("L:GROSS_START",1) -- start gross weight counter ipc.writeLvar ("L:FUEL_RESET4",0) -- reset variable ipc.writeLvar ("L:FUEL_CALC4",0) -- reset variable return Thank You Al. Great! I tried it and works fine but the strobe lights do not turn on. Everything else works fine. Best Regards, Roberto
January 24, 20197 yr 2 hours ago, Ralvarez232 said: Thank You Al. Great! I tried it and works fine but the strobe lights do not turn on. Everything else works fine. Best Regards, Roberto I just tested the script again and both the beacon and strobe lights do turn on for me (P3Dv4.4). The aircraft should be powered up, essentially ready for taxi or takeoff. And make sure the light switch is fully off before activating the script. You could also check if the strobe lights turn on if you operate the switch with the mouse. Edit: I added a line to the script to make sure the light switch is fully off when the script is activated. See post below. Edited January 24, 20197 yr by ark
January 24, 20197 yr 4 hours ago, Cool said: Great! Thanks Al Here is a minor update to the script in which I've added the sounds as the light switch is moved to its full up (strobe) 2nd position (two clicks). Also, because of some of the Falcon50 coding, the light switch needs to be fully off to start for the script to work correctly, so I added a line to insure that is the case. Al -- F50CntrsBcn&Strb.Lua script to turn on F50 Strobe & Beacon Lights and Fuel/Gross Wt Counters ipc.writeUB (0x0281, 0) -- make sure switch is off to start ipc.writeUB (0x0281, 1) -- turn on Beacon and Strobe Lights ipc.writeLvar("L:XMLSND70",1) -- switch sound ipc.sleep (400) ipc.writeLvar("L:XMLSND70",1) -- switch sound ipc.sleep (100) -- 0.1 sec delay to allow interpreter to work so counters synced gross_weight = ipc.readDBL (0x30C0) -- get current gross weight of a/c gross_wt = gross_weight/10 -- divide by 10 (for Falcon50 counter implementation) ipc.writeLvar ("L:GROSS_LBS", gross_wt) -- write to Falcon50 panel gross weight counter ipc.sleep (100) ipc.writeLvar ("L:FUEL_RESET4",1) -- reset fuel used counter to 0 ipc.writeLvar ("L:FUEL_CALC4",1) -- start calculating fuel being used ipc.writeLvar ("L:GROSS_START",1) -- start gross weight counter ipc.writeLvar ("L:FUEL_RESET4",0) -- reset variable ipc.writeLvar ("L:FUEL_CALC4",0) -- reset variable return Edited January 24, 20197 yr by ark
January 24, 20197 yr I figured out what the Falcon 50 code is doing with respect to the beacon and strobe lights, so below is an updated script. This script checks the status of the beacon and strobe lights and simply turns on those that are found to be off. The above script works, but this one is a bit more elegant since it doesn't force the lights to be off before turning them on! 🙂 -- F50CntrsBcn&Strb.Lua -- script to turn on F50 Strobe & Beacon Lights and Fuel/Gross Wt Counters beacon_strobe_var = ipc.readLvar("L:SW_BEACON_LIGHTS") -- get status of beacon and strobe lights if beacon_strobe_var == 0 then -- if both beacon and strobes off ipc.control(66239) -- toggle beacon lights on ipc.writeLvar("L:XMLSND70",1) -- switch sound ipc.sleep (400) ipc.control(66052) -- and turn strobe lights on ipc.writeLvar("L:XMLSND70",1) -- switch sound ipc.sleep (400) elseif beacon_strobe_var == 1 then -- if just beacon on ipc.control(66052) -- turn strobe lights on ipc.writeLvar("L:XMLSND70",1) -- switch sound end ipc.sleep (100) gross_weight = ipc.readDBL (0x30C0) -- get current gross weight of a/c gross_wt = gross_weight/10 -- divide by 10 (for Falcon50 counter implementation) ipc.writeLvar ("L:GROSS_LBS", gross_wt) -- write to Falcon50 panel gross weight counter ipc.sleep (100) ipc.writeLvar ("L:FUEL_RESET4",1) -- reset fuel used counter to 0 ipc.writeLvar ("L:FUEL_CALC4",1) -- start calculating fuel being used ipc.writeLvar ("L:GROSS_START",1) -- start gross weight counter ipc.writeLvar ("L:FUEL_RESET4",0) -- reset variable ipc.writeLvar ("L:FUEL_CALC4",0) -- reset variable return Edited January 24, 20197 yr by ark
January 25, 20197 yr 18 hours ago, ark said: I figured out what the Falcon 50 code is doing with respect to the beacon and strobe lights, so below is an updated script. This script checks the status of the beacon and strobe lights and simply turns on those that are found to be off. The above script works, but this one is a bit more elegant since it doesn't force the lights to be off before turning them on! 🙂 -- F50CntrsBcn&Strb.Lua -- script to turn on F50 Strobe & Beacon Lights and Fuel/Gross Wt Counters beacon_strobe_var = ipc.readLvar("L:SW_BEACON_LIGHTS") -- get status of beacon and strobe lights if beacon_strobe_var == 0 then -- if both beacon and strobes off ipc.control(66239) -- toggle beacon lights on ipc.writeLvar("L:XMLSND70",1) -- switch sound ipc.sleep (400) ipc.control(66052) -- and turn strobe lights on ipc.writeLvar("L:XMLSND70",1) -- switch sound ipc.sleep (400) elseif beacon_strobe_var == 1 then -- if just beacon on ipc.control(66052) -- turn strobe lights on ipc.writeLvar("L:XMLSND70",1) -- switch sound end ipc.sleep (100) gross_weight = ipc.readDBL (0x30C0) -- get current gross weight of a/c gross_wt = gross_weight/10 -- divide by 10 (for Falcon50 counter implementation) ipc.writeLvar ("L:GROSS_LBS", gross_wt) -- write to Falcon50 panel gross weight counter ipc.sleep (100) ipc.writeLvar ("L:FUEL_RESET4",1) -- reset fuel used counter to 0 ipc.writeLvar ("L:FUEL_CALC4",1) -- start calculating fuel being used ipc.writeLvar ("L:GROSS_START",1) -- start gross weight counter ipc.writeLvar ("L:FUEL_RESET4",0) -- reset variable ipc.writeLvar ("L:FUEL_CALC4",0) -- reset variable return Thank You Al. Now is working with the updated Lua Script. BTW, I'm in FSX SE. Best Regards, Roberto
January 25, 20197 yr 5 hours ago, Ralvarez232 said: Thank You Al. Now is working with the updated Lua Script. BTW, I'm in FSX SE. Best Regards, Roberto Roberto - thanks for the feedback. Glad to hear all is working for you. Al
Archived
This topic is now archived and is closed to further replies.