Jump to content
The simFlight Network Forums


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About aerostar17

  • Rank

Profile Information

  • Gender
    Not Telling
  • Location
  1. Whoopee... thanks Pete, using ipc.get and .set works a treat, it's now all working... can't figure how the AB_AP_ALTSTEP worked though as it is using readLvar and writeLvar ... Now I may try and figure out again how to use TripleUse.lua for the Rotary Acceleration and then I wouldn't need the button toggle which would free up another button option... I'm pretty sure it's the standard rotaries I'm using. Any pointers would be welcome do you use Rotary Acceleration and if so, what method do you use... ? I hope I'm not over stepping with my questions... once again though , Thank you Pete for your help... Ian
  2. Hi , Pete ... I have replaced the AB_HDGSTEP_set with the AB_AP_ALTSTEP which is a working LVar as a test and now it toggles and works good... now the only thing is when I toggle the HDG step it also toggles the ALT step as they are now sharing the same LVar... I think that means that I need to properly define the AB_HDGSTEP_set LVar as it's probably not being recognised, I created it. I thought by naming it and giving it a value outside the Function that would define it. Can I ask how I should define the LVar AB_HDGSTEP_set so that it is recognised and usable ? Thanks again, Ian
  3. Apologies Pete for messing the Log was trying different things then editing my post... I have stripped out the unnecessary parts and this is the part that's not toggling/switching... I have posted the corresponding Log where it can be seen that on button flag 4 it always stays at ' AB_HDG_Step_10' I have also included the full Lua file attached... not very big. Here is the Lua file - AB_Triple_HDG.lua Ian
  4. Thanks for replying, Pete. I am using TripleUse.lua on this rotary which has a push button which I use for Heading... 1) Press longer = Managed Mode 2) Double Press = Set Mode and want 3) Single Press = Toggle Step 1 or 10 Degrees I can't think of a way to integrate with the FSUIPC controls as far as toggling with one button press... would I still need a Lua script? If not tied to TripleUse.lua then the button toggles would act additionally with button presses.. It's really the Toggle part that's not working... switching between the two steps. The HDG degrees do inc/dec if set independently in the script. PS- Can the (example) Rotaries.lua be adapted to work with a home made 'LeoBodnar 32 interface' button box to enable Rotary acceleration as this would be the best option, maybe or if there is another rotary acceleration method then I wouldn't need the Press Toggle ... Thanks, Ian
  5. After failing to be able to use acceleration on my Heading rotary , I have tried to make it toggle between 1 deg steps and 10 deg steps by pressing the button on the rotary. It's for the Aerosoft Airbus and there is a script for toggling the ALT but not the HDG. Therefore I copied the ALT script and adjusted to toggle the HDG but can't get it to toggle. Here is the relevant section... much obliged if someone can help... AB_HDGSTEP_set = 1 function AB_HDG_Step_tog () var = ipc.readLvar("AB_HDGSTEP_set") if var == 1 then AB_HDG_Step_1 () else AB_HDG_Step_10 () end end function AB_HDG_Step_1 () LVarSet = ("AB_HDGSTEP_set") ipc.writeLvar(LVarSet, 0) Anim = ("AB_AP_HDG_Knob_Ani") ipc.writeLvar(Anim, 1) ipc.sleep(30) ipc.writeLvar(Anim, 0) end function AB_HDG_Step_10 () LVarSet = ("AB_HDGSTEP_set") ipc.writeLvar(LVarSet, 1) Anim = ("AB_AP_HDG_Knob_Ani") ipc.writeLvar(Anim, -1) ipc.sleep(30) ipc.writeLvar(Anim, 0) end ....and the log The button animation doesn't toggle either (as an indication) but does work both ways in/out if set manually in the script. The full Lua section --- AB_Triple_HDG.lua Everything else works great... press Twice for heading set mode and press longer for heading managed mode
  6. Can the - TripleUse.lua - script written by Pete Dowson be adapted to count (e.g.) 10 button presses within a given interval to give an option . In the script you can set interval time ... and the script 'counts ?' the button presses , can this be used with a rotary to count the clicks(presses), when if 10 clicks within the given interval time it can then call a different function ? This is another idea I've got to enable Rotary auto speed step that I posted about previously. Thanks for your thoughts and advice on this...
  7. Thanks again John, will try and get a better understanding of programming, though I am wondering if I have the necessary brainpower... it's amazing how you programmers manage to put it together... Just a quick question, if I may... can I use the ipc.log method to save the HDG for comparison ? cheers
  8. Hi John, thanks very much for replying, I have been trying to implement your code into the existing since you posted but after trying different ways I still haven't got it to run... I'm a bit confused if this should run seperately and if your delta difference is named delta or I rename it to AddVar, and also with a few other things. I did manage to find and install the Socket.lua addon. function AB_HDG_plus () AB_hdgtrk = ipc.readLvar("AB_AP_HDGTRK") AB_drift = ipc.readLvar("AB_AP_HDGTRK") if AB_hdgtrk == 0 then LVarSet = "AB_AP_HDG_Select" else LVarSet = "AB_AP_TRK_set" end LVarGet = ipc.readLvar(LVarSet) require ("socket") lastTime = 0; --ipc.log("Current degree is " .. currentdeg .. ", lastdegree is " .. lastdeg) --diffdeg = currentdeg - lastdeg currentTime = socket.gettime()*1000 ipc.log("Current time is " .. currentTime .. ", lasTime is " .. lastTime) difference = currentTime - lastTime if (difference > 200 and difference < 1000) then AddVar = LVarGet + 10 else AddVar = LVarGet + 1 end if AddVar > 359 then AddVar = 0 end ipc.log("Delta is " .. AddVar.. " (difference=" .. difference .. ")") lastTime = currentTime end --DspHDG(AddVar) ipc.writeLvar(LVarSet, AddVar) event.flag(1, "AB_HDG_plus") Latest log of this ... ********* LUA: "AB_HDG_speed" Log [from FSUIPC version 5.151] ********* 9323640 System time = 12/06/2019 10:42:09, Simulator time = 11:43:13 (10:43Z) 9323640 LUA: beginning "F:\P3Dv4\Modules\AB_HDG_speed.lua" 9323640 LUA: F:\P3Dv4\Modules\AB_HDG_speed.lua:28 9323640 LUA: Global: ipcPARAM = 0 9323640 LUA: F:\P3Dv4\Modules\AB_HDG_speed.lua:1 9323640 LUA: F:\P3Dv4\Modules\AB_HDG_speed.lua:30 9323640 LUA: F:\P3Dv4\Modules\AB_HDG_speed.lua:32 9323656 LUA: Waiting for an event in "F:\P3Dv4\Modules\AB_HDG_speed.lua" 11448781 >>> Thread forced exit (ipc.exit or os.exit) <<< 11448781 System time = 12/06/2019 11:17:34, Simulator time = 12:18:26 (11:18Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AB_HDG_speed" Log [from FSUIPC version 5.151] ********* 11475422 System time = 12/06/2019 11:18:00, Simulator time = 12:18:43 (11:18Z) 11475422 LUA: beginning "F:\P3Dv4\Modules\AB_HDG_speed.lua" 11475422 LUA: F:\P3Dv4\Modules\AB_HDG_speed.lua:27 11475422 LUA: Global: ipcPARAM = 0 11475422 LUA: F:\P3Dv4\Modules\AB_HDG_speed.lua:1 11475422 LUA: F:\P3Dv4\Modules\AB_HDG_speed.lua:29 11475422 LUA: F:\P3Dv4\Modules\AB_HDG_speed.lua:31 11475422 LUA: Waiting for an event in "F:\P3Dv4\Modules\AB_HDG_speed.lua" ... a snap with the line numbers... Thanks again....
  9. .... my latest attempt using "event.timer" but any iterations and many different tries later it still doesn't work Can't figure out how the event.timer is used in this... among other things
  10. Trying to make the HDG rotary increase step from - 1 deg per click to 10 deg per click - automatically when turning the rotary after a set number of deg's have occured in a given time. Here is a sample of the LUA actions.lua script from LINDA website for the Aerosoft Airbus A320 that I've been trying to alter with no success (I am not a programmer). Can anyone help please...... This the original for HDG plus , there is also one for HDG plusfast but you need to manually trigger which one to select _________________________________________________________ function AB_HDG_plus () AB_hdgtrk = ipc.readLvar("AB_AP_HDGTRK") AB_drift = round(ipc.readLvar("AB_AP_HDGTRK")) if AB_hdgtrk == 0 then LVarSet = "AB_AP_HDG_Select" else LVarSet = "AB_AP_TRK_set" end LVarGet = round(ipc.readLvar(LVarSet)) AddVar = LVarGet + 1 if AddVar > 359 then AddVar = 0 end DspHDG(AddVar) ipc.writeLvar(LVarSet, AddVar) end Here is one of my inept attempts at altering it..... _______________________________________ function AB_HDG_plus () AB_hdgtrk = ipc.readLvar("AB_AP_HDGTRK") AB_drift = ipc.readLvar("AB_AP_HDGTRK") if AB_hdgtrk == 0 then LVarSet = "AB_AP_HDG_Select" else LVarSet = "AB_AP_TRK_set" end LVarGet = ipc.readLvar(LVarSet) if (LvarGet - val1) > 20 then AddVar = LVarGet + 10 else AddVar = LVarGet + 1 if AddVar > 359 then AddVar = 0 end --DspHDG(AddVar) ipc.writeLvar(LVarSet, AddVar) end val1 = LVarGet sleep(200) end event.flag(1, "AB_HDG_plus") _________________________________ My general idea is when the rotary turns, a reading is taken of the HDG degrees at that time then ie 200ms later a reading is taken again and if the difference is over ie 15 deg it sets the rotary to step 10deg per click instead of 1deg step per click. As soon as the sample is less than 15deg diff then it steps back to 1deg per click. This should be easy for someone with a bit of LUA knowledge to do (I think) Thanks for any help
  11. Yes it is a bit bewildering for me tooo... the reason for the set of flags at lines 17-25 is that on the box there are '3' buttons that must have only one of them active at a time - COM, NAV, FMS . so if I press the COM then the others must be clear etc because these are 'sharing' the Dual Concentric Rotary. They are non latching momentary push buttons, so I've done the latching in the code and that's why the rotary pin inputs 8,9,10,11 are filtered by flags. When I press NAV it is active and if I press COM it is active etc immediately without double pushes etc. Also the middle PushButton on the Dual Concentric Rotary was intended to switch from NAVCOM1's to NAVCOM2's Flag 3,23. The extra flags further down for the G1000 buttons are required because I increased the number of buttons available on the BBI32 interface from 32 to 51 by doubling up on some buttons and assigning 2 inputs to 1 button press as an additional, seperate function... but in so doing have to make some exclusion or inclusion flags. I'm going to try your method/controls for the frequencies again today... wondering if my flags are getting in the way... although the FMS navigation with the Rotary and flags works ok. The 4 lines starting 105 with the 'Throttle4_set' move the blue rectangle for the COM/NAV windows focus and works well. The 8 lines further up starting line 11 are for the altitude rotary. I have no experience of coding really and this is the best I can come up with at the moment.... willing to learn how it should be done. cheers Donovan aero
  12. Hi Pete and Don, thanks for your replies and help. Pete the F1 Mustang seems a bit more complicated than the default G1000 and I had to to create MACROS which worked for other items (wonderful utility Pete) though with this radios problem it didn't help me. I have posted a section of my primitive attempt to configure the buttons with the radios - J4B18 is NAV flag J4B13 is COM flag and J4B15 is FMS flag. I don't know if this is the way it should be done. I thought putting the J3B23 flag on the push of my Dual Rotary would set the rotary to inc/dec the com1/2 nav1/2 respectively but doesn't work with NAV/COM2's. To Don thanks a lot for the information you posted , I didn't know about the INPUT.ini file in the Gauges folder either..... I was trying to do everything in FSUIPC as I don't know LUA, LINDA etc although I downloaded the SPADnext demo (a few days left) to see if that could help. With the INPUT.INI I did try to assign some buttons but no joy, although with the different flags and events involved with the J2B23 and it's flag I'm not sure if there will be conflicts or how I'm going to write it in. I used the PFD_Com_Cursor=Joystick:2:Button:24 but also with trying some others no result. I thank both of you again and I will try some more tomorrow...... ....feedback on the way I've written the code would be appreciated if you desire. Thanks aero
  13. Hi , been racking my little brain to find a way to switch between - COM1 standby - and - COM2 standby - ... - NAV1 standby - and - NAV2 Standby - in a G1000 PFD (Flight1 Cessna Citation Mustang). I have made a little button/rotary box and have it all configured great except for this. I am using FSUIPC to write the functions but cannot find a FSUIPC or SIMCONNECT Control number that does this function..... does one exist ? Be great if someone could chip in with some advice on this... please let me explain myself a bit more. I am trying to get a switch to move focus from the COM1 Standby window to the COM2 Standby window and the NAV windows too... to enable me to input the COM2 and NAV2 frequencies THEN I can swap them from Standby to Active. Thanks for your help aero PS I can already swap between Standby and Active on the frequencies , those are not the ones I need im agimag image uploading site e image free hostingfree hostinge hosting
  14. I can't seem to be able to save Flight Plans for the - QW Bae146... This is on a single FSX-SE install... I have looked at the config files for FSC but can't figure out how to allow the QualityWings flightplan to be sent to the Bae 146... Is there something I can alter , change to allow this ? Thanks for your help... Ian ---------------------------------------------------------------------------- EDIT--- My Fault... ALL OK now !!!!! Thanks. -----------------------------------------------------------------------------
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.