From 24843a344d1930119104485f3244b528355b4aa1 Mon Sep 17 00:00:00 2001 From: John Janus Date: Sat, 7 Oct 2017 00:17:14 +0200 Subject: [PATCH] further tweaking of delays --- simple_try.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/simple_try.c b/simple_try.c index 617f7ff..5aba7c2 100644 --- a/simple_try.c +++ b/simple_try.c @@ -19,8 +19,8 @@ #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; @@ -130,11 +130,11 @@ int main(void) { 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); -- 2.47.0