Jump to content
The simFlight Network Forums

Bobby Allen

Members
  • Content Count

    15
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Bobby Allen

  • Rank
    Member

Profile Information

  • Gender
    Male
  • Location
    Suffolk, UK
  1. Sorry Pete, It was my mistake - I had been working all day and was extremely tired and I should have realised a few things which at the time but they just passed me by... firstly the fact that 'setbits' and 'clearbits' - the words alone state the usage of the methods/functions. - I am actually a software developer myself so I should have known better! And your correct where I was addressing the bits incorrectly, I mean't my 'switches' which I named 1 - 8 and I completely understand the 0 - 7 are the 'true' way to address the bits due to the fact that its binary. I feel completely stupid now Pete and extremely sorry that I seemed to annoy you so much last night!
  2. Thanks Gypsy Baron :) I'll give that a go, that is a very good idea, thanks for the tip and thanks for taking the time to read and reply to my forum post :)
  3. Actually I see a problem with using the 'setbits' in my project, most of the buttons are mapped to Mouse macros that I cannot get the value of so I suppose if I was to press a toggle switch (which runs a mouse macro) I wouldn't easily be able to get the value of the bit for that toggle switch (eg if that 'bit' within the byte was previously on or off) unless I could check the status of a bit within the byte and not just return the offset value as a whole. ... I should probably just stop wasting your time and just read the documentation again! - If all else fails I will just use the offsets with writeUB instead of setbits. Thanks Pete - you are a gentleman!
  4. I actually see from reading your post a second time that my third example above, that is would only turn on bit 8 whilst resetting the others so I guess I'll have to devise a LUA function to add or subtract bit values from the current state of an offset. I'll read up again on your FSUIPC LUA documentation and I guess I will find something like: ipc.readbits("66C0"); to which I can then do something like:- if ipcPARAM == 1 then -- turn on the 7th bit leaving the rest intact! bitval = ipc.readbits("66C0") newbitval = (bitval+64) ipc.setbits("66C0", newbitval) end if ipcPARAM == 2 then -- turn off the 7th bit leaving the rest intact! bitval = ipc.readbits("66C0") newbitval = (bitval-64) ipc.setbits("66C0", newbitval) end
  5. Ahh ok, I think I understand fully now then, so... ipc.setbits("66C0", 65) --Turn on both bits 1 and 7 ipc.clearbits("66C0", 65) -- Turn off both bits 1 and 7 (leaving the rest in their current state) ipc.setbits("66C0", 128) -- Turn ON bit 8 (leaving the rest in their current state? - Or would this just turn off all others and just turn on the 8th?) ipc.clearbits("66C0", 255) -- Turns off ALL bits in the offset regardless! If my third example is in fact just turning ON the 8th and resetting the rest, I'll need to do some maths with a LUA function I suppose to read the current value and then add on the additional 128 (to turn on the 8th bit as well as the current ones that are already 'on'). - I hope that I have now fully understood :) Pete - Thanks for your help - You are amazing and truly dedicated to supporting this great software :smile:
  6. Excellent and as far as I know it does work :) - I'll have a play when I get home later this evening and fingers crossed it will work great :smile: as that would be great! :smile: I will have several yes and I will of-course take your advice and use the setbits and clearbits method if I can :) I therefore assume that each of the following are valid.... ipc.setbitsUB("66C0" , 1) -- Switch One On (1st bit in the first offset now equal to '1') ipc.setbitsUB("66C0" , 2) -- Switch Two On (2nd bit in the first offset, now equal to '1') ----- ipc.setbitsUB("66C0", 8) -- Switch Eight On (8th and last bit in the first offset, now equal to '1') ipc.setbitsUB("66C1", 1) -- Switch On (1st bit in the second usable offset), now equal to '1'.) ipc.clearbitsUB("66C1", 1) -- Turn off the last switch (bit) as above, now equal to '0') ---- ^ I just want to make sure that I fully understand what you are saying Pete? :) ... Uber excited that in theory I could create all my own outputs for my switches!! :smile:
  7. Hi Pete and anyone else that can help, I've had a thought today whilst at work and just wondered if someone could confirm if this is possible or not, I understand that offsets 66c0 -> 66FF can be used for personal use. I currently use a payware aircraft that does not have any output offsets that I know about - I've decoded all the VC buttons to LVAR values and have written a .lua script to handle the buttons that I am programming through my BU0863X card so for example... if ipcPARAM == 1 then ipc.writeLVARS("example_lvar", 1); end So I configure my button on my joystick (or in this case connected to the BU0863X card) and choose the action from the drop-down menu in FSUIPC and then specify the parameter as '1' as I want to set the above LVAR as to mimic pushing a button in the cockpit and this works great for 'inputs' but I want to also have some LED's in my cockpit too :) Am I right in assume that if I was to add for example ipc.writeSB() like so:- -- Turn ON my example button if ipcPARAM == 1 then ipc.writeLVARS("example_lvar", 1); // The switch in the aircraft is now turned ON! ipc.writeSB("66C0", 1); // The 'output' LED is now turned ON! end That I could then use my OpenCockpits USBOutputs card to 'READ' the value of the 66C0 offset and it would read '1' or when turned off like in my next example (below) would read '0'.... -- Turn OFF my example button if ipcPARAM == 2 then ipc.writeLVARS("example_lvar", 0); // The switch in the aircraft is now turned OFF! ipc.writeSB("66C0", 0); // The 'output' LED is now turned OFF! end I hope this makes sense and even better, if it is possible to both read and write to these offsets that would be amazing!! - I only hope that I haven't misunderstood the 66C0 -> 66FF offset range's purpose :S Many thanks in advance, Bobby
  8. Thank you so much for your reply Pete :) - As always, top support! (although isn't really directly related to FSUIPC) :) - If anyone knew though it would be you ;) It sure does look like yours Pete (I'm 99% sure its just a copy of yours lol) and I did already find the documentation PDF's on my PC but I posted the above post while at work and just wanted to reference a list of the FSX controls so anyone viewing the post could have taken a look at the list that I looked on for the controls I was asking about above :) Once again, thank you so much for your help, I'm off to go and play with the above controls you mentioned above :) Cheers, Bobby
  9. I know this isn't directly related to FSUIPC but I am currently creating a LUA script that I use with FSUIPC. I am having real problems trying to find the FSX control number for the following two things:- Course Reference (CRS REF) value Increase and Decrease (I wish to use a rotary encoder to adjust the CRS REF bug) Barometer value Increase and Decrease (I wish to use a rotary encoder to increase and decrease the barometric pressure values - instead of using the automatic 'B' key) I have checked the full list of FSX controls but I cannot seem to find the correct four FSX control values for the above two features. - This may be due to the fact that I don't know other names for the above (maybe they are listed as another name on the FSX controls list). This is the list I was using: http://www.lear45project.org/uploads/3/9/9/6/399602/list_of_fsx_controls.pdf I just wondered if someone could help me :) Many thanks, Bobby
  10. Cheers Pete... After looking at some examples in your documentation and looking at some of the other examples in the User Contributions forum I have now posted and shared my LUA script too: http://forum.simflight.com/topic/69693-iris-f22-raptor-lua-module/ Thank you for such an awesome piece of software! :)
  11. Thought I'd post up post up my script/LUA module for the IRIS F22 Raptor - In case anyone else wanted to build a home cockpit based on this model :-) https://github.com/bobsta63/Bobbys_F22_FSUIPC_module Still working on it at present by have nearly all of the virtual cockpit buttons/switches mapped to parameters which can then be used to assign to physical buttons/switches using FSUIPC. If you have any questions or suggestions on how to improve it please do let me know :) I show have the module finished by the middle part of next week!
  12. Thank you very much for your fast reply Pete :) - I'll take a look at the User Contributions sub-forum and also will go and check out LINDA too :)
  13. Hi, I have a fully registered copy of FSUIPC and previously was using it on my Wilco Airbus A319 home cockpit, I was using the excellent mouse trapping techniques (Macros) to capture controls and then able to assign them to push buttons and rotary switches etc. that I had setup on various Leo Bodnar BU0836X USB cards and it worked wonders :) My problem is that now I am planning on building a fighter cockpit (the A319 is slightly too big for my spare room lol!) so I have dismantled the A319 and now plan on building a F22 Raptor (using the IRIS F22 Raptor) but I have noticed that the FSUIPC mouse macro's fail to recognise any of the VC controls :( - I know that this feature only works if the model developer used a particular method of programming and its not guaranteed to work anyway (I've read the FSUIPC manual lol) but I know that I may be wasting your time asking you to reply but I'm just hoping that maybe someone has a work-around? . It looks as if the panels use XML configuration (it would appear). I've just seen another thread on the forums about LINDA so I'm hoping that maybe that can achieve such a task :) I'd be so grateful for any help or advice.. Failing that I guess I'll just have to find a quality aircraft model (realisitc) and that works with the FSUIPC macro's (Pete you are a genius... I love the mouse macros feature! :)) Regards, Bobby Allen
  14. I too would just like to say congratulation and you really have contributed so much to the Flight Sim community.... but you don't need me telling you that :) A huge thanks Pete :)
  15. Does this mean that I can use LINDA to capture and assign mouse clicks in aircraft cockpits that previously didn't work with FSUIPC mouse trapping techniques? - If so this would be so amazingly great and exactly what I'm looking fot!!! :) My last home cockpit was an A319 (Wilco model) which I used FSUIPC to capture mouse clicks to assign to my pysical controller buttons to the VC buttons but I've now decided to make a fighter cockpit which uses the IRIS F22 Raptor but FSUIPC unfortunetly cannot capture any of the cockpit switches etc :( I look forward to hearing back :)
×
×
  • 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.