diff --git a/daemon.cpp b/daemon.cpp index b9ead08..b694a28 100644 --- a/daemon.cpp +++ b/daemon.cpp @@ -42,11 +42,13 @@ RCSwitch mySwitch; int main(int argc, char* argv[]) { /** * Setup wiringPi and RCSwitch + * set high priority scheduling */ if (wiringPiSetup () == -1) return 1; + piHiPri(20); mySwitch = RCSwitch(); - mySwitch.setPulseLength(270); + mySwitch.setPulseLength(300); usleep(50000); mySwitch.enableTransmit(0); diff --git a/send.cpp b/send.cpp index df56768..f4806e6 100644 --- a/send.cpp +++ b/send.cpp @@ -20,9 +20,10 @@ int main(int argc, char *argv[]) { int command = atoi(argv[3]); if (wiringPiSetup () == -1) return 1; + piHiPri(20); printf("sending systemCode[%s] unitCode[%i] command[%i]\n", systemCode, unitCode, command); RCSwitch mySwitch = RCSwitch(); - mySwitch.setPulseLength(270); + mySwitch.setPulseLength(300); mySwitch.enableTransmit(PIN); switch(command) {