Rev 2192 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2192 | Rev 2194 | ||
---|---|---|---|
Line 582... | Line 582... | ||
582 | #ifdef DEBUG_GPS |
582 | #ifdef DEBUG_GPS |
Line 583... | Line 583... | ||
583 | 583 | ||
- | 584 | ||
584 | 585 | ||
Line 585... | Line 586... | ||
585 | 586 | void Debug_GPS (void) |
|
- | 587 | ||
586 | void Debug_GPS (void) |
588 | { |
587 | { |
589 | |
588 | - | ||
Line 589... | Line 590... | ||
589 | uint8_t redraw; |
590 | uint8_t redraw; |
590 | 591 | //char printbuff[100]; |
|
591 | double l1; |
- | |
592 | GPS_Pos_t currpos; |
- | |
593 | - | ||
594 | set_beep( 25, 0xffff, BeepNormal ); // kurzer Bestaetigungs-Beep |
- | |
595 | redraw = true; |
- | |
Line 596... | Line 592... | ||
596 | uint8_t mktimeout = false; |
592 | // |
597 | 593 | double l1; |
|
Line 598... | Line 594... | ||
598 | uint32_t NMEA_GPGGA_counter_old; // Merker: zaehlt empfangene GPGGA-Pakete |
594 | |
599 | uint32_t send_followme_counter; |
595 | set_beep( 25, 0xffff, BeepNormal ); // kurzer Bestaetigungs-Beep |
600 | Point_t FollowMe; |
596 | redraw = true; |
601 | 597 | ||
602 | 598 | ||
603 | while( true ) |
599 | while( true ) |
604 | { |
600 | { |
Line 605... | Line 601... | ||
605 | 601 | ||
606 | //######## Quell Koordinaten ############################## |
602 | //######## Quell Koordinaten ############################## |
607 | //# |
603 | //# |
Line 608... | Line -... | ||
608 | // NMEApos.lat = 0x0FB51D1F; //# |
- | |
609 | // NMEApos.lon = 0xE2CF4105; //# |
- | |
610 | //# |
- | |
611 | // NMEApos.lat = 0x1f1db5fb; //# |
- | |
612 | // NMEApos.lon = 0x0541cfe2; //# |
- | |
613 | - | ||
Line 614... | Line -... | ||
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 661... | Line 604... | ||
661 | SendOutData( 's', ADDRESS_NC, 1, &FollowMe, sizeof(FollowMe) ); //'s' = target Position 'w' = Waypoint |
604 | // NMEApos.lat = 0x0FB51D1F; //# |
662 | send_followme_counter++; |
605 | // NMEApos.lon = 0xE2CF4105; //# |
663 | 606 | //# |
|
664 | //void SendOutData(uint8_t cmd, uint8_t addr, uint8_t numofbuffers, ...) // uint8_t *pdata, uint8_t len, ... |
607 | NMEApos.lat = 0x1f1db5fb; //# |
Line 717... | Line 660... | ||
717 | 660 | ||
Line 718... | Line 661... | ||
718 | 661 | ||
719 | //############################## Test GPS Offset |
- | |
720 | 662 | //############################## Test GPS Offset |
|
Line 721... | Line 663... | ||
721 | 663 | ||
722 | //nmea_move_horz(&NMEApos,&NMEATarget, Config.FM_Azimuth, Config.FM_Distance/1000); // neues Ziel berechnen |
664 | |
Line 743... | Line 685... | ||
743 | if( get_key_press(1 << KEY_ENTER) ) |
685 | if( get_key_press(1 << KEY_ENTER) ) |
744 | { |
686 | { |
745 | redraw = true; |
687 | redraw = true; |
746 | // break; |
688 | // break; |
747 | } |
689 | } |
748 | } |
- | |
749 | } |
690 | } |
750 | } |
691 | } |
Line 751... | Line -... | ||
751 | - | ||
752 | - | ||
753 | - | ||
754 | 692 | ||
Line 755... | Line 693... | ||
755 | #endif |
693 | #endif |