Rev 515 | Rev 517 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 515 | Rev 516 | ||
---|---|---|---|
Line 102... | Line 102... | ||
102 | volatile FC_t FC; |
102 | volatile FC_t FC; |
103 | volatile u32 SPIWatchDog = 15000; // stop Navigation if this goes to zero |
103 | volatile u32 SPIWatchDog = 15000; // stop Navigation if this goes to zero |
104 | volatile u32 SD_WatchDog = 15000; // stop Logging if this goes to zero |
104 | volatile u32 SD_WatchDog = 15000; // stop Logging if this goes to zero |
105 | u32 CountGpsProcessedIn5Sec = 0,CountNewGpsDataIn5Sec = 0, FreqGpsProcessedIn5Sec = 0, FreqNewGpsDataIn5Sec = 0; |
105 | u32 CountGpsProcessedIn5Sec = 0,CountNewGpsDataIn5Sec = 0, FreqGpsProcessedIn5Sec = 0, FreqNewGpsDataIn5Sec = 0; |
106 | u8 NewWPL_Name = 0; |
106 | u8 NewWPL_Name = 0; |
107 | - | ||
- | 107 | u32 MaxRadius_in_m = 0; |
|
108 | s8 ErrorMSG[25]; |
108 | s8 ErrorMSG[25]; |
Line 109... | Line 109... | ||
109 | 109 | ||
110 | //---------------------------------------------------------------------------------------------------- |
110 | //---------------------------------------------------------------------------------------------------- |
111 | void SCU_Config(void) |
111 | void SCU_Config(void) |
Line 426... | Line 426... | ||
426 | u8 Polling(void) |
426 | u8 Polling(void) |
427 | { |
427 | { |
428 | static u8 running = 0, oldFcFlags = 0, count5sec; |
428 | static u8 running = 0, oldFcFlags = 0, count5sec; |
429 | static u32 old_ms = 0; |
429 | static u32 old_ms = 0; |
Line 430... | Line 430... | ||
430 | 430 | ||
431 | if(running) {/*DebugOut.Analog[18]++;*/ return(1);}; |
431 | if(running) {/*DebugOut.Analog[]++;*/ return(1);}; |
Line 432... | Line 432... | ||
432 | running = 1; |
432 | running = 1; |
433 | 433 | ||
434 | if(CountMilliseconds != old_ms) // 1 ms |
434 | if(CountMilliseconds != old_ms) // 1 ms |
Line 487... | Line 487... | ||
487 | VIC_ITCmd(EXTIT3_ITLine,DISABLE); // disable irq |
487 | VIC_ITCmd(EXTIT3_ITLine,DISABLE); // disable irq |
Line 488... | Line 488... | ||
488 | 488 | ||
489 | if(PollingTimeout == 0) |
489 | if(PollingTimeout == 0) |
490 | { |
490 | { |
491 | PollingTimeout = 5; |
491 | PollingTimeout = 5; |
492 | //if(Polling() == 0) DebugOut.Analog[16]++; |
492 | //if(Polling() == 0) DebugOut.Analog[]++; |
493 | Polling(); |
493 | Polling(); |
Line 494... | Line 494... | ||
494 | } |
494 | } |
495 | 495 | ||
Line 620... | Line 620... | ||
620 | } |
620 | } |
621 | // ++++++++++++++++++++++++++++++++++++++++++++++ |
621 | // ++++++++++++++++++++++++++++++++++++++++++++++ |
622 | if(FromFC_Save_SinglePoint) |
622 | if(FromFC_Save_SinglePoint) |
623 | { |
623 | { |
624 | WPL_Store.Index = FromFC_Save_SinglePoint; |
624 | WPL_Store.Index = FromFC_Save_SinglePoint; |
625 | if(PointList_SaveSinglePoint(&WPL_Store) == WPL_OK) BeepTime = 150; |
625 | if(WPL_Store.Index <= ToFC_MaxWpListIndex) if(PointList_SaveSinglePoint(&WPL_Store) == WPL_OK) BeepTime = 150; |
626 | FromFC_Save_SinglePoint = 0; |
626 | FromFC_Save_SinglePoint = 0; |
627 | } |
627 | } |
628 | // ++++++++++++++++++++++++++++++++++++++++++++++ |
628 | // ++++++++++++++++++++++++++++++++++++++++++++++ |
629 | if(FromFC_Load_SinglePoint) |
629 | if(FromFC_Load_SinglePoint) |
630 | { |
630 | { |
631 | WPL_Store.Index = FromFC_Load_SinglePoint; |
631 | WPL_Store.Index = FromFC_Load_SinglePoint; |
- | 632 | if(WPL_Store.Index <= ToFC_MaxWpListIndex) |
|
- | 633 | { |
|
632 | if(PointList_LoadSinglePoint(&WPL_Store) == WPL_OK) |
634 | if(PointList_LoadSinglePoint(&WPL_Store) == WPL_OK) |
633 | { |
635 | { |
634 | if(FC.StatusFlags & FC_STATUS_FLY) PointList_WPActive(TRUE); |
636 | if(FC.StatusFlags & FC_STATUS_FLY) PointList_WPActive(TRUE); |
635 | GPS_pWaypoint = PointList_WPBegin(); // updates POI index |
637 | GPS_pWaypoint = PointList_WPBegin(); // updates POI index |
636 | BeepTime = 150; |
638 | BeepTime = 150; |
637 | } |
639 | } |
- | 640 | } |
|
638 | FromFC_Load_SinglePoint = 0; |
641 | FromFC_Load_SinglePoint = 0; |
639 | } |
642 | } |
640 | // ++++++++++++++++++++++++++++++++++++++++++++++ |
643 | // ++++++++++++++++++++++++++++++++++++++++++++++ |
641 | // ---------------- Logging --------------------------------------- |
644 | // ---------------- Logging --------------------------------------- |
642 | if(SD_WatchDog) |
645 | if(SD_WatchDog) |
Line 698... | Line 701... | ||
698 | } |
701 | } |
699 | } |
702 | } |
700 | */ |
703 | */ |
701 | } |
704 | } |
702 | } |
705 | } |
703 | //DebugOut.Analog[16] |
706 | //DebugOut.Analog[] |