Jump to content
The simFlight Network Forums

Iceking007

Members
  • Posts

    59
  • Joined

  • Last visited

Everything posted by Iceking007

  1. Hi John, Okay what a headache this is... hopefully this helps you. I have two new log files, (1) is for keyboard keys, (2) is for my Lua file. Neither worked. Hopefully you find the problems; I think there should be a good log of the hardware panel because I had the logging enabled and used the buttons that did work and they functioned well... it's the customizing that isn't going well. I'm not sure I integrated my Lua file properly; none of the code seemed to run... I added the [Auto] entry into my .ini file as you will see. Thank you. I'm about to give up on this while project. This stupid thing!
  2. It wasn't a very good explanation... that table in specific is in fact a multi dimensional table: TableA = { {array 1:1, array 1:2, array 1:3}, {array 2:1, array 2:2, array 2:3} } I was only using the io library for testing purposes. This way I can run my code instantly in the terminal and see how it's working. Otherwise I'd have to save it upload to my NAS, download to my flight simulator (after starting it up of course) run fs, and then attempt the code. If it didn't work (as I build it in individual pieces at a time) I wouldn't know where the failure is, this way I get an idea. I have done a few tutorials and looked at many of the example files. Thank you for your feedback.
  3. Hi John, I'll look into that further this weekend, thank you for that. A couple quick questions if you don't mind re- Lua. Is it safe to assume that when fs&fsuipc first starts/ loads a flight all values are 0'ed; eg flags, toggle etc... also would a 0 be the same as nil? (mostly I'm using ~=0 but it's good to know.) Also, if you're tracking a panel toggle, say p2 (radio panel) or p3 (gps), If they start visible would their toggle still be 0 or is that going to report as 1?
  4. I'm curious if there's a master list or definitions or explanations of input/ outputs between fsuipc and Lua code. I have been reading on forums various versions of this such as ipc.log() ipc.buttonpress() or was it event.buttonpress() But I'm hoping to learn what is available to us and how we use/ code them, what the parameters are, and their limitations. Thank you for your time.
  5. Nevermind, I've literally just stumbled upon a solution (isn't that how it works...?!) Here's what worked: TableA{ {"stuff here"} } function readTableA() for v = v, v do for k = k, k do io.write(TableA[v][k]) end end end Not sure why I need all that with variables rather than set integers being able to read the table directly; but hay, if it works, it works. I was going to see about deleting this, but perhaps someone might find it useful?! Storage space is fairly cheap. I have more questions but I'll post those as they bother me more. Thank you.
  6. Hello, I have been learning Lua and it's been going fairly well. I have run into an odd problem I'm hoping someone could shed some light on. Please note I am by no means an expert... and there certainly is a ton I don't fully understand, however I'm trying to learn and solve a piece at a time. So simply put I have a multi array table, say TableA{} which has a bunch of strings in it; I'm using this for commands I plan to send back to fsuipc. Anyways the table might look like this: TableA { {"C#####", "C#####"}, {"C#####", "C#####"} } if I run io.write(TableA[1][1]) I get a I expect C##### (tested as ...C###11 or C###21 respective to verify) However if say I change some code to: v = io.read() k = io.read() io.write(TableA[v][k]) I get "attempt to index a nil value". Even if I print the values before the table call I can see the variables are storing the inputs; however the table isn't using the values. To clarify: v = 1 k = 2 works but not if I'm using io.read() I appreciate your time.
  7. Okay, so perhaps a was mistaken... I had a brief few minutes after work today to try and get some full logs. So what happens is, when I opt to use virtual buttons to activate my controls, the system fails to respond accordingly; regardless if I'm activating those virtual buttons with key strokes or hardware buttons. However when I use only hardware buttons, the functionality is a expected. Please note, this is the exact code, the only changes are swapping out of hardware versus virtual buttons. ie: instead of using 2,0 for joystick, I change that to 11,11. All the flags are done on virtual buttons and that works. But if I change 2,0 to 11,11 and call it with a C1070,2827 (256*11+11) the chain is broken somewhere. Attached are a variant of the .ini file I used, one log file that worked with joystick buttons and one log file that didn't work (I can't recall all the details, sorry, I was quite rushed to get this out to you; typically I like to be thorough and organized, this is only about 40% I'm afraid). P.S. I have been working substantially on my Lua file. I'm getting very close with it and although it's probably just going to replace all of this I'd really like to learn/ figure out what's going wrong; this is so simple it should be working, and I don't like to leave simple problems unsolved - not good for the brain. I'll be needing some help with integrating the Lua file, but for now we could just stick to this; I can create a posting elsewhere for that and the other difficulties I am having. Hopefully those log files help you. As always, thank you very much. P.P.S. The log files were done one at a time. Configure .ini, load fs, start log, press buttons/keys, stop log quit; repeat. Please remove one you have them. ty
  8. I had those very same thoughts as well. So as a test I input into the fsuipc.ini file to use plain old keyboard keys, such as "H" , or "O". Obviously fsuipc detects these perfectly; however it still did not work with that code. Yes, my joystick buttons do work without error. As I said, it's very strange, I fail to see the logic in it.
  9. Okay, so here's the short story long... I own one of Ruscool's RNS530 hardware panels, I also purchased Reality XP's GNS530 & 430 software packages; however I cannot get the RXP software to work on my computer... I'm hoping someone will help me sort that out, but so far nothing. In the meantime I am configuring the panel to function with the default fs GPS 500. I programed all the keys,.ini, and .cfg files, and integrated it into the Sim. However as I'm sure you're aware, the GPS500 does not have the same functionality and therefore does not use as many inputs; leaving me with spare inputs to configure for other uses. That is what I'm trying to attempt. So my RNS530 panel is completely configured through the fsuipc.ini file and all the functions work well; so the confusing "key reads" I described in fsuipc don't seem to be an issue, except that, for assignments, I cannot assign them with the fsuipc UI; I had to go and manually input them into the .ini file for it to work :: and it does. Now keeping with the theme of the GNS530 I thought it would be handy to utilize the COM and NAV features to assist those variables. I do have radio panels, but that frees a couple displays up for other variables such as ADF, Txp, DME etc... as required (so bumping the stack up). I also then considered it would be extremely to be able to adjust other variables, such as CRS, HDG, ALT, VS, etc. So that's essentially what I'm attempting to accomplish. To answer your query, 2,4/2,5/2,6/2,7 are "available" joystick buttons I'm considering allocating to the project. Joystick 2 button 4 etc. Sorry, I haven't been able to get the log file for you; I will try to do that. (buttons only as requested) Thank you.
  10. Okay, so I'm fairly certain fsuipc 'sees' the button presses from my hardware. Although in my opinion it isn't perfect. Let me explain. The hardware was an interface software, when I go into fsuipc and either in the button or keys tab and press my hardware, nothing happens in the buttons tab, and it seems to be confused in keys as well; like there's ghosted data... (I'm using shift and control modifiers with F keys generally, but let's say I'm just using letters), If I assign Input 1 as "a" and input 2 as "b" then go to fsuipc, pressing input 1 might give me a, but then pressing input 2 might also give me a... if I press input 2 multiple times over it might give me b and then if I press input 7I might also get a "b". Often times it stays blank, it's weird. This is not a major concern however because in the Sim it works wow well, one press of all inputs and they perform their programed function. In my .ini files you will see the programming for those keypresses in the [Keys] section, so this is ONLY "programmed" in fsuipc; therefore it must be interpreting the hardware panel properly.
  11. Okay I apologize for upsetting you; I'm doing my best here. I'm not sure I can explain any better but I will try... I have a "cockpit/panel", in that I have my controls as I'm trying to get away from using a keyboard and mouse. I have come up with a plan to utilize four buttons on my yoke and five buttons on my hardware controller to perform certain commands inside fs. The yoke is commercially purchased and is recognized by everything as a "joystick". The hardware panel unfortunately only accepts keyboard key assignments/ programming (if there's a way I can make that a "joystick" - fine that would be dandy - however for now I'm stuck with keyboard assignments. The five buttons on the hw panel are ideally going to have 4 'soft' controls that will react to whether or not I select 2,4/2,5/2,6/2,7 or press the fifth button on the hw panel. This is why I'm using flags and conditional formatting. I'm sorry I'm such an idiot. I'm not confusing button flags with buttons, trust me. I am setting flags to create conspiring for the controls I want to activate. If my key assignments cannot trigger button presses then this is all moot, because that's what I'm trying to do... use hardware to send a keypress to fsuipc to activate a command for fs. I'm not sure what offset 0x3340 is... but that sounds useful. However I'm not sure what 'externally triggered' vs 'internal assignments' means (other than the obvious). Again I'm sorry you are so upset. I started trying to understand/ learn Lua last night... but I'm on a Windows computer and Visual Studios looks too complicated to me, and Sublime wouldn't open up a "Command Line" so I could test my code... I'm going to see if I can get that working. Also I will try to get you better logs with ONLY buttons as you requested.
  12. Okay... let's try this again. Here are the files as requested; Joystick buttons goes with log 1 and works 100% as intended and desired. Then I change the code to have the buttons activate virtual buttons to perform the exact same code and I don't get the results I'm looking for. - AT ALL - }}}}}}} PLEASE NOTE :: These files are a complete disaster and a mess! The log files are !HUGE! I hope you can understand that. All I did was activate, perform all 6 modes with 4 variable adjustments (three times) for each one. These files were neat and organized, but please understand I have been reworking this code for days now and changed it around hundreds if not thousands of times. This way... that way... before... after... like this... upside down... I haven't tried it in German yet; but I will of you think that will help!! Anyways, the files are an embarrassment, hopefully you can find heads or tails of it. {{{{{{{ Thank you kindly. P.S. If able, please remove these files from the server once you have them.
  13. I need to be able to use keys because my hardware is not a joystick and thus can only be programmed with key mapping. Understood, I'll try to see if I can make a log file; makes perfect sense. No worries, much appreciated!
  14. Perhaps it isn't possible for a key or a button to call a procedure of a virtual button in compound statements. If this is the case I have just wasted all my time; because that is what I am attempting to accomplish. If this isn't possible in the newer FSUIPC7 then it's most likely not going to work in 3.9. I have started looking at Lua script, but that's going to take me awhile to learn...
  15. Another strange thing is if I try: =CP(F+11,10)(F+11,11)2,#,C# (real joystick button) it works however if I change to: =CP(F+11,10)(F+11,11)11,10,C# and add: =P2,#,C1070,{vB multiplier - verified numerous times ie 2828 for 11,12} the code doesn't work... One step forward two steps back. I have been making all sorts of check intervals ie: stage one turns on AP HDG HLD, suave 2 AP NAV HLD; that way I can verify if all lights are on all the flags are set. All the flags set correctly; the buttons just don't go through. I'm don't for the night, but I'm copying my .txt files to my phone; if you think it'll be helpful I can post some of my actual code, so you can see whether I'm a lunatic or not. lol (If anyone's still there, thanks for staying tuned! Don't be a stranger if you have an idea.)
  16. Okay, so this is what's frustrating... I have been racking my brain trying to figure this out but nothing I am doing seems to be working... (I understand I'm probably on a short leash with you as I'm working with an older version you don't support; no one else has come in with experience with 3.9; so you're really my only hope...) I started from scratch to test this out step by step: n=P2,1,C1 (real joystick button works everything is good) :: C1 is performed I can see the augment inside FSUIPC buttons page; every way I look at it no problem. n=CP(F+2,1)2,1,C1 n=CP(F-2,1)2,1,C2 again works as I want [Keys] n=79,8,1070,513 :: "o" selects button 2,1 :: I can see this in FSUIPC, Evelyn looks good everywhere, press o and nothing happens. Even if I just change the button code to P2,1,C1 zip... the hard button works the keyboard button doesn't. So then I think maybe my keyboard is malfunctioning. I go to one of my panels that is using keys to input commands through FSUIPC, the button works properly in its current configuration, however when I change the code to activate 2,1, again, nothing happens. So I know it's not an input problem. And I also know fsuipc is registering what I want to do because I see it in both the buttons and keys settings... but there's a disconnect somewhere. And the kicker is, I swear I had one or two attempts over the weekend that did work successfully at one point; and then something broke.... Any help?
  17. I see, okay. It doesn't really matter to me if the flag toggle is prior to the event or during... I just assumed put it in the event. Thank you for your input, I'll work on that at some point later. Good to know about Sim Connect, thank you for the explanation.
  18. Please do not be sorry at all; I completely understand! I certainly am grateful for you spending time with me on this, sincerely! Yes, so that's what I was changing my idea to now instead of you suggested 15,2, I'm just going to use 11,10 (same same). I have this planned for next time I get in the Sim: =CP(F+11,10)11,11,C1005,2826,C1003,2825,C1 =CP(F-11,10)11,11,C1005,2826,C1003,2825,C2 They're is another wonder of mine, the list of fs commands is extensive but not ALL INCLUSIVE. Is there a way to use the 'hidden' commands. For example in fs2004 you can set keys to something like ~selection decrease~ or ~selection increase~ there are many many more... but that 5 digit code is not in the fs list, nor is it in the FSUIPC custom list. There's something else In wondering but I forgot. Thank you. Oh, I remembered one thing, the problems I was having with the flag could very well be my specific setup; I'm going to do some tests with simple keyboard keys to rule that out, ex "h" triggers vB11,11 etc.
  19. Yes! That is exactly the condition I am trying to generate, C1 then C2 then C1 and so on... that's why I was using the button flag to toggle the modes. (I'll give up on the button timer for the time.) I'll use your reload method, the instructions say to change AC but I was just "reloading" the flight; I did actually reload the flight on a couple occasions, but I figured actually re-selecting the flight would definitely refresh all the data and I was more at ease knowing that wouldn't create problems.
  20. Interesting, I was under the impression that a button flag is independent of its button being pressed, ie on one press the flag is set + on the next press the flag is set -. So what is the difference between the flag and the button state: "F+/-" VS +/-"? I can get around it using another vButton flag and manually setting it, thank you for the input. No need to be sorry, I completely understand. If I have a few months of spare time I might look into that Lua thing. Thank you for your contribution. P.S. As I was working on things I was getting funny results, stuff stopped working, errors would come and go... if I restated fs VS reloading the flight. It's frustrating just testing the results of code changes this way. Not sure if there's a better work method but generally I edit the .ini file, save that and save a copy (I find sometimes FSUIPC just ignore it and overwrites mine), go back into Sim, select 'choose a flight' (while currently in a flight) - to essentially reload everything, and then test the code. Takes time...
  21. Alright... I'm making progress; I can't delete those posts so I'll update: key :: 109=121,11,C1070,2827 is the solution and works. I'm working on my flags now, but they aren't working very well... For example, I have two lines for the same button to accomplish two different tasks: 100=CP(F+11,11)11,11,C1 101=CP(F-11,11)11,11,C2 Only C1 works, I tried even forcing itself to swap Flags either with 1005 or 1003/4 but those didn't improve the situation...
  22. Okay, I think I found another piece... FSUIPC Control 1070 allows me to activate a key or a button; however I cannot goes the format, is it... 109=121,11,1070,2827 (vBJ11,B11) 109=121,11,1070,11,11 109=121,11,1070,J11B11 Do I need brackets, C1070?
×
×
  • 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.