Subversion Repositories NaviCtrl

Compare Revisions

Ignore whitespace Rev 178 → Rev 179

/trunk/main.c
130,6 → 130,7
{
LED_RED_ON;
sprintf(ErrorMSG,"no FC communication ");
TIMER2_Deinit(); // reduce irq load
ErrorCode = 3;
StopNavigation = 1;
}
180,6 → 181,10
else // no error occured
{
sprintf(ErrorMSG,"No Error ");
if(ErrorCode == 3)
{
TIMER2_Init(); // enbable servo outputs
}
ErrorCode = 0;
StopNavigation = 0;
LED_RED_OFF;
/trunk/uart1.c
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);