Skip to content

Commit

Permalink
ble: fix SVT-15 tariff check
Browse files Browse the repository at this point in the history
  • Loading branch information
vooon committed Sep 14, 2021
1 parent 26925e9 commit 021a5df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ble.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ class ElehantMeterAdvertismentB0 {

// index for SVD-15: 0; for SVT-15 - 1 or 2.
tariff_idx = 0;
if (memcmp(esp_addr, "\xb0\x03\x02", 3) != 0)
if (memcmp(esp_addr, "\xb0\x03\x02", 3) == 0)
tariff_idx = 1;
if (memcmp(esp_addr, "\xb0\x04\x02", 3) != 0)
else if (memcmp(esp_addr, "\xb0\x04\x02", 3) == 0)
tariff_idx = 2;

// -- parse --
Expand Down

0 comments on commit 021a5df

Please sign in to comment.