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