From 3772f000185be1b9c0f1d43b0766b339313e35c3 Mon Sep 17 00:00:00 2001 From: xkonni Date: Sun, 25 Nov 2012 17:46:25 +0100 Subject: [PATCH] daemon, RCSwitch: set high priority scheduling decrease PulseLength a bit, since scheduling improved --- daemon.cpp | 4 +++- send.cpp | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) 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) {