From e77e8fbca21233df32be623fa443645314dbd6c3 Mon Sep 17 00:00:00 2001 From: "Christian W. Zuckschwerdt" Date: Sun, 22 Jan 2023 16:54:42 +0100 Subject: [PATCH] minor: Clean up Vauno-EN8822C --- README.md | 2 +- conf/rtl_433.example.conf | 2 +- src/devices/vauno_en8822c.c | 21 +++++++++++---------- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 155dc4878..050a179f6 100644 --- a/README.md +++ b/README.md @@ -312,7 +312,7 @@ See [CONTRIBUTING.md](./docs/CONTRIBUTING.md). [227] SRSmith Pool Light Remote Control SRS-2C-TX (-f 915M) [228] Neptune R900 flow meters [229]* WEC-2103 temperature/humidity sensor - [230] Vauno EN8822C thermometer/hygrometer + [230] Vauno EN8822C * 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 c20360d51..ef82fc256 100644 --- a/conf/rtl_433.example.conf +++ b/conf/rtl_433.example.conf @@ -451,7 +451,7 @@ stop_after_successful_events false protocol 227 # SRSmith Pool Light Remote Control SRS-2C-TX (-f 915M) protocol 228 # Neptune R900 flow meters # protocol 229 # WEC-2103 temperature/humidity sensor - protocol 230 # Vauno EN8822C thermometer/hygrometer + protocol 230 # Vauno EN8822C ## Flex devices (command line option "-X") diff --git a/src/devices/vauno_en8822c.c b/src/devices/vauno_en8822c.c index b839e0f89..8a1c4c921 100644 --- a/src/devices/vauno_en8822c.c +++ b/src/devices/vauno_en8822c.c @@ -1,5 +1,5 @@ /** @file - Vauno EN8822C sensor on 433.92Mhz. + Vauno EN8822C sensor on 433.92MHz. Copyright (C) 2022 Jamie Barron @@ -9,6 +9,8 @@ (at your option) any later version. */ /** +Vauno EN8822C sensor on 433.92MHz. + Largely the same as Esperanza EWS, s3318p. @sa esperanza_ews.c s3318p.c @@ -31,20 +33,19 @@ Frame structure (42 bits): Sample Data: - ``` [00] {42} af 0f a2 7c 01 c0 : 10101111 00001111 10100010 01111100 00000001 11 - Sensor ID = 175 = 0xaf - Channel = 0 - temp = -93 = 0x111110100010 - TemperatureC = -9.3 - hum = 62% = 0x0111110 - ``` + +- Sensor ID = 175 = 0xaf +- Channel = 0 +- temp = -93 = 0x111110100010 +- TemperatureC = -9.3 +- hum = 62% = 0x0111110 */ #include "decoder.h" -static int vauno_en8822c_callback(r_device *decoder, bitbuffer_t *bitbuffer) +static int vauno_en8822c_decode(r_device *decoder, bitbuffer_t *bitbuffer) { int row = bitbuffer_find_repeated_prefix(bitbuffer, 4, 42); if (row < 0) { @@ -99,6 +100,6 @@ r_device vauno_en8822c = { .long_width = 4000, .gap_limit = 5000, .reset_limit = 9500, - .decode_fn = &vauno_en8822c_callback, + .decode_fn = &vauno_en8822c_decode, .fields = output_fields, };