Subversion Repositories NaviCtrl

Rev

Rev 178 | Rev 180 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 178 Rev 179
Line 387... Line 387...
387
 
387
 
388
                        case 'u': // redirect debug uart
388
                        case 'u': // redirect debug uart
389
                                switch(SerialMsg.pData[0])
389
                                switch(SerialMsg.pData[0])
390
                                {
390
                                {
391
                                        case UART_FLIGHTCTRL:
-
 
392
                                                TIMER2_Deinit();                        // reduce irq load
391
                                        case UART_FLIGHTCTRL:
393
                                                UART2_Init();                           // initialize UART2 to FC pins
392
                                                UART2_Init();                           // initialize UART2 to FC pins
394
                                                fifo_purge(&UART1_rx_fifo);
393
                                                fifo_purge(&UART1_rx_fifo);
395
                                                DebugUART = UART2;
394
                                                DebugUART = UART2;
396
                                                break;
395
                                                break;
Line 401... Line 400...
401
                                                fifo_purge(&UART1_rx_fifo);
400
                                                fifo_purge(&UART1_rx_fifo);
402
                                                DebugUART = UART0;
401
                                                DebugUART = UART0;
403
                                                break;
402
                                                break;
404
                                        case UART_MKGPS:
403
                                        case UART_MKGPS:
405
                                                if(FC.MKFlags & MKFLAG_MOTOR_RUN) break; // not if the motors are running
404
                                                if(FC.MKFlags & MKFLAG_MOTOR_RUN) break; // not if the motors are running
406
                                                TIMER2_Deinit();
405
                                                TIMER2_Deinit();                        // disable servo outputs to reduce irq load
407
                                                UART0_Connect_to_MKGPS();       // connect UART0 to MKGPS pins
406
                                                UART0_Connect_to_MKGPS();       // connect UART0 to MKGPS pins
408
                                                GPSData.Status = INVALID;
407
                                                GPSData.Status = INVALID;
409
                                                fifo_purge(&UART1_rx_fifo);
408
                                                fifo_purge(&UART1_rx_fifo);
410
                                                DebugUART = UART0;
409
                                                DebugUART = UART0;
411
                                                break;
410
                                                break;