Rev 244 | Rev 247 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 244 | Rev 245 | ||
---|---|---|---|
Line 304... | Line 304... | ||
304 | case 4: |
304 | case 4: |
305 | if (c == 0x00) |
305 | if (c == 0x00) |
306 | { |
306 | { |
307 | if(DebugUART == UART0) |
307 | if(DebugUART == UART0) |
308 | { |
308 | { |
309 | UART0_Connect_to_MKGPS(); |
309 | UART0_Connect_to_MKGPS(UART0_BAUD_RATE); |
310 | TIMER2_Init(); // enbable servo outputs |
310 | TIMER2_Init(); // enbable servo outputs |
311 | fifo_purge(&UART1_rx_fifo); // flush the whole fifo init buffer |
311 | fifo_purge(&UART1_rx_fifo); // flush the whole fifo init buffer |
312 | } |
312 | } |
313 | DebugUART = UART1; |
313 | DebugUART = UART1; |
314 | } |
314 | } |
Line 427... | Line 427... | ||
427 | DebugUART = UART0; |
427 | DebugUART = UART0; |
428 | break; |
428 | break; |
429 | case UART_MKGPS: |
429 | case UART_MKGPS: |
430 | if(FC.Flags & FCFLAG_MOTOR_RUN) break; // not if the motors are running |
430 | if(FC.Flags & FCFLAG_MOTOR_RUN) break; // not if the motors are running |
431 | TIMER2_Deinit(); // disable servo outputs to reduce irq load |
431 | TIMER2_Deinit(); // disable servo outputs to reduce irq load |
432 | UART0_Connect_to_MKGPS(); // connect UART0 to MKGPS pins |
432 | UART0_Connect_to_MKGPS(UART0_BAUD_RATE); // connect UART0 to MKGPS pins |
433 | GPSData.Status = INVALID; |
433 | GPSData.Status = INVALID; |
434 | fifo_purge(&UART1_rx_fifo); |
434 | fifo_purge(&UART1_rx_fifo); |
435 | DebugUART = UART0; |
435 | DebugUART = UART0; |
436 | break; |
436 | break; |
437 | default: |
437 | default: |