Skip to content

Commit

Permalink
added -39 to reply hack
Browse files Browse the repository at this point in the history
  • Loading branch information
beep-projects committed Jun 4, 2024
1 parent 40fd013 commit 6bc32a5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ private void sendDataReply(int index) {
reply[13] = (byte) (m >> 8);
// Generate reply counter with offset:
int n = (((reply[7] & 0xFF) << 8) + (reply[6] & 0xFF) + COUNTER_OFFSET_REPLY) & 0xFFFF;
if ((reply[5] + reply[4]) == 57 || (reply[5] + reply[4]) == 313 || (reply[5] + reply[4]) == 473) {
if ((reply[5] + reply[4]) == 57 || (reply[5] + reply[4]) == 313 || (reply[5] + reply[4]) == -39) {
// TODO this is just a hack to support a specific unit.
// Find out why this is needed and make it generic
n = (((reply[7] & 0xFF) << 8) + (reply[6] & 0xFF) + COUNTER_OFFSET_REPLY_2) & 0xFFFF;
Expand Down

0 comments on commit 6bc32a5

Please sign in to comment.