From bf301b29054325576ef2796db0a4b5957990eddb Mon Sep 17 00:00:00 2001 From: "root@rpi" Date: Sat, 21 Jan 2023 14:27:17 +0100 Subject: [PATCH] Addressed PR review feedback --- README.md | 1 + conf/rtl_433.example.conf | 1 + src/devices/tfa_14_1504_v2.c | 6 ++---- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7f4a1d66ca..8ea0abf90e 100644 --- a/README.md +++ b/README.md @@ -310,6 +310,7 @@ See [CONTRIBUTING.md](./docs/CONTRIBUTING.md). [225] TyreGuard 400 TPMS [226] Kia TPMS (-s 1M) [227] SRSmith Pool Light Remote Control SRS-2C-TX (-f 915000000) + [228] TFA Dostmann 14.1504.V2 Radio-controlled grill and meat thermometer * Disabled by default, use -R n or a conf file to enable diff --git a/conf/rtl_433.example.conf b/conf/rtl_433.example.conf index 2c98a4a2c9..245ffab4fb 100644 --- a/conf/rtl_433.example.conf +++ b/conf/rtl_433.example.conf @@ -449,6 +449,7 @@ stop_after_successful_events false protocol 225 # TyreGuard 400 TPMS protocol 226 # Kia TPMS (-s 1M) protocol 227 # SRSmith Pool Light Remote Control SRS-2C-TX (-f 915000000) + protocol 228 # TFA Dostmann 14.1504.V2 Radio-controlled grill and meat thermometer ## Flex devices (command line option "-X") diff --git a/src/devices/tfa_14_1504_v2.c b/src/devices/tfa_14_1504_v2.c index a98ed09299..9a71162059 100644 --- a/src/devices/tfa_14_1504_v2.c +++ b/src/devices/tfa_14_1504_v2.c @@ -52,9 +52,7 @@ Example payloads (excluding preamble): static int tfa_14_1504_v2_callback(r_device *decoder, bitbuffer_t *bitbuffer) { uint8_t const preamble[] = { - 0xaa, - 0xaa, - 0x5c, + 0xaa, 0xaa, 0x5c, }; if (bitbuffer->num_rows != 1) { @@ -105,7 +103,7 @@ static int tfa_14_1504_v2_callback(r_device *decoder, bitbuffer_t *bitbuffer) // we discard the last 2 bits as those are always zero uint16_t raw_temp_c = ((data[0] & 0xf) << 6) + (data[1] >> 2); unsigned is_probe_connected = (raw_temp_c != 0x1c0); - double temp_c = ((int)raw_temp_c) - 532; + float temp_c = ((int)raw_temp_c) - 532; /* clang-format off */ data_t *output = data_make(