From d9761c9d64e266c60ca55585a9f116ec05039526 Mon Sep 17 00:00:00 2001 From: schneider Date: Sat, 13 Aug 2011 16:15:43 +0200 Subject: [PATCH] workshop nik: small fix --- firmware/l0dable/nick_work.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/firmware/l0dable/nick_work.c b/firmware/l0dable/nick_work.c index b0a984e..32a209e 100644 --- a/firmware/l0dable/nick_work.c +++ b/firmware/l0dable/nick_work.c @@ -215,27 +215,27 @@ static void tick_lilakit(void) if (lk_ticks % 10 == 0) { lkReadI2C(); - } - if ((lk_in0 & 0x02) == 0 && lk_button_mode == 0) { - melody_index = 0; - melody_timeout = 0; + if ((lk_in0 & 0x02) == 0 && lk_button_mode == 0) { + melody_index = 0; + melody_timeout = 0; - lk_ticks = 0; - lk_button_mode = 1; - - lk_ls1 = 0; - lk_ls1 |= LK_I2C_LS_ON << 4; - lk_ls1 |= LK_I2C_LS_ON << 6; - lkUpdateI2C(); - } + lk_ticks = 0; + lk_button_mode = 1; + + lk_ls1 = 0; + lk_ls1 |= LK_I2C_LS_ON << 4; + lk_ls1 |= LK_I2C_LS_ON << 6; + lkUpdateI2C(); + } - if (lk_button_mode == 1 && lk_ticks > 0xFF) { - lk_button_mode = 0; - lk_ls1 = 0; - lk_ls1 |= LK_I2C_LS_PWM0 << 4; - lk_ls1 |= LK_I2C_LS_PWM1 << 6; - lkUpdateI2C(); + if (lk_button_mode == 1 && lk_ticks > 0xFF) { + lk_button_mode = 0; + lk_ls1 = 0; + lk_ls1 |= LK_I2C_LS_PWM0 << 4; + lk_ls1 |= LK_I2C_LS_PWM1 << 6; + lkUpdateI2C(); + } } }