Rev 519 | Rev 530 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 519 | Rev 528 | ||
---|---|---|---|
Line 558... | Line 558... | ||
558 | 558 | ||
Line 559... | Line 559... | ||
559 | Compass_Init(); |
559 | Compass_Init(); |
Line -... | Line 560... | ||
- | 560 | ||
560 | 561 | GPS_Init(); |
|
561 | GPS_Init(); |
562 | |
562 | 563 | ||
563 | #ifdef FOLLOW_ME |
564 | #ifdef FOLLOW_ME |
564 | TransmitAlsoToFC = 1; |
565 | TransmitAlsoToFC = 1; |
Line 572... | Line 573... | ||
572 | { |
573 | { |
573 | UART1_PutString("\n\r Flight-Ctrl not compatible\n\r"); |
574 | UART1_PutString("\n\r Flight-Ctrl not compatible\n\r"); |
574 | LED_RED_ON; |
575 | LED_RED_ON; |
575 | } |
576 | } |
576 | #endif |
577 | #endif |
- | 578 | ||
577 | // ---------- Prepare the isr driven |
579 | // ---------- Prepare the isr driven |
578 | // set to absolute lowest priority |
580 | // set to absolute lowest priority |
579 | VIC_Config(EXTIT3_ITLine, VIC_IRQ, PRIORITY_SW); |
581 | VIC_Config(EXTIT3_ITLine, VIC_IRQ, PRIORITY_SW); |
580 | // enable interrupts |
582 | // enable interrupts |
581 | VIC_ITCmd(EXTIT3_ITLine, ENABLE); |
583 | VIC_ITCmd(EXTIT3_ITLine, ENABLE); |
Line 585... | Line 587... | ||
585 | fifo_purge(&UART1_rx_fifo); // flush the whole fifo init buffer |
587 | fifo_purge(&UART1_rx_fifo); // flush the whole fifo init buffer |
586 | LED_GRN_ON; |
588 | LED_GRN_ON; |
587 | LED_RED_OFF; |
589 | LED_RED_OFF; |
588 | Settings_GetParamValue(PID_SEND_NMEA, &NMEA_Interval); |
590 | Settings_GetParamValue(PID_SEND_NMEA, &NMEA_Interval); |
589 | UART1_PutString("\r\n"); |
591 | UART1_PutString("\r\n"); |
- | 592 | ||
590 | CompassValueErrorCount = 0; |
593 | CompassValueErrorCount = 0; |
591 | I2CBus(Compass_I2CPort)->Timeout = SetDelay(3000); |
594 | I2CBus(Compass_I2CPort)->Timeout = SetDelay(3000); |
- | 595 | ||
- | 596 | // ++++++++++++++++++++++++++++++++++++++++++++++ |
|
592 | for (;;) // the endless main loop |
597 | for (;;) // the endless main loop |
593 | { |
598 | { |
594 | PollingTimeout = 5; |
599 | PollingTimeout = 5; |
595 | Polling(); |
600 | Polling(); |
596 | // ++++++++++++++++++++++++++++++++++++++++++++++ |
601 | // ++++++++++++++++++++++++++++++++++++++++++++++ |