Jump to content
The simFlight Network Forums

jmcken

Members
  • Posts

    8
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Location
    Asheville, USA

jmcken's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Paul you made my day!!! I could fix it.... problem was this one. asave_Tick(null, null); asave.Tick += new EventHandler(chour_Tick); I copied this piece of code from other tick that I had to control the timezone part and I forgot to change the chour_Tick to asave_Tick.... Working now! Thank you very very much"!!!
  2. Okay using the console, I could find that the lastxxxxvalue is "0" in all cases(Latitude, Longitude, Heading, Speed....) I don´t know where the issue might be... PS: This is how I inserted the Process() in the method: private void setLastValues() { FSUIPCConnection.Process(); this.lastlatitude = this.Latitude.Value; this.lastlongitude = this.Longitude.Value; this.lastaltitude = this.Altitude111.Value; this.lastairspeed = this.Airspeed.Value; this.lastheading = this.Heading.Value; } But I also kept the other Process() in the "Load Button" "click-event" FSUIPCConnection.Process("update"); Edit: Ok, I think I found the mistake. Presumably the method setLastValues() is not being called at least when you hit the button "Save Flight"(pictureBox3)... Do you know why might be that happening?
  3. Thank you very much Paul! But still no Luck... I´m still facing the same issue... When I click the "Load Flight" button the latitude & lon is setted up to 0. Kind regards!
  4. Hello again, guys: This time my question has to do with C# Programming. I finally managed to make the timezones´ function work. However I am having trouble with the AutoSave, this is what I´ve done. But unfortunately it´s not working. May Paul can help me: First I declare the offsets that I´m going to store & update, then I create variables with to store the value of the first ones. And then inside the setLastValues() method I store the value of them.(This method is called each time the user presses a button/the timer_tick passes through it) // We declare the offsets: Offset<long> Latitude = new Offset<long>("update",0x0560); Offset<long> Longitude = new Offset<long>("update", 0x0568); Offset<long> Altitude111 = new Offset<long>("update", 0x0570); Offset<int> Airspeed = new Offset<int>("update", 0x02BC); Offset<int> Heading = new Offset<int>("update", 0x0580); long lastlatitude; long lastlongitude; long lastaltitude; int lastairspeed; int lastheading; private void setLastValues() { this.lastlatitude = this.Latitude.Value; this.lastlongitude = this.Longitude.Value; this.lastaltitude = this.Altitude111.Value; this.lastairspeed = this.Airspeed.Value; this.lastheading = this.Heading.Value; } 2. This is the code on the button "Save Flight" private void pictureBox3_Click(object sender, EventArgs e) { if (pictureBox5.Enabled == false && asave.Enabled != true) { asave.Start(); asave.Enabled = true; asave.Interval = 600000; asave_Tick(null, null); asave.Tick += new EventHandler(chour_Tick); setLastValues(); } else { MessageBox.Show("You have to connect to FS first!!/You can click just once"); } } Code on the Timer_Tick: private void asave_Tick(object sender, EventArgs e) { setLastValues(); } And finally, code in the "Load Flight" button: private void pictureBox4_Click(object sender, EventArgs e) { this.Latitude.Value = lastlatitude; this.Longitude.Value = lastlongitude; this.Airspeed.Value = lastairspeed; this.Altitude111.Value = lastaltitude; this.Heading.Value = lastheading; FSUIPCConnection.Process("update"); } But for some reason it is not working, it does load the wrong latitude, longitude, speed and everything gets loaded wrong. I can´t realize on what I´m doing wrong. Thank you very much!! Regards!!
  5. May I ask you Pete, if there is a way to store variables such as speed, altitude, longitude, latitude.... And then introduce them into FS in case of crash. Just something like AutoSave? Regards!
  6. Basically FS doesn't work good at all regarding timezones. So basically what I am trying to do is something like FS Real Time. Thanks for the offsets it seems I didn't see them despite being used the search function (I'm getting old :p) Thank you very much Pete!
  7. Hello: My name´s John McKen, I live in Asheville, NC, USA. I´ve been a C# & C++ programmer for serveral years, and used FSUIPC succesfully in a cuple proyects too. However now I´m facing something that is driving me crazy, I am creating a programm that detects where you´re flying and the timezone and then it should introduce the hour(time) into FSX/P3D via FSUIPC. But I could not find any variable to do that. Kind Regards! And congratulations to Pete for this awesome "programm".
×
×
  • 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.