Jump to content
The simFlight Network Forums

Firefly

Members
  • Posts

    25
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Firefly

  1. Yeah FSUIPC itself is kind of okay - it's just mentally painful because of LINDA and other files that one has touched in the same folder. Just feels at unease.
  2. Ahh, that was one of the few changes that was actually changed back in 7.3.3. Going through the mentally painful process of upgrading again...
  3. Just loaded up A32NX and now trying to list Lvars - but the window is completely blocked off so I cannot select any text, nor can I scroll to see the list beyond what is visible defeating the entire purpose of the feature!! Why on earth is it locked down?? On version 7.3.2
  4. Finally had time to continue with this. Adding the "H:" did seem to fix it.
  5. I didn't rename the file (it's still called G1000.hvar) but it shows up in the Activate HVAR window so I'm presume it's loaded. But nothing happens when I press Activate. (Only using stock C172 with WT G1000 mod)
  6. Oh, that's a godsent link right there! Using the calculator codes I find there it works beautifully. I just wonder why calculator code "(>H:AS1000_PFD_SOFTKEYS_4)" works but the Hvar "AS1000_PFD_SOFTKEYS_4" doesn't - isn't that what the CalcCode is doing? (yes, I did copy the .hvar file to the modules folder in fsuipc-lvar-module). I don't really need to know why though, since I have a working solution, I just wondered... And this means I don't need to install the MF WASM - how nice. I'm using stock C172 and is indeed using the WorkingTitle G1000 mod. Tried googling hvars for that but didn't really find anything... But it seems to work with the code from hubhop.
  7. Great - now the MSFS Variable Service connected correctly to the sim and I was able to successfully use both the L and Hvars in the A320 as you have in your documentation example. It's just awesome to have this working so smoothly and responsive - looking so much forward to further reduce the use of that pesky mouse! So far so good. Now I also got some of the G1000 buttons to work, eg. MFD range inc/dec, but most other Hvars don't work (none on the PFD). They don't work when I trigger them from FSUIPC either, so it's not an issue of the websocket server though...
  8. Okay, maybe I misunderstood what I was reading then, eg. here: So now I'm all confused... Don't I need to install the MF WASM module to control the G1000 if I already have the FSUIPC WASM module installed? And for eg. the softkeys, isn't it the Hvars (or Lvars?!) I need to use to activate those?
  9. I was playing around with it and believe I was successfully sending Hvars to the sim although I probably didn't use the right ones yet. The websocket response to the vars.write command was success=true at least. But now I ran into some issue. I read about the MobiFlight WASM module and that it made more variables available (eg. for the G1000), so I installed that into the Community folder and when I then started MSFS and was trying to use the websocket server I got the error that it couldn't start the Variables service (see the first screenshot). Since I also had the FSUIPC WASM installed I was thinking that maybe I could not have both WASM modules installed at the same time, so I removed the MobiFlight one again, restarted MSFS and tried again. But I still get the same error (see second screenshot) - and if I click the Start button I get the unhandled exception which I also copied in below. (also tried restarting the computer entirely) Since I got success=true in the beginning I believe everything was connecting ok under the MSFS Variables tab - but since I don't specifically recall what it said there I can't for sure say whether this problem was there before I tried the MobiFlight WASM module... Any ideas? System.InvalidOperationException: Invoke or BeginInvoke cannot be called on a control until the window handle has been created. at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous) at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args) at FSUIPCWebSocketServer.GUI.ctlVariableServiceStatus.vs_LogEntryReceived(Object sender, LogEventArgs e) at System.EventHandler`1.Invoke(Object sender, TEventArgs e) at FSUIPCWebSocketServer.VariableServices.VS_OnLogEntryReceived(Object sender, LogEventArgs e) at FSUIPC.WAPI.fsuipcw_start() at FSUIPCWebSocketServer.VariableServices.Start() at FSUIPCWebSocketServer.GUI.ctlVariableServiceStatus.btnStartStop_Click(Object sender, EventArgs e) at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
  10. Oh Paul, that sounds awesome - not even having to assign them in FSUIPC first. You're an angel! 🙂 I will be waiting as patiently as I can 🙇‍♂️
  11. Hi Paul So above you mentioned how to send controls and also deal with L:Vars. So now the inevitable question comes - how can I activate H:Vars? They are not assigned to an offset. I don't see much in the manual for advanced users on how to use the H:Vars... I don't yet have a use for it yet but just wondering about even executing Calculator Code in the WASM module?! Is that something that could be dealt with if needed? -Allan
  12. @Paul Henty Is there a way I can send a control like I can do in the FSUIPC UI (eg. 66241 - TOGGLE_MASTER_BATTERY) through your websocket server? Also, regarding Lvars - I guess I should be able to read/write those with the new FSUIPC 7.2 by configuring them in the .ini file? Greetings, Allan
  13. Hi Paul, I will take my words back - I think we do need an option for wss after all. If the web page we implement this on is https the browser does not allow using an insecure socket connection. I ran into this issue when trying to inject a little script into the Skyvector map to show aircraft position there... 🙂 Allan
  14. wss shouldn't be necessary - and doing the encryption will just take extra resources. Would only be for security purposes but there isn't much point when you are just on a home LAN. If it only listens on 127.0.0.1 it will only work locally, but if you select to listen on the LAN IP it works from other computers. The only problem I had was that I had to run the program as Administrator in order to be allowed to listen on the LAN IP. Can that changed? Normally you can also set a program to listen on 0.0.0.0 which means any IP can connect to it... Otherwise I'm looking forward to test this out more as soon as I get a chance!
  15. Excellent stuff. I assume you are thinking of sending all values when at least one changes... Wondering if it will make sense to even only send the values that have actually changed. Would save some bandwidth but would require client-side logic to check which ones are present.
  16. I have reviewed the code now - it looks terrific! Good to see you have the "name" ID in there so that we can match the response in case we need to use it a-la-HTTP. Will it only send a message with offset values if there is a change in at least one of them, or what do you think about that? Could save a lot of network traffic for values that rarely change... eg. if you wanted to monitor taxi lights for example... Will you be able to subscribe to multiple offsets.read requests with different intervals or only one? Just curious as I'm not sure if that would be needed... I guess the same reasoning goes for whether or not one can stop receiving messages for something you have previously subscribed to...
  17. Hi Paul, You're fast! This is great - it's exactly what I had in mind for HTTP communication. It can certainly work in a lot of scenarios - I'm just thinking that in case you for example wanted to do a gauge you would want very frequent updates, at least every 50-100 ms, and in that case there would be quite a bit of overhead in constantly opening/closing the HTTP connection and passing headers. At least theoretically that would be a concern... so that's why I was thinking of websockets. I was imagining that you could subscribe to a set of offsets which would then continually be sent back to the client at a given interval (maybe even user desired interval?). Either all the subscribed offsets could be returned, or even better, only those that have changed since last time. I understand that FSUIPC in itself is stateless - poll and response - so this would of course require a running websocket server with some logic in it. But due to the overhead of HTTP I believe it would perform substantially better to have that websocket server continually poll FSUIPC internally than doing the polling over the HTTP protocol? Or is there something I'm missing? Thanks, Allan
  18. Guys, that's great to hear! I really think this could be very useful and open up for a lot of possibilities - as there are a lot of people who know how to work with the web technologies but don't how to use lower level languages, do compiling and all that stuff. But simple web APIs is what is tying systems together nowadays. Looking forward to see what you can come up with!
  19. What is the best way to make a browser web page interface with FSUIPC? So that we can easily design our own panels with buttons and information from the aircraft/simulator using HTML/CSS/Javascript? How could that be done? It seems like it should utilize websockets since that provides two-way instant communication and the WebSocket API is supported by any modern browser. But FSUIPC doesn't have a websocket server in-built I presume... Plain requests via the HTTP protocol could be an alternative but would only be optimal for button presses... I'm aware of WideFS button capabilities - it would be some similar to that but just done in the browser instead so that it will have many more options for layout and information. Seems with today's browsers it should be doable performance-wise and therefore an obvious feature to have.
  20. I thought FSUIPC7 was currently only this beta stand-alone application, so I don't quite understand what you mean by that? Can I use Lua as it is now or not?
  21. Well, of course you would have to define the x,y coordinates in pixels for where the mouse click should happen, but that's not a problem. I have the Wilco Airbus and there are some functions I can't do any other way than using a mouse click. And if I use the same view all the time (I use Ezdok) the location of the buttons will always be the same, so it will work just fine even though its not the most desirable solution. Right now I'm using HIDmacros which can send mouse clicks but it's annoying to have FCU functions on a keyboard when I have the MCP Combo buttons that are meant for doing those functions...! Well I can't use it with the MCP Combo. Also, it costs money - and quite a lot compared to what it does! The developer for the Wilco Airbus do sell an extension that gives me FSUIPC offsets - but it's RIDICULOUSLY expensive! (cost more than the full PMDG 737 NGX!!) FS controls are n/a. Mouse macros don't work. No Lvars are available. Assigned keypresses do exist but only to a key press. And the key press doesn't work for the MCP Combo with LINDA. Hmmm, to me it seems like a logical fallback option when everything else fails... Also with vasfmc some of the mouse macros don't work and I have no other option than to find the mouse, move it to the exact location, and then click. In a busy cockpit I'm sure you know how annoying that is! :) Regards, Allan
  22. Hi Pete, Is there an API available in the Lua that comes with FSUIPC for simulating a normal left and right mouse click? I can't find anything in the documentation, but wonder if a "simple" thing like this really isn't possible... My goal is to be able to assign mouse clicks to buttons on my VRInsight MCP-Combo through LINDA. (Mouse macros, Lvars etc doesn't work for the functions I need) Allan
  23. Pete, (I hope you see this :) ) I have a question along the lines of information from HIDMacros to FSUIPC/Lua. From a script in hidmacros I'm running a Lua script through FSUIPC by calling this (thanks to Petr recently adding the SetFSUIPCString call): HIDMacros.SetFSUIPCString &HD70, 40, "Lua testlua" But at the same time I want to pass a parameter (a string) to that program. I tried the parameter offset like this (before the above line): HIDMacros.SetFSUIPCString &HD6C, 4, "mystring" (not sure if SetFSUIPCString is correct and if I can max write 4 chars/bytes!) But when I access the ipcPARAM variable within the Lua script it always translates to some number which I can't use for anything. Any idea how to solve this, or any other idea how to pass a string to a Lua program? I could maybe write it to a file from within hidmacros and then read that file from Lua but I would guess that would be inefficient?!! -Allan
×
×
  • 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.