X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?p=bike-lights.git;a=blobdiff_plain;f=firmware%2Fbuttons.c;h=4f7a5ceb184f2d804c50ac76c74e547ca6bbd556;hp=d839e8dcdfcba73cf785cc065eebbd3e91c4a652;hb=b2a7818a12aab1915c19ae65af12b2f16c2f4da6;hpb=027218898e542b66566914ce787f4a0821b5f908 diff --git a/firmware/buttons.c b/firmware/buttons.c index d839e8d..4f7a5ce 100644 --- a/firmware/buttons.c +++ b/firmware/buttons.c @@ -52,7 +52,9 @@ union { * mode. */ static unsigned char user_params[N_USER_PARAMS] = { 0, 0, 0 }; -static unsigned char user_params_max[N_USER_PARAMS] = { 3, 2, 2 }; +static unsigned char user_params_max[N_USER_PARAMS] = { + N_AMBIENT_ZONES+1, 2, 2 +}; static unsigned char user_params_state = 0; /* @@ -233,7 +235,7 @@ static void handle_brake(unsigned char cur, unsigned char prev) // --- no change --- duration = jiffies - button_start[2]; - if (duration <= 3) + if (duration == 0) // at least two jiffies return; if (cur) {