Skip to content

Commit

Permalink
minor: Clean up Vauno-EN8822C
Browse files Browse the repository at this point in the history
  • Loading branch information
zuckschwerdt committed Jan 22, 2023
1 parent 822ed0c commit e77e8fb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion conf/rtl_433.example.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
21 changes: 11 additions & 10 deletions src/devices/vauno_en8822c.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @file
Vauno EN8822C sensor on 433.92Mhz.
Vauno EN8822C sensor on 433.92MHz.
Copyright (C) 2022 Jamie Barron <gumbald@gmail.com>
Expand All @@ -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
Expand All @@ -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) {
Expand Down Expand Up @@ -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,
};

0 comments on commit e77e8fb

Please sign in to comment.