Merge branch 'master' of github.com:c3d2/pentabug

This commit is contained in:
Thammi 2012-10-12 02:20:23 +02:00
commit f130bee7be
2 changed files with 3 additions and 9 deletions

View File

@ -105,21 +105,14 @@ ISR(TIMER0_COMPA_vect,ISR_NOBLOCK)
osc1 += pgm_read_word(&freq_table[ pgm_read_byte(&music_data[1][row])]);
if (++sample == speedtime ) {
sample = 0;
if (speedtime > 600) speedtime -= 4;
if (++row == SONG_LENGTH) {
row = 0;
if (speedtime <= 600) speedtime = 3000;
}
if (row&4){
led_on(LED_R);
led_off(LED_L);
}else{
led_on(LED_L);
led_off(LED_R);
}
led_on(row&4 ? LED_R : LED_L);
led_off(row&4 ? LED_L : LED_R);
}
if (osc0 >= 0x8000) PORTB |= (1 << PORTB2);
else PORTB &= ~(1<< PORTB2);
if (osc1 >= 0xc000) PORTC |= (1 << PORTC5);

View File

@ -59,6 +59,7 @@ void do_powerDown(void)
mode_uninitialized = false;
pwdn_state = 0;
timer_set(&mytimer, 5);
set_motor(MOTOR_OFF);
ledRon = true;
};
if (timer_expired(&mytimer)) {