From 3f9aaf5c71f2ab59035393e4f1078a18fa7634d9 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 18 Jun 2023 18:12:34 -0500 Subject: [PATCH] beep --- components/ratgdo/ratgdo.cpp | 4 +++- components/ratgdo/ratgdo.h | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/components/ratgdo/ratgdo.cpp b/components/ratgdo/ratgdo.cpp index 9eeeac3..90c65b5 100644 --- a/components/ratgdo/ratgdo.cpp +++ b/components/ratgdo/ratgdo.cpp @@ -452,7 +452,9 @@ namespace ratgdo { void RATGDOComponent::closeBeep() { - sendCommandAndSaveCounter(Command.CLOSE_BEEP); + transmit(Command.DOOR_BEEP1); + delay(40); + sendCommandAndSaveCounter(Command.DOOR_BEEP2); } // Lock functions diff --git a/components/ratgdo/ratgdo.h b/components/ratgdo/ratgdo.h index 3f28773..d58e40c 100644 --- a/components/ratgdo/ratgdo.h +++ b/components/ratgdo/ratgdo.h @@ -53,7 +53,8 @@ namespace ratgdo { cmd DOOR2; cmd LIGHT; cmd LOCK; - cmd CLOSE_BEEP; + cmd DOOR_BEEP1; + cmd DOOR_BEEP2; } cmds; const cmds Command = { @@ -67,7 +68,8 @@ namespace ratgdo { .DOOR2 = (cmd) { 0x200000000, 0x01009280 }, .LIGHT = (cmd) { 0x200000000, 0x00009281 }, .LOCK = (cmd) { 0x0100000000, 0x0000728c }, - .CLOSE_BEEP = (cmd) { 0x400000000, 0x0000010a }, + .DOOR_BEEP1 = (cmd) { 0, 0x000b11a1 }, + .DOOR_BEEP2 = (cmd) { 0, 0x000c61a1 }, // command: cmd=040a nibble=01 byte1=01 byte2=e0 fixed=c4a3d2c00a data=e001010a // time = (byte1 << 8) | byte2; // .AUTO_CLOSE = (cmd) { 0x0400000000, 0x0000010a },