use LED_C gps signal indicator

master
Eggert Jung 6 years ago
parent d3af329ec6
commit 63fe6ab10a

@ -219,7 +219,6 @@ void set_PWM_duty(int dutycycle){
ISR (TIMER1_OVF_vect) // Timer1 ISR
{
//PORTD ^=TUBE_LED;
PORTB ^=STATUS_LED_C;
TCNT1 = 63974; //63974; // for 1 sec at 16 MHz
animationtimer ++;
if(animationtimer > 10){
@ -257,14 +256,17 @@ ISR(USART0_RX_vect)
async_input_buffer[async_buffer_pointer]=data;
async_buffer_pointer++;
}
else if(async_buffer_pointer>0){
else if(async_buffer_pointer > 0){
async_input_buffer[async_buffer_pointer] = 0; // Null terminate string
async_buffer_pointer=0;
PORTB ^=STATUS_LED_C;
uint8_t test[3];
if(!parse_nmea_gps(async_input_buffer, test)){
printf("parse: %x %x %x\n\r", test[2], test[1], test[0]);
DS3231_write(test);
uint8_t bcd_time[3];
/* write to RTC if time is valid */
if(!parse_nmea_gps(async_input_buffer, bcd_time)){
DS3231_write(bcd_time);
PORTB |= STATUS_LED_C;
} else {
PORTB &= ~STATUS_LED_C;
}
}
}

Loading…
Cancel
Save