Jump to content
The simFlight Network Forums


new Members
  • Content Count

  • Joined

  • Last visited

Community Reputation

1 Neutral

About OwenM

  • Rank

Profile Information

  • Gender
  • Location
    New Zealand
  1. Thank you for all your help. i have now got my switches all working with ideas from your code examples. Instead off togglebit I used set and clear bit for better control. If I may ask another couple of questions I now understand how to work with the switches but I also have a park brake switch and can not figure out how to write to offset 0BC8 as it seems to take a value from 0 to 32767 when all I really want is on or off. I note in the offset pdf there is a field for size but how does that relate to the following UB unsigned 8-bit byte UW unsigned 16-bit word UD unsigned 32-bit dword SB signed 8-bit byte SW signed 16-bit word SD signed 32-bit dword DD signed 64-bit value DBL 64-bit double floating point FLT 32-bit single floating point STR string of ASCII characters (in this case the preceding number, n, gives the length not a repeat count) I am sure there is a correlation to these two and I note that 0D0C has a size of 2 and that we used sw in the lights example Again thanks for your help Owen
  2. Yes they are recognized as normal buttons but I haven't been able to find where in FSUIPC to assign TOGGLE_TAXI_LIGHTS, LANDING_LIGHTS_TOGGLE). Thanks Owen
  3. Spokes2112 you are awesome. That is exactly what I was trying to achieve Thank you very much
  4. I have built an overhead panel for my sim that has some switches for example Taxi Lights and Landing Lights. Although I have used Lua before I have spent hours on trying to get these switches to work. I know that the light switch data is held in 0x0D0C offset but I can not figure out how to extract the individual bits to allow me to modify them and then write them back to the offset. I think it involves some logic.and command but its all beyond me unfortunately. Or am I on the wrong track altogether and is there an easier way. Could anyone please help with a little sample code that reads offset extracts bit 3 , if its off turn it on and vice versa and write it back to 0x0D0C. I have read all the stuff that comes with FSUIPC but to no avail Thanks heaps Owen Moore
  • 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.