summaryrefslogtreecommitdiffstats
path: root/tv/5pkgs/rpi/433Utils/RPi_utils.codesend.codestring.patch
blob: 447e42f1d66ec932b699ee0ff44a5e84049da2c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--- a/RPi_utils/codesend.cpp
+++ b/RPi_utils/codesend.cpp
@@ -40,18 +40,18 @@ int main(int argc, char *argv[]) {
     }
 
     // Change protocol and pulse length accroding to parameters
-    int code = atoi(argv[1]);
+    const char *code = argv[1];
     if (argc >= 3) protocol = atoi(argv[2]);
     if (argc >= 4) pulseLength = atoi(argv[3]);
     
     if (wiringPiSetup () == -1) return 1;
-    printf("sending code[%i]\n", code);
+    printf("sending code[%s]\n", code);
     RCSwitch mySwitch = RCSwitch();
     if (protocol != 0) mySwitch.setProtocol(protocol);
     if (pulseLength != 0) mySwitch.setPulseLength(pulseLength);
     mySwitch.enableTransmit(PIN);
     
-    mySwitch.send(code, 24);
+    mySwitch.send(code);
     
     return 0;