Jump to content
The simFlight Network Forums

mdomig

Members
  • Posts

    2
  • Joined

  • Last visited

About mdomig

  • Birthday 01/01/1970

Contact Methods

  • Website URL
    http://

mdomig's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi Pete Sorry. Late hours and too much coffee don't mix. For some reason, after setting the weather I have been reading the new timestamp from Area 0 (weather at aircraft) instead of Area 3 (weather writing). That and a wee little nasty compiler quirk was causing my problems. After a few fixes it all works smoothly, now that I understand the way FSUIPC interacts with my program. The crashes: I've managed to crash FSUIPC, which isn't too hard. Just do a FSUIPC_Write, process() it and immediately after that a second FSUIPC_Write. The result is a log file getting bigger and bigger very fast, an inoperative Program <-> FSUIPC communication link and FS moving like slow molasses. After some time FS crashes on it's own, or, if it doesn't like to, after closing it. This is probably nothing new, after all this behaviour is described in the documentation. At least I remember having read something like that. However, on two occasions I am unable to reproduce, FS crashed after it received weather information via FSUIPC and I opened the weather dialog in FS. Might have something to do with incorrect/impossible weather settings, but that's just a guess. I'll tell you if it happens again and I am able to reproduce it. Thank you very much Martin
  2. Hello Pete I'm playing around a little bit with FSUIPC and want to set the weather using the new FS2004 interface. However, I have troubles understanding the documentation and the general procedure to set weather. Here is what I do, pseudocode: Weather.SetAllToZero; Weather.ICAO = 'GLOB'; Weather.Command = NW_DYNAMICS; FSUIPC_Write(Weather, 0xC800); Weather.Command = NW_CLEAR; FSUIPC_Write(Weather, 0xC800); FSUIPC_Process; sleep(2000); So far so good, the Weather is reset every time i do this. After that: Weather.MakeItRain; Weather.ICAO = 'GLOB'; Weather.Command = NW_SET_PENDING; FSUIPC_Write(Weather, 0xC800); FSUIPC_Process; sleep(for_ages, see below); Weather.Command = NW_ACTIVATE; FSUIPC_Write(Weather, 0xc800); FSUIPC_Process; When executing my program step by step everything is just fine. I could manage to get it running after adding a ton of sleep()'s, without them I usually crash FSUIPC and FS. It definitely is a timing problem. The documentation writes: I take it I have to wait for a new timestamp when using NW_SET_PENDING too. But: Which Timestamp? I know there is a Timestamp in the Weather structure, but I don't know when or where to read it, and what to compare it to. That timestamp-thingie seems to be a common concept in FSUPC, thus I feel a little stupid because I just don't get it. Help me, please!
×
×
  • 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.