Reading / Writing to bitArray

Announcements, general discussion
Post Reply
moritus
Posts: 4
Joined: 12 Feb 2011, 18:13

Reading / Writing to bitArray

Post by moritus » 27 Apr 2011, 00:04

Hi,

I would like to know if we can Read/write to bit array( Lights (fsuipc H0D0C))... I want to control every single switch of the lights...

Thanks

admin
Site Admin
Posts: 735
Joined: 01 Nov 2010, 13:00
Location: Prague, Czech republic
Contact:

Re: Reading / Writing to bitArray

Post by admin » 27 Apr 2011, 09:01

I didn't check, but my first idea is: can't you prepare whole value in script and write complete byte?
Or (if you toggle lights not only by HIDMacros) read the value, mask bit what you want to change and write complete byte.
Petr Medek
LUAmacros author

moritus
Posts: 4
Joined: 12 Feb 2011, 18:13

Re: Reading / Writing to bitArray

Post by moritus » 28 Apr 2011, 21:42

how did you read/write the biutarray can you give me an short example?

moritus
Posts: 4
Joined: 12 Feb 2011, 18:13

Re: Reading / Writing to bitArray

Post by moritus » 07 May 2011, 03:25

Hi,

I found the way to change to 1 only with bit
ex taxi light
HIDMacros.SetFSUIPCint &H0D0C,1,2^3

but now i need help to put it back to 0

any idea??

Post Reply