Jump to content
The simFlight Network Forums

brandonharwood14

new Members
  • Posts

    4
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Location
    Australia

brandonharwood14's Achievements

Newbie

Newbie (1/14)

  • One Month Later Rare
  • Week One Done Rare
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. Thank you both for your support on this topic. I haven't had a chance to test anything yet as we are currently moving homes. Hopefully have my PC setup properly soon to try this out but I think from your suggestion Paul I will be just executing Calculator Code to set the 'H:xyz' Vars for the applicable Hardware that our customers may have. I'm thinking I may just put all the applicable HVars into a Text file and read them in C# app. The reason I've chosen just Calculator Code is, If I'm not mistaken, LVars and HVars have to be accompanied by a file associated with a particular aircraft to be directly linked? instead of the method above where it just blindly tries to send the calculator code and executes it, if the program can? I believe I will definitely need a connection to FSUIPC for legacy controls too for it seems some autopilot functionality etc. just taking a peak at a particular .ini file by another company that sells similar devices; most of the commands are HVars and some of them legacy events. - This I dont think I will have a problem with as I have already managed to manipulate certain This link will also helped a lot! thank you. One question I have is (hope this isn't a silly one...): does 'Legacy' events just send SimConnect events Via FSUIPC? Thanks - Brandon
  2. Hi Paul, Firstly thank you for all the documentation and work you have put in along side all the other contributors of FSUIPC and the WAPI. I'm hoping to gain some insight on the information below. A bit of backstory before I get to the main talking points: I am trying to create my own C# application to work in conjunction with my hardware for my company. Where the use of Arduino based microcontrollers or my own custom microcontrollers send serial data via USB to the PC and C# program which in tern translates that into events or appropriate code to be sent to flight simulator. I have completed the program for X-Plane but now moving on to MSFS2020 there are many more hurdles to overcome. I am hoping to use my C# program in conjunction with your WASM module and FSUIPC to achieve all the functionality needed for various avionics units. From what I can work out some functionality for certain things in FS2020 are achieved via the use of WASM modules, LVars and HVars. I believe are the ones in particular that I would be interested in given my software only needs to send events to the simulator for avionics. GNS530/430, GTN750,650 G1000, G3000 etc. So my question is how/what is the best way to send this information to the flight simulator. is Calculator code the best way to send not only standard events but also L/Hvars? or as mentioned by John in this thread is the use of Presets the better option. As for presets, how are they supposed to be typed into the C# code or is there a txt file that needs to be placed somewhere specific and then references in C#? in VS2022 I have so far been able to connect to FSUIPC and send basic events to the simulator such as turning avionics on and off. selecting the GPS drives nav1. But no matter how hard I try I cannot figure out how to use calculator code nor presets. How is this sent to the simulator and could you please give me a C# example of this? I have been through your example code but still have come up at a loss. sorry! Any help would be greatly appreciated. Thanks - Brandon
  3. Hi John, Thanks for the information! has definitely got me on the right track and have since found the Events.txt file and documentation about this too. A few questions on this if you don't mind please: From reading the documentation it seems the events.txt file is used to execute calculator code, this code is corresponding to an H:event (such as (>H:KNOB_ALT_SEL_100_DEC))? when you say "use the available presets" how do you actually use this? I see the execute calculator code section in the FSUIPC menu but not sure exactly what to write or copy & paste into there to execute the appropriate event. Do you just paste the the complete line written as is in the events.txt file. or do you place just the "Calculator Code" part of the "<PresetName>#<Calculator Code>" or even just the "Preset Name"? documentation mentions offset 0x7C50. How is this then used in C# or even just in your FSUIPC7 app that opens with FS2020? All I have dealt with Offsets are these but a very basic understanding I have of this: // ===================================== // DECLARE OFFSETS YOU WANT TO USE HERE // ===================================== private readonly Offset<uint> airspeed = new Offset<uint>(0x02BC); // Airspeed private Offset<uint> avionicsMaster = new Offset<uint>(0x2E80); // Avionics Master status private Offset<ushort> simPaused = new Offset<ushort>(0x0264); // 2-byte offset - Unsigned Short private Offset<ushort> pauseControl = new Offset<ushort>(0x0262);// 2-byte offset - Unsigned Short private Offset<uint> GpsDrivesNav = new Offset<uint>(0x132C); // Toggle which source the GPS drives, 0 for Nav and 1 for GPS if (this.GpsDrivesNav.Value == 1) { this.chkGpsSource.Checked = true; this.chkGpsSource.Text = "GPS"; } else if (this.GpsDrivesNav.Value == 0) { this.chkGpsSource.Checked = false; this.chkGpsSource.Text = "NAV"; } In the event files folder in root directory of FSUIPC7 install there are also mobiflight presets. How can I use this in my code? as this is probably the way I would like to go given the extensive amount of information and updates from HubHop? That is a few questions on the functions of FSUIPC7. I do apologise if they are mundane - I have not used FSUIPC7 much before this. As far as C# goes and I understand the above. I just have a simple button in my C# form for testing with the following code written for the Click event: private void DctBtn_Click(object sender, EventArgs e) { FSUIPCConnection.SendControlToFS(FsControl.GPS_DIRECTTO_BUTTON, 0); } To execute the Calculator Code, would I still use the SendControlToFS function and substitute appropriate information in after FsControl.*? I am currently shifting through the massive amount of information in the example code given by Paul. Amazing work just need to try and find the right information in the Sln. Once again thanks for the information you have provided already. I will continue to look into it. Cheers - Brandon
  4. Hi Pete, Firstly wanted to thank you for all the work you've put in over the years for the flight sim community. I have recently been trying to integrate my C# application with your FSUIPC and WASM module. Reason being, I have started up a company that develops GPS, Autopilot, Radios and Intercom panels for use with both XPlane and FS2020. I'm focusing now completely on FS2020 dev and cant seem to figure out if FSUIPC will allow me to integrate my hardware functionality through FSUIPC to send to the simulator. To make matters worse I'm not that good at coding and also don't understand FS2020 side of things as much as I would like. I have tried to access the Hvar's to send to the simulator but it seems that this is aircraft specific and a file required for each different set of Hvar's? So how can I make the program try and send events to the simulator that are not aircraft specific, I know I can just use offsets for most things (which is similar to SimConnect events?) however items such as FMS knob presses on GNS530 or g1000 for example are not just generic commands but I believe Hvar's? Just in need of a little guidance :) Thank you! Regards - Brandon
×
×
  • 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.