From e20d1aaaba6bccd201ccf0f9980b884a064764e6 Mon Sep 17 00:00:00 2001 From: Travis Goodspeed Date: Sun, 2 Sep 2018 11:56:54 -0400 Subject: [PATCH] New OOK modes in the config template. --- firmware/configtemplate.h | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/firmware/configtemplate.h b/firmware/configtemplate.h index f2c80bb..e16ad43 100644 --- a/firmware/configtemplate.h +++ b/firmware/configtemplate.h @@ -12,12 +12,25 @@ #define RTCCALIBRATE -28 -/* -//Settings for a DC relay, 341us/bit OOK -#define OOKMDMCFG4 0x86 -#define OOKMDMCFG3 0xd9 -#define OOKBUTTONA "\x00\x00\xe8\xe8\xee\x88\xe8\x8e\xe8\x88\xee\xe8\x88\x8e\x80\x00" -#define OOKBUTTONB "\x00\x00\xe8\xe8\xee\x88\xe8\x8e\xe8\x88\xee\xe8\x88\xe8\x80\x00" -#define OOKBUTTONC "\x00\x00\xe8\xe8\xee\x88\xe8\x8e\xe8\x88\xee\xe8\x8e\x88\x80\x00" -#define OOKBUTTOND "\x00\x00\xe8\xe8\xee\x88\xe8\x8e\xe8\x88\xee\xe8\xe8\x88\x80\x00" -*/ +/* This array holds the entries triggered by numbered buttons in the + OOK applet. The first two bytes of each entry at MDMCFG4 and + MDMCFG3 to set the bitrate, followed by the packet to be + transmitted at that rate. See the GoodWatch wiki for details and + sample projects to reverse engineer these settings. + */ + +#define OOKBUTTONS \ + /* Magicfly doorbell first, 200us.*/ \ + "\xf7\x93" "\x00\xe8\xe8\x88\x88\xee\x88\x8e\x88\xee\x8e\x88\xee\x80\x00\x00", \ + /* Settings for the Eco-Worthy Digital Motor Controller, should be + ~430us but ~340 works. */ \ + "\x86\xd9" "\x00\xee\x8e\x8e\x8e\x8e\x8e\x8e\x8e\x88\x88\x88\xee\x80\x00\x00", \ + "\x86\xd9" "\x00\xee\x8e\x8e\x8e\x8e\x8e\x8e\x8e\x88\x88\xee\x88\x80\x00\x00", \ + "\x86\xd9" "\x00\xee\x8e\x8e\x8e\x8e\x8e\x8e\x8e\x88\xee\x88\x88\x80\x00\x00", \ + "\x86\xd9" "\x00\xee\x8e\x8e\x8e\x8e\x8e\x8e\x8e\xee\x88\x88\x88\x80\x00\x00", \ + /* No-name wireless relay controller. ~340us */ \ + "\x86\xd9" "\x00\x00\xe8\xe8\xee\x88\xe8\x8e\xe8\x88\xee\xe8\x88\x8e\x80\x00", \ + "\x86\xd9" "\x00\x00\xe8\xe8\xee\x88\xe8\x8e\xe8\x88\xee\xe8\x88\xe8\x80\x00", \ + "\x86\xd9" "\x00\x00\xe8\xe8\xee\x88\xe8\x8e\xe8\x88\xee\xe8\x8e\x88\x80\x00", \ + "\x86\xd9" "\x00\x00\xe8\xe8\xee\x88\xe8\x8e\xe8\x88\xee\xe8\xe8\x88\x80\x00" +