From 3c03aa81b1a000ce9762eb156edd9f3f090a7ff0 Mon Sep 17 00:00:00 2001 From: xkonni Date: Sun, 25 Nov 2012 00:20:40 +0100 Subject: [PATCH] RCSwitch: change PulseLength to 270ms --- send.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/send.cpp b/send.cpp index 4206671..df56768 100644 --- a/send.cpp +++ b/send.cpp @@ -22,6 +22,7 @@ int main(int argc, char *argv[]) { if (wiringPiSetup () == -1) return 1; printf("sending systemCode[%s] unitCode[%i] command[%i]\n", systemCode, unitCode, command); RCSwitch mySwitch = RCSwitch(); + mySwitch.setPulseLength(270); mySwitch.enableTransmit(PIN); switch(command) { @@ -31,6 +32,14 @@ int main(int argc, char *argv[]) { case 0: mySwitch.switchOff(systemCode, unitCode); break; + case 2: + // 00001 2 on binary coded + mySwitch.send("010101010001000101010001"); + break; + case 3: + // 00001 2 on as TriState + mySwitch.sendTriState("FFFF0F0FFF0F"); + break; default: printf("command[%i] is unsupported\n", command); return -1;