Skip to content

Commit

Permalink
minor: Fix for Air PM2.5/PM10 with good init value (#2830)
Browse files Browse the repository at this point in the history
  • Loading branch information
ProfBoc75 authored Feb 10, 2024
1 parent 55d5385 commit caf8a7f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/devices/bresser_7in1.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ static int bresser_7in1_decode(r_device *decoder, bitbuffer_t *bitbuffer)
} else if (s_type == SENSOR_TYPE_AIR_PM) {
int pm_2_5 = (msg[10] & 0x0f) * 1000 + (msg[11] >> 4) * 100 + (msg[11] & 0x0f) * 10 + (msg[12] >> 4);
int pm_10 = (msg[12] & 0x0f) * 1000 + (msg[13] >> 4) * 100 + (msg[13] & 0x0f) * 10 + (msg[14] >> 4);
int pm_2_5_init = ((msg[12] >> 4) & 0x0f) == 0x0f;
int pm_10_init = ((msg[14] >> 4) & 0x0f) == 0x0f;
int pm_2_5_init = (msg[10] & 0x0f) == 0x0f; // confirmed by https://github.com/merbanan/rtl_433/issues/2816#issuecomment-1935439318
int pm_10_init = (msg[12] & 0x0f) == 0x0f; // confirmed by https://github.com/merbanan/rtl_433/issues/2816#issuecomment-1935439318

/* clang-format off */
data = data_make(
Expand Down

0 comments on commit caf8a7f

Please sign in to comment.