From 92ea621db67b45225e3ded586dd996e79ce20df0 Mon Sep 17 00:00:00 2001 From: manuel Date: Wed, 3 Mar 2021 12:27:21 +0100 Subject: Update martin --- martin/door/src/hcs200.cpp | 7 ++++++- martin/door/src/main.cpp | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'martin') diff --git a/martin/door/src/hcs200.cpp b/martin/door/src/hcs200.cpp index 661380a..d7e914f 100644 --- a/martin/door/src/hcs200.cpp +++ b/martin/door/src/hcs200.cpp @@ -165,7 +165,12 @@ void HCS200_Keycode::print(Print &stream) stream.print("\n"); } -#define PULSE_WIDTH 440 +// pulse width according to chip datasheet +//#define PULSE_WIDTH 440 + +// pulse width according to rtl_433 implementation +// run width: rtl_433 -R 131 +#define PULSE_WIDTH 370 inline void HCS200_Keycode::send(bool value, std::function setOutput) { diff --git a/martin/door/src/main.cpp b/martin/door/src/main.cpp index 6a6eed3..223180e 100644 --- a/martin/door/src/main.cpp +++ b/martin/door/src/main.cpp @@ -34,6 +34,9 @@ CC1101 radio(D0 /* GDO0 */, D2 /* GDO2 */, D8 /* SS */); #define PIN_HCS200_ENABLE D3 #define PIN_HCS200_DATA D1 //#define HCS200_TEST +#if defined(HCS200_TEST) +#warning HCS200 testmode is enabled! +#endif HCS200 hcs200; const int ping_delay = 60000; -- cgit v1.2.3