From: John Janus Date: Fri, 6 Oct 2017 22:17:14 +0000 (+0200) Subject: further tweaking of delays X-Git-Url: https://git.johnzone.org/?a=commitdiff_plain;ds=inline;p=FakeRadio.git further tweaking of delays --- 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);