henri
03-04-2010, 06:21 AM
Hi,
I hope that there is some that use realbasic and can help me out.
I'm trying 2 use the offset &H0D0C,2, lights.
And seems that i'm doing something wrong with the bit's and bytes. the following works.
if FSUIPC_Write (&H0D0C,2,lights,dwresult) then
end if
lights.Byte(0)=1 // nav
lights.Byte(1)=2 // beacon
lights.Byte(2)=4 // landing
lights.Byte(3)=8 // taxi
lights.Byte(4)=16 // strobe
lights.Byte(7)=128 // wing
lights.Byte(8)=256 // logo
lights.Byte(9)=512 // cabine
if kit.getInputState(1)= true then
lights.Byte(0)=128
elseif kit.getInputState(1) = false then
lights.Byte(0)=0
end if
but with the (lights.Byte(0)=128)i can't use an other bit ex: (lights.Byte(0)=8)that should be lights.Byte(3)=8
but when i use
if kit.getInputState(1)= true then
lights.Byte(3)=8
elseif kit.getInputState(1) = false then
lights.Byte(3)=0
end if
or
if kit.getInputState(1)= true then
lights.Byte(3)=1
elseif kit.getInputState(1) = false then
lights.Byte(3)=0
end if
nothing happens
Hope some can help me out,
regards,
Henri
:(
I hope that there is some that use realbasic and can help me out.
I'm trying 2 use the offset &H0D0C,2, lights.
And seems that i'm doing something wrong with the bit's and bytes. the following works.
if FSUIPC_Write (&H0D0C,2,lights,dwresult) then
end if
lights.Byte(0)=1 // nav
lights.Byte(1)=2 // beacon
lights.Byte(2)=4 // landing
lights.Byte(3)=8 // taxi
lights.Byte(4)=16 // strobe
lights.Byte(7)=128 // wing
lights.Byte(8)=256 // logo
lights.Byte(9)=512 // cabine
if kit.getInputState(1)= true then
lights.Byte(0)=128
elseif kit.getInputState(1) = false then
lights.Byte(0)=0
end if
but with the (lights.Byte(0)=128)i can't use an other bit ex: (lights.Byte(0)=8)that should be lights.Byte(3)=8
but when i use
if kit.getInputState(1)= true then
lights.Byte(3)=8
elseif kit.getInputState(1) = false then
lights.Byte(3)=0
end if
or
if kit.getInputState(1)= true then
lights.Byte(3)=1
elseif kit.getInputState(1) = false then
lights.Byte(3)=0
end if
nothing happens
Hope some can help me out,
regards,
Henri
:(