Rev 2147 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2147 | Rev 2192 | ||
---|---|---|---|
Line 582... | Line 582... | ||
582 | #ifdef DEBUG_GPS |
582 | #ifdef DEBUG_GPS |
Line 583... | Line 583... | ||
583 | 583 | ||
584 | - | ||
585 | 584 | ||
Line 586... | Line 585... | ||
586 | void Debug_GPS (void) |
585 | |
587 | - | ||
588 | { |
586 | void Debug_GPS (void) |
589 | 587 | { |
|
- | 588 | ||
Line 590... | Line 589... | ||
590 | uint8_t redraw; |
589 | uint8_t redraw; |
591 | //char printbuff[100]; |
590 | |
- | 591 | double l1; |
|
- | 592 | GPS_Pos_t currpos; |
|
- | 593 | ||
- | 594 | set_beep( 25, 0xffff, BeepNormal ); // kurzer Bestaetigungs-Beep |
|
- | 595 | redraw = true; |
|
Line 592... | Line 596... | ||
592 | // |
596 | uint8_t mktimeout = false; |
593 | double l1; |
597 | |
Line 594... | Line 598... | ||
594 | 598 | uint32_t NMEA_GPGGA_counter_old; // Merker: zaehlt empfangene GPGGA-Pakete |
|
595 | set_beep( 25, 0xffff, BeepNormal ); // kurzer Bestaetigungs-Beep |
599 | uint32_t send_followme_counter; |
596 | redraw = true; |
600 | Point_t FollowMe; |
597 | 601 | ||
598 | 602 | ||
599 | while( true ) |
603 | while( true ) |
600 | { |
604 | { |
Line 601... | Line 605... | ||
601 | 605 | ||
602 | //######## Quell Koordinaten ############################## |
606 | //######## Quell Koordinaten ############################## |
603 | //# |
607 | //# |
Line -... | Line 608... | ||
- | 608 | // NMEApos.lat = 0x0FB51D1F; //# |
|
- | 609 | // NMEApos.lon = 0xE2CF4105; //# |
|
- | 610 | //# |
|
- | 611 | // NMEApos.lat = 0x1f1db5fb; //# |
|
- | 612 | // NMEApos.lon = 0x0541cfe2; //# |
|
- | 613 | ||
Line -... | Line 614... | ||
- | 614 | // l1 = NMEApos.lat; |
|
- | 615 | //# |
|
- | 616 | //######################################################### |
|
- | 617 | ||
- | 618 | int ok = GPSMouse_ShowData( GPSMOUSE_SHOW_WAITSATFIX, 500 ); // 500 = 5 Sekunden Verzoegerung nach Satfix |
|
- | 619 | ||
- | 620 | if( ok <= 0 ) |
|
- | 621 | { |
|
- | 622 | return; // Fehler bzgl. BT GPS-Maus -> exit |
|
- | 623 | } |
|
- | 624 | ||
- | 625 | if(NMEA_isdataready() && receiveNMEA) |
|
- | 626 | { |
|
- | 627 | if( NMEA.Counter > NMEA_GPGGA_counter_old ) |
|
- | 628 | { |
|
- | 629 | if( (NMEA.SatsInUse > 5) && (NMEA.SatFix == 1 || NMEA.SatFix == 2) ) |
|
- | 630 | { |
|
- | 631 | ||
- | 632 | NMEApos.lat = NMEA.Latitude; |
|
- | 633 | NMEApos.lon = NMEA.Longitude; |
|
- | 634 | //Config.FM_Refresh |
|
- | 635 | /* |
|
- | 636 | FollowMe.Position.Status = NEWDATA; |
|
- | 637 | FollowMe.Position.Longitude = NMEA.Longitude; |
|
- | 638 | FollowMe.Position.Latitude = NMEA.Latitude; |
|
- | 639 | FollowMe.Position.Altitude = 1; // 20.7.2015 CB |
|
- | 640 | // FollowMe.Position.Altitude = NMEA.Altitude; // ist das wirklich ok? NEIN C.B. |
|
- | 641 | ||
- | 642 | FollowMe.Heading = -1; // invalid heading |
|
- | 643 | FollowMe.ToleranceRadius = Config.FM_Radius; // 5 meter default |
|
- | 644 | FollowMe.HoldTime = 60; // ????? go home after 60s without any update ?????? |
|
- | 645 | // FollowMe.Event_Flag = 0; // no event |
|
- | 646 | FollowMe.Event_Flag = 1; // 20.7.2015 CB |
|
- | 647 | FollowMe.Index = 1; // 2st wp, 0 = Delete List, 1 place at first entry in the list |
|
- | 648 | FollowMe.Type = POINT_TYPE_WP; // Typ des Wegpunktes |
|
- | 649 | FollowMe.Name[0] = 'F'; // Name des Wegpunktes (ASCII) |
|
- | 650 | FollowMe.Name[1] = 'O'; |
|
- | 651 | FollowMe.Name[2] = 'L'; |
|
- | 652 | FollowMe.Name[3] = 'L'; |
|
- | 653 | // FollowMe.WP_EventChannelValue = 0; // Will be transferred to the FC and can be used as Poti value there |
|
- | 654 | FollowMe.WP_EventChannelValue = 100; // set servo value 20.7.2015 |
|
- | 655 | FollowMe.AltitudeRate = 0; // rate to change the Aetpoint |
|
- | 656 | FollowMe.Speed = Config.FM_Speed; // rate to change the Position |
|
- | 657 | FollowMe.CamAngle = 255; // Camera servo angle in degree (255 -> POI-Automatic) |
|
- | 658 | FollowMe.reserve[0] = 0; // reserve |
|
- | 659 | FollowMe.reserve[1] = 0; // reserve |
|
- | 660 | ||
Line 604... | Line 661... | ||
604 | // NMEApos.lat = 0x0FB51D1F; //# |
661 | SendOutData( 's', ADDRESS_NC, 1, &FollowMe, sizeof(FollowMe) ); //'s' = target Position 'w' = Waypoint |
605 | // NMEApos.lon = 0xE2CF4105; //# |
662 | send_followme_counter++; |
606 | //# |
663 | |
607 | NMEApos.lat = 0x1f1db5fb; //# |
664 | //void SendOutData(uint8_t cmd, uint8_t addr, uint8_t numofbuffers, ...) // uint8_t *pdata, uint8_t len, ... |
Line 660... | Line 717... | ||
660 | 717 | ||
Line 661... | Line 718... | ||
661 | 718 | ||
- | 719 | //############################## Test GPS Offset |
|
662 | //############################## Test GPS Offset |
720 | |
Line 663... | Line 721... | ||
663 | 721 | ||
664 | 722 | //nmea_move_horz(&NMEApos,&NMEATarget, Config.FM_Azimuth, Config.FM_Distance/1000); // neues Ziel berechnen |
|
Line 685... | Line 743... | ||
685 | if( get_key_press(1 << KEY_ENTER) ) |
743 | if( get_key_press(1 << KEY_ENTER) ) |
686 | { |
744 | { |
687 | redraw = true; |
745 | redraw = true; |
688 | // break; |
746 | // break; |
689 | } |
747 | } |
- | 748 | } |
|
690 | } |
749 | } |
691 | } |
750 | } |
Line -... | Line 751... | ||
- | 751 | ||
- | 752 | ||
- | 753 | ||
692 | 754 | ||
Line 693... | Line 755... | ||
693 | #endif |
755 | #endif |