Jump to content
The simFlight Network Forums

crashdog

Members
  • Posts

    21
  • Joined

  • Last visited

About crashdog

  • Birthday 01/01/1970

Contact Methods

  • Website URL
    http://www.md80.ch

Profile Information

  • Location
    swizerland
  • Interests
    Aviation, Computers, Music

crashdog's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Infact I checked again and realized that I mistakenly assumed that all Lvars use 4 bytes to store it's values. Checking again I could see that some actualy only use 1 byte. So I will go through all the mapped lvars and improve that. However looking at the quite huge list of Lvars (about 400) and also that I need to map several axis (about 14X12 bits), I feel that I will run out of resources at one point. Since I'm making a MD80 sim I can surely use the 88 bytes assigned to project magenta, that will help a bit too. But I would wish for a larger "free to use area". Kind Regards, Gery
  2. Hello Pete, I have now already used all offsets from 66c0 to 66ff. I need a lot more memory to map all variables that I need. So I'm wondering what is the best solution for that ? I read in a different post that you can allocate more memory. But are you only doing that for commercial addons ? Since I'm not distributing anything could I also maybe just use areas like 7300 (says available for applications) assuming that I don't use what ever add-on might allocate that memory otherwise ? Gery
  3. Hi, I am wondering if there is a changelog or a readme available for the fsuipc releases ? I could not find anything in the forum using the search function. I really would like to know what has changed before I do the installation. Regards, Gery
  4. After a reboot I can now startup fs-x and fsuipc4 again. I think it had to do with a USB device which had a question mark in fsuipc4.inievetually. Will try to restor all settings from my old fsuipc4.ini file now.
  5. Hello, I have tried to assign axis from my md80 throttle over fsuipc4. After it worked ok I rebooted my pc. Now, ok I removed one line in fsuipc4.ini... the AxisSlope..something...=something. when trying to startup fs-x it just hangs now. I also tried to remove fsuipc4.ini from the modules directory. But it still does not startup. when killing fs-x and restarting it, fs-x says it has detected a problem with fsuipc4.dll and if I want to load it. If I don't load fsuipc fs-x start up normaly. this is the logfile fsuipc4.log ********* FSUIPC4, Version 4.60a by Pete Dowson ********* Trying to connect to SimConnect Acc/SP2 Oct07 ... User Name="XXX" User Addr="XXX@XXX.XX" FSUIPC4 Key is provided WideFS7 Key is provided Running inside FSX on Windows 7 (using SimConnect Acc/SP2 Oct07) Module base=61000000 Wind smoothing fix is fully installed DebugStatus=255 62 System time = 14/09/2010 12:35:11 62 FLT UNC path = "\\GERY-PC\Users\gery\Documents\Flight Simulator X-Dateien\" 62 FS UNC path = "E:\fsx\" I changed the name and email address. The rest is original. How can I solve this ? should I try updating fsuipc by the way ?
  6. :oops: thank you Pete... The reason I need conditionals is that I use a real MD80 throttle, the flap possition electromechanics is unfortunately not straight forward. For example flaps position 40 will be on when the flaps are fully retracted and at possition 40. So I need to make it only move when possition 28 is on as well. Thanx again.
  7. Hello, I use FS-X and FSUIPC 4.60a (registrated). I try use a lua programm to set the flap possition. OK I know I should be doing this with conditionals in fsuipc ini but haven't gotten around to look at that yet. So for now I still try it with lua. the error I get in the lua log is : ********* LUA: "flaps" Log [from FSUIPC version 4.60a] ********* 184206 System time = 13/09/2010 12:56:45, Simulator time = 14:13:00 (12:13Z) 184206 LUA: beginning "E:\fsx\Modules\flaps.lua" 194331 *** LUA Error: E:\fsx\Modules\flaps.lua:12: attempt to call field 'marco' (a nil value) 194331 LUA: ended "E:\fsx\Modules\flaps.lua" 194331 System time = 13/09/2010 12:56:55, Simulator time = 14:13:10 (12:13Z) ********* LUA execution terminated: Log Closed ********* attempt to call field 'marco' (a nil value) , what does this mean ? am I passing a nil value ? or is something going wron when the macro is executed ? The marco that I am calling exists and is being executed once before this error msg appeares. script is : flaps = 0; while(1) do if ipc.testbutton(1, 9) and flaps == 0 then dis = "flaps +1" ipc.display(dis) ipc.macro("Aaamad: flaps-plus") flaps = 1 end if ipc.testbutton(1, 12) and flaps == 1 then dis = "flaps +2" ipc.display(dis) ipc.marco("Aaamad: flaps-plus") flaps = 2 end if ipc.testbutton(1, 10) and flaps == 2 then dis = "flaps +3" ipc.display(dis) ipc.marco("Aaamad: flaps-plus") flaps = 3 end if ipc.testbutton(1, 11) and flaps == 3 then dis = "flaps +4" ipc.display(dis) ipc.marco("Aaamad: flaps-plus") flaps = 4 end if ipc.testbutton(1, 11) and ipc.testbutton(1,8) and flaps == 4 then dis = "flaps +5" ipc.display(dis) ipc.marco("Aaamad: flaps-plus") flaps = 5 end -- minus if not ipc.testbutton(1, 9) and flaps == 1 then dis = "flaps -1" ipc.display(dis) ipc.marco("Aaamad: flaps-minus") flaps = 0 end if not ipc.testbutton(1, 12) and flaps == 2 then dis = "flaps -2" ipc.display(dis) ipc.marco("Aaamad: flaps-minus") flaps = 1 end if not ipc.testbutton(1, 10) and flaps == 3 then dis = "flaps -3" ipc.display(dis) ipc.marco("Aaamad: flaps-minus") flaps = 2 end if not ipc.testbutton(1, 11) and flaps == 4 then dis = "flaps -4" ipc.display(dis) ipc.marco("Aaamad: flaps-minus") flaps = 3 end if not ipc.testbutton(1, 11) and not ipc.testbutton(1,8) and flaps == 5 then dis = "flaps -5" ipc.display(dis) ipc.marco("Aaamad: flaps-minus") flaps = 4 end ipc.sleep(10) end in aaamad.MCRO I have: 139=flaps-plus=RX6ee30*X81cc 140=flaps-minus=RX6ee90*X81cc Will look at condtionals as well, but still wondering what I'm doing wrong here. Cheers, Gery
  8. It appeares to me that fsuipc also scans joysticks that had an assignment to them if removed it's still scanned. I organized a different rotary encoder Elma E37, sold at Leo Bodmars web shop. With this model the button stays on even when rotated hench works perfectly with the lua script. Do you mean the fsuipc.ini file ? Do I find information about that in the documentation or can you give me a hint how ? Yes, my mistake. I undertand it now. Cheers, Gery
  9. I unserstud this section in the lua library documentation for ipc.testbutton, that a button had to have any function assigned in order for fsuipc to scann (not watch) the buttons state. That's why I made a empty lua script and assigned it to the buttons i wanted to scann the state of. But apparently it's not really needed as I have tested in between. Basically my testbutton script works now. The only problem (not fsuipc related) is that the button on the rotary encoders I use only work on every second detent. -- "push_rot.lua" by Gerhard Gubler July, 2010 -- free to use, change and distribute at own risk. while 1 do was_pushed = 0 rotated = 0 while ipc.testbutton(4,28) do was_pushed = 1 if ipc.testbutton(4,2) and ipc.testbutton(4,28) then ipc.macro("Aaamad: Auto-head-min") ipc.macro("Aaamad: Auto-head-min") ipc.macro("Aaamad: Auto-head-min") ipc.macro("Aaamad: Auto-head-min") ipc.macro("Aaamad: Auto-head-min") ipc.macro("Aaamad: Auto-head-min") ipc.macro("Aaamad: Auto-head-min") ipc.macro("Aaamad: Auto-head-min") ipc.macro("Aaamad: Auto-head-min") ipc.macro("Aaamad: Auto-head-min") dis = "pushed 2 and 28" ipc.display(dis) rotated = 1 end if ipc.testbutton(4,3) and ipc.testbutton(4,28) then ipc.macro("Aaamad: Auto-head-plus") ipc.macro("Aaamad: Auto-head-plus") ipc.macro("Aaamad: Auto-head-plus") ipc.macro("Aaamad: Auto-head-plus") ipc.macro("Aaamad: Auto-head-plus") ipc.macro("Aaamad: Auto-head-plus") ipc.macro("Aaamad: Auto-head-plus") ipc.macro("Aaamad: Auto-head-plus") ipc.macro("Aaamad: Auto-head-plus") ipc.macro("Aaamad: Auto-head-plus") dis = "pushed 3 and 28" ipc.display(dis) rotated = 1 end end if was_pushed == 1 and rotated == 0 then ipc.macro("Aaamad: Heading-push") dis = "pushed 28" ipc.display(dis) end if ipc.testbutton(4,2) then ipc.macro("Aaamad: Auto-head-min") dis = "pushed 2" ipc.display(dis) end if ipc.testbutton(4,3) then ipc.macro("Aaamad: Auto-head-plus") dis = "pushed 3" ipc.display(dis) end ipc.sleep(10) end Still needs optimisation but is generally working. The idea of this is to make buttons for the MCP where a push means activate an autopilot function and push+rotate means increas/decreas values *10. Gery
  10. You might not want to belive me now or at least think shame on you, but I am actually an software engineer. I even programm assembly for PIC's etc. I'm rather new to lua programming though and like most hight level languages it must first be lerned. I assumed the parameters in logic.And() to be a bitfield. But I guess you understand that. Offcourse using ipc.testbutton is an alternative. But one thing I don't understand with that function. As in the description it must have assigned any macro or lua function in order for fsuipc to watch it. Why ? if I want an allready running lua script to take care of the button handling it means I have to assing a dummy function doing nothing to the button in order to use the ipc.testbutton function ? That's why using ipc.buttons seamed to have less overhead. anyway i'll give it a try and thanx for the lesson. Gery
  11. Hi, I am trying to under stand the n = ipc.buttons methode. I understand that n contains a U32 bit mask but how do I compare the bits with the logic methodes ? What I don't understand is for example in logic.And(y,z) what's y and what's z. Ok they are U32 bit's but how are they represented in the methode as binary or a value ? I tried this which doesn't work (joystick is #4) -- "push_rot.lua" by Gerhard Gubler July, 2010 while 1 do n = ipc.buttons(4) if logic.And(00000000000000000000000000000001,n) then ipc.macro("Aaamad: Heading-push") dis = "pushed 0" ipc.display(dis) end if logic.And(00000000000000000000000000000100,n) then ipc.macro("Aaamad: Auto-head-min") dis = "pushed 2" ipc.display(dis) end if logic.And(00000000000000000000000000001000,n) then ipc.macro("Aaamad: Auto-head-plus") dis = "pushed 3" ipc.display(dis) end ipc.sleep(100) end any help appreciated. Gery
  12. Hello, I was just wondering if it's possible to send some one a macro file to be reused that I made. If that other person has the same aircraft model and same fsuipc version should that work ? I had experianced earlier that when I installed a patch to my aircraft model that the macro file had to be made completely from scratch again. Is that because the vendor has changes the panels and the addresses are then different or does fsuipc in general not know how to "link" to the updated aircraft ? I guess that since the .gau file is mentioned in a macro file that fsuipc will just check for the gauge file to exist or is there any versioning involved ? Kind Regards, Gery
  13. Actually I don't need to write to these. I only need to know the variables values. The interface software to my FDS SYS3 card mainly reads fsuipc offset's and it's values or bits. I did send the value from reading "L:ovhd_apu_bus_adv1" to an fsuipc offset as ipc.writeUD(0x6d00,valuen). Obviously I am not that experianced with fsuipc and still need to read the documents more... however maybe you could tell whether there are some offset's free to use. Then I could at least map the variables needed. I assumed I could use $6d00 onwards from the mapping list. It would be nicer though if I didn't have to map the values at all, maybe there is some trick to get the value streigt ahead. Gery
  14. Thank you for that tip. I looked at Guenter's LUA L:VAR example (and some of the other lua docu) and got a complete looking list of L:var names. Then wrote a little lua script that shows me some details of variables that interest me. while 1 do varid = ipc.getLvarId("L:ovhd_apu_bus_adv1") valuen = ipc.readLvar("L:ovhd_apu_bus_adv1") disp = "L:ovhd_apu_bus_adv1 (id) = " .. varid .. "\n" disp = disp .. "ovhd_apu_bus_adv1 = " .. valuen .. "\n" ipc.display(disp) ipc.sleep(5) end The "L:ovhd_apu_bus_adv1" id = shows me "593". The valuen is 0 when "apu avail" is off and 100 when on. It looks like I could be a step close to my goal. That would be to enlighten an LED which is connected to a Flightdecksolutions SYS3 card. If I now have the L:var name and the id, what is my next step ? Do I need to write it somewhere ? what can I do with it ?
×
×
  • 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.