302,7 → 302,7 |
if(DebugUART == UART0) |
{ |
UART0_Connect_to_MKGPS(); |
TIMER2_Init(); // enbable servo outputs |
TIMER2_Init(); // enbable servo outputs |
fifo_purge(&UART1_rx_fifo); // flush the whole fifo init buffer |
} |
DebugUART = UART1; |
389,7 → 389,6 |
switch(SerialMsg.pData[0]) |
{ |
case UART_FLIGHTCTRL: |
TIMER2_Deinit(); // reduce irq load |
UART2_Init(); // initialize UART2 to FC pins |
fifo_purge(&UART1_rx_fifo); |
DebugUART = UART2; |
403,7 → 402,7 |
break; |
case UART_MKGPS: |
if(FC.MKFlags & MKFLAG_MOTOR_RUN) break; // not if the motors are running |
TIMER2_Deinit(); |
TIMER2_Deinit(); // disable servo outputs to reduce irq load |
UART0_Connect_to_MKGPS(); // connect UART0 to MKGPS pins |
GPSData.Status = INVALID; |
fifo_purge(&UART1_rx_fifo); |