Cockpitbuilders.com

FSUIPC (Peter Dawson) Unnoficial => FSUIPC V4.X (FSX) => Topic started by: Trevor Hale on October 14, 2014, 03:58:45 AM

Title: FSUIPC AND START SWITCHES
Post by: Trevor Hale on October 14, 2014, 03:58:45 AM
Hey Guys, Got some Strange happenings, and I am wondering if someone can test something for me with the default King Air 350.

OFFSET 0892 Value = 1  ENGINE START

What happens though, is when I release the switch and the engine is already running

OFFSET 0892 Value = 0

The engine quits. 

Am I doing something wrong here, or can someone else help me with this.

Trev
Title: Re: FSUIPC AND START SWITCHES
Post by: TomR on October 14, 2014, 04:19:27 PM
Hi Trev,

if you interface with InterfaceIT make sure Offset 0892 is defined as SmallInt/ S16, that is 2 Byte length equals to short/ int16.
The value for Offset 0892, 2 Byte length is
0 = Starter OFF
1 = Starter ON, jumps automatically back to 0 when engine successfully started
2 = Generator ON
Switching this value when engine is running doesn't shut the engine!
Title: Re: FSUIPC AND START SWITCHES
Post by: Trevor Hale on October 15, 2014, 12:52:02 AM
Thanks bud. I will double check that. I may try releasing the switch and having it switch to GEN if I can't solve this other ways.

I even have Pete stumped. :)


Have a great day
Title: Re: FSUIPC AND START SWITCHES
Post by: Trevor Hale on October 15, 2014, 03:29:51 AM
Mr. R, Once again you have saved my Bacon....

Bud, You Nailed it!  I gather the Host.Send Value command I am writing is sending the value as a 32 bit message.  Thus overwriting x0894 (Combustion Flag) and killing the Engine.  As Pete Says, we must always respect the length, and in this case, clearly I am not.

I can't thank you enough for bringing this to my attention...

I will now walk away in shame :)
Title: Re: FSUIPC AND START SWITCHES
Post by: Bob Reed on October 15, 2014, 03:40:08 AM
So how would the code look to fix this issue? Remember, I am using the same interface!  :P
Title: Re: FSUIPC AND START SWITCHES
Post by: Trevor Hale on October 15, 2014, 04:15:55 AM
Quote from: Bob Reed on October 15, 2014, 03:40:08 AM
So how would the code look to fix this issue? Remember, I am using the same interface!  :P

Going to have to be...  (New Version Software)

Host.SendByte("0892"1,2) For Start
and
Host.SendByte("0892"0,2) For Start off

Host.SendValue Sends a 32bit Length Message, By Utilizing host.SendByte, we can specify the length of 2 (Bits)

Title: Re: FSUIPC AND START SWITCHES
Post by: TomR on October 15, 2014, 02:56:17 PM
Quote from: Trevor Hale on October 15, 2014, 03:29:51 AM
Mr. R, Once again you have saved my Bacon....

Hi Trev,

Mr. R == Thomas Richter (TSR)  :-)

Very nice project you are on !!!
Title: Re: FSUIPC AND START SWITCHES
Post by: Bob Reed on October 15, 2014, 03:24:27 PM
It is good to see you Mr. R....Glad you are here!
Title: Re: FSUIPC AND START SWITCHES
Post by: Trevor Hale on October 16, 2014, 02:39:11 AM
Quote from: TomR on October 15, 2014, 02:56:17 PM
Quote from: Trevor Hale on October 15, 2014, 03:29:51 AM
Mr. R, Once again you have saved my Bacon....

Hi Trev,

Mr. R == Thomas Richter (TSR)  :-)

Very nice project you are on !!!

ha ha ha, funny you said that, It took me a bit to figure it out, until I saw your signature yesterday. I thought you had disappeared because I hadn't seen you around for a very long time.  In fact, its probably been a couple of years since we had chatted.  Actually it was funny because when I was posing over at simflight to Pete, I saw the video of you and Ray flying Pete's sim. I wondered where you may have gotten off to.  Last I heard you were in Ireland and working on your own real sim project with a Lady friend, and then you fell off the earth :)  Glad to see you still crawling around.

And thanks again for your wonderful insight :)  You truly are a pioneer in this hobby. It is great to see you around again.

As for my project....  Thanks for your kind words..  Its pretty neat, but makes me want to beat my head against a wall sometimes LOL. Working with a real aircraft is one heck of a challenge.

Trev