samples: reel board: correct timeout condition

After this fix each LED will blink 5 times. Previously
LED_0 has been blining 6 times while others 5 times.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
This commit is contained in:
Jakub Rzeszutko 2018-12-20 15:18:26 +01:00 committed by Johan Hedberg
parent b75a05cae6
commit e8a77808c0
1 changed files with 1 additions and 1 deletions

View File

@ -519,7 +519,7 @@ static void led_timeout(struct k_work *work)
}
/* Stop after 5 iterations */
if (led_cntr > (ARRAY_SIZE(leds) * 5)) {
if (led_cntr >= (ARRAY_SIZE(leds) * 5)) {
led_cntr = 0;
return;
}