mirror of
https://github.com/merbanan/rtl_433.git
synced 2026-05-19 15:25:30 -04:00
Add sensor Chuango (initial)
This commit is contained in:
@@ -31,7 +31,8 @@
|
||||
DECL(gt_wt_02) \
|
||||
DECL(danfoss_CFR) \
|
||||
DECL(ec3k) \
|
||||
DECL(valeo)
|
||||
DECL(valeo) \
|
||||
DECL(chuango)
|
||||
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -48,6 +48,7 @@ add_executable(rtl_433
|
||||
devices/danfoss.c
|
||||
devices/ec3k.c
|
||||
devices/valeo.c
|
||||
devices/chuango.c
|
||||
)
|
||||
|
||||
target_link_libraries(rtl_433
|
||||
|
||||
40
src/devices/chuango.c
Normal file
40
src/devices/chuango.c
Normal file
@@ -0,0 +1,40 @@
|
||||
/* Chuango Security Technology Corporation
|
||||
*
|
||||
* PIR-900 PIR sensor
|
||||
* DWC-100 Door sensor
|
||||
*
|
||||
* Copyright (C) 2015 Tommy Vestermark
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
#include "rtl_433.h"
|
||||
|
||||
|
||||
static int chuango_callback(bitbuffer_t *bitbuffer) {
|
||||
bitrow_t *bb = bitbuffer->bb;
|
||||
|
||||
// Validate package
|
||||
unsigned bits = bitbuffer->bits_per_row[0];
|
||||
if ((bits == 25)
|
||||
// && (bb[0][1] == 0xe8) && (bb[0][2] == 0xe8) // Check a couple of preambles
|
||||
) {
|
||||
fprintf(stdout, "Chuango Security Sensor\n");
|
||||
bitbuffer_print(bitbuffer);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
r_device chuango = {
|
||||
.name = "Chuango Security Sensor",
|
||||
.modulation = OOK_PULSE_PWM_RAW,
|
||||
.short_limit = 284, // Pulse Long 426, Short 142
|
||||
.long_limit = 500, // Gaps Short 142, Long 424
|
||||
.reset_limit = 500, // Intermessage Gap 4298 (individually for now)
|
||||
.json_callback = &chuango_callback,
|
||||
.disabled = 0,
|
||||
.demod_arg = 0, // Do not remove startbit
|
||||
};
|
||||
Reference in New Issue
Block a user