Skip to content

Commit

Permalink
Merge pull request #1 from mariomoureperez/master
Browse files Browse the repository at this point in the history
S7 could not retrieve the 6th bit of a byte
  • Loading branch information
djera committed Sep 14, 2017
2 parents c1d63ec + 1f57061 commit 41fee76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/com/sourceforge/snap7/moka7/S7.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public static boolean GetBitAt(byte[] Buffer, int Pos, int Bit)
int Value = Buffer[Pos] & 0x0FF;
byte[] Mask = {
(byte)0x01,(byte)0x02,(byte)0x04,(byte)0x08,
(byte)0x10,(byte)0x10,(byte)0x40,(byte)0x80
(byte)0x10,(byte)0x20,(byte)0x40,(byte)0x80
};
if (Bit<0) Bit=0;
if (Bit>7) Bit=7;
Expand Down

0 comments on commit 41fee76

Please sign in to comment.