]> Johnzone git - FakeRadio.git/commitdiff
further tweaking of delays master
authorJohn Janus <mail@johnzone.org>
Fri, 6 Oct 2017 22:17:14 +0000 (00:17 +0200)
committerJohn Janus <mail@johnzone.org>
Fri, 6 Oct 2017 22:17:14 +0000 (00:17 +0200)
simple_try.c

index 617f7ff0f04802f7778708bc2a1081cd1791405b..5aba7c292d3da6f29f9febbdc582bc89b91b0730 100644 (file)
@@ -19,8 +19,8 @@
 #define INTROBTN 13
 #define HORNBTN 11
 
 #define INTROBTN 13
 #define HORNBTN 11
 
-#define UNPRELL 250
-#define LOOPDELAY 600
+#define UNPRELL 150
+#define LOOPDELAY 300
 
 volatile bool running = true;
 static volatile bool pwrOn = false;
 
 volatile bool running = true;
 static volatile bool pwrOn = false;
@@ -130,11 +130,11 @@ int main(void) {
     pullUpDnControl(CHNL2BTN, PUD_UP);
     pullUpDnControl(INTROBTN, PUD_UP);
     pullUpDnControl(HORNBTN, PUD_UP);
     pullUpDnControl(CHNL2BTN, PUD_UP);
     pullUpDnControl(INTROBTN, PUD_UP);
     pullUpDnControl(HORNBTN, PUD_UP);
-    if (wiringPiISR(PWRBTN, INT_EDGE_RISING, pwrBtn)) printf("failed to initialize pwrBtn\n");
-    if (wiringPiISR(CHNL1BTN, INT_EDGE_RISING, chnl1Btn)) printf("failed to initialize chnl1Btn\n");
-    if (wiringPiISR(CHNL2BTN, INT_EDGE_RISING, chnl2Btn)) printf("failed to initialize chnl2Btn\n");
-    if (wiringPiISR(INTROBTN, INT_EDGE_RISING, introBtn)) printf("failed to initialize introBtn\n");
-    if (wiringPiISR(HORNBTN, INT_EDGE_RISING, hornBtn)) printf("failed to initialize hornBtn\n");
+    if (wiringPiISR(PWRBTN, INT_EDGE_FALLING, pwrBtn)) printf("failed to initialize pwrBtn\n");
+    if (wiringPiISR(CHNL1BTN, INT_EDGE_FALLING, chnl1Btn)) printf("failed to initialize chnl1Btn\n");
+    if (wiringPiISR(CHNL2BTN, INT_EDGE_FALLING, chnl2Btn)) printf("failed to initialize chnl2Btn\n");
+    if (wiringPiISR(INTROBTN, INT_EDGE_FALLING, introBtn)) printf("failed to initialize introBtn\n");
+    if (wiringPiISR(HORNBTN, INT_EDGE_FALLING, hornBtn)) printf("failed to initialize hornBtn\n");
     
     printf("Set LED pins to output\n");
     pinMode(PWRLED, OUTPUT);
     
     printf("Set LED pins to output\n");
     pinMode(PWRLED, OUTPUT);