workshop nik: small fix

This commit is contained in:
schneider 2011-08-13 16:15:43 +02:00
parent c974cfc072
commit d9761c9d64
1 changed files with 18 additions and 18 deletions

View File

@ -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();
}
}
}