Help with FSX offsets needed

This is the place where we can all meet and speak about whatever is on the mind.
new reply
Tomas Linnet
Senior Master Sergeant
Posts: 2286
Joined: 05 Nov 2013, 10:48
Location: Oksboel, Denmark

Help with FSX offsets needed

Post by Tomas Linnet »

Hi

I'm(as always) fooling around with setting up some control via FSUIPC and LINDA. As I would like to use a toggle switch for "fasten seat belts" in the Connie I found the FSX offset for this function. The function 341D has 1=ON and 0=OFF, but somehow this offset interferes with the 341E offset, which is for the Hydraulic switches. At least now I know why I lost hydraulic pressure on final approach the other day...

this is from my LINDA actions file:

function Seat_Belt_sign_ON ()
ipc.writeUW(0x341D, 1)
end

function Seat_Belt_sign_OFF ()
ipc.writeUW(0x341D, 0)
end

Any ideas how i can fix this? The ON/OFF function works with this setup, only problem is the hydraulic switches goes to "OFF" if the are "ON" when I turn the "Fasten Seat Belt" sign ON or OFF.
I'm confused.... :?: :?
Kind Regards
Tomas

Sim: FSX SE
Accu-Sim aircraft in my hangar:
C172, C182, P51 Civ, P51 Mil, B17, Spitfire, P47, B377 COTS,
J3 Cub, T6, Connie, P-40, V35B
A2A Accu-Sim Avro Lancaster Loading:............0.000003% complete, please wait.

Gypsy Baron
A2A Master Mechanic
Posts: 3396
Joined: 02 Aug 2008, 17:04
Location: San Francisco

Re: Help with FSX offsets needed

Post by Gypsy Baron »

The Linda statement is writing a WORD, 16-bits. The Offset you want to control is a BYTE, 8-bits.

The statements above are working on the WORD beginnings at 0x341D, which includes 0x341E

You should be using:

function Seat_Belt_sign_ON ()
ipc.writeUB(0x341D, 1)
end

function Seat_Belt_sign_OFF ()
ipc.writeUB(0x341D, 0)
end

Paul

Image

Tomas Linnet
Senior Master Sergeant
Posts: 2286
Joined: 05 Nov 2013, 10:48
Location: Oksboel, Denmark

Re: Help with FSX offsets needed

Post by Tomas Linnet »

Thank you Paul

That makes sense, I found the "writeUW" somewhere in another LINDA profile and had some success using it. I used it for the No Smoking as well, that did not interfere with anything. #gettingsmartereveryday
Kind Regards
Tomas

Sim: FSX SE
Accu-Sim aircraft in my hangar:
C172, C182, P51 Civ, P51 Mil, B17, Spitfire, P47, B377 COTS,
J3 Cub, T6, Connie, P-40, V35B
A2A Accu-Sim Avro Lancaster Loading:............0.000003% complete, please wait.

Gypsy Baron
A2A Master Mechanic
Posts: 3396
Joined: 02 Aug 2008, 17:04
Location: San Francisco

Re: Help with FSX offsets needed

Post by Gypsy Baron »

Tomas Linnet wrote:Thank you Paul

That makes sense, I found the "writeUW" somewhere in another LINDA profile and had some success using it. I used it for the No Smoking as well, that did not interfere with anything. #gettingsmartereveryday

You can always check the "FSUIPC4 Offsets Status.pdf" in your FSX Moduules\FSUIPC Documents folder
for the number of byites used for each set of controls. The 2nd column from the left next to the OFFSET.

That will tell you if you should use signed or unsigned Byte, Word, Double Word, etc, when reading
and writing to a particular offset.

Paul

Image

Tomas Linnet
Senior Master Sergeant
Posts: 2286
Joined: 05 Nov 2013, 10:48
Location: Oksboel, Denmark

Re: Help with FSX offsets needed

Post by Tomas Linnet »

Hi Paul

Thanks for the help!
Kind Regards
Tomas

Sim: FSX SE
Accu-Sim aircraft in my hangar:
C172, C182, P51 Civ, P51 Mil, B17, Spitfire, P47, B377 COTS,
J3 Cub, T6, Connie, P-40, V35B
A2A Accu-Sim Avro Lancaster Loading:............0.000003% complete, please wait.

Gypsy Baron
A2A Master Mechanic
Posts: 3396
Joined: 02 Aug 2008, 17:04
Location: San Francisco

Re: Help with FSX offsets needed

Post by Gypsy Baron »

Tomas Linnet wrote:Hi Paul

Thanks for the help!
You're welcome, as always.

Paul

new reply

Return to “Pilot's Lounge”

Who is online

Users browsing this forum: Google [Bot], Skycat and 107 guests