]> git.droids-corp.org - protos/rc_servos.git/commitdiff
force "rising" variable to be 0 or 1
authorOlivier Matz <zer0@droids-corp.org>
Tue, 8 Oct 2013 22:01:15 +0000 (00:01 +0200)
committerOlivier Matz <zer0@droids-corp.org>
Tue, 8 Oct 2013 22:01:15 +0000 (00:01 +0200)
main.c

diff --git a/main.c b/main.c
index 923a8ea1bcd4ce553b2b089644768e77294f0b6c..67661d628f230b553af226c018c803eba7c54339 100644 (file)
--- a/main.c
+++ b/main.c
@@ -177,7 +177,7 @@ static void poll_input_capture(void)
        icp = ICR1;
        sei();
 
-       rising = TCCR1B & _BV(ICES1);
+       rising = !!(TCCR1B & _BV(ICES1));
 
        /* change the edge type */
        TCCR1B ^= _BV(ICES1);