Skip to content

Commit

Permalink
daemon, RCSwitch: set high priority scheduling
Browse files Browse the repository at this point in the history
decrease PulseLength a bit, since scheduling improved
  • Loading branch information
xkonni committed Nov 25, 2012
1 parent d388fc2 commit 3772f00
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion daemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
3 changes: 2 additions & 1 deletion send.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 3772f00

Please sign in to comment.