Hi Davide,
I've found a little typo on GetBitAt() and SetBitAt() in snap7.net.cs (Ver.: 1.3.0)
Line: byte[] Mask = {0x01,0x02,0x04,0x08,0x10,0x10,0x40,0x80};
Should be: byte[] Mask = {0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80};
Mask for Bit 5 is wrong.
Bye
Hi Pablo, it was already fixed into the bugfix release : http://sourceforge.net/projects/snap7/files/Daily/snap7-bugfix-1.3.0.zip/download
thanks anyway for the report ;)
I'm using last snap7-bugfix-1.3.0 and have found something else:
In: public static void SetBitAt(ref byte[] Buffer, int Pos, int Bit, bool Value)
Why do you use ref for Buffer ?
Log in to post a comment.
Hi Davide,
I've found a little typo on GetBitAt() and SetBitAt() in snap7.net.cs (Ver.: 1.3.0)
Line:
byte[] Mask = {0x01,0x02,0x04,0x08,0x10,0x10,0x40,0x80};
Should be:
byte[] Mask = {0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80};
Mask for Bit 5 is wrong.
Bye
Hi Pablo,
it was already fixed into the bugfix release :
http://sourceforge.net/projects/snap7/files/Daily/snap7-bugfix-1.3.0.zip/download
thanks anyway for the report ;)
I'm using last snap7-bugfix-1.3.0 and have found something else:
In: public static void SetBitAt(ref byte[] Buffer, int Pos, int Bit, bool Value)
Why do you use ref for Buffer ?