Subversion Repositories Projects

Rev

Rev 2204 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2204 Rev 2205
Line 631... Line 631...
631
        uint8_t   redraw;
631
        uint8_t   redraw;
Line 632... Line 632...
632
 
632
 
633
        set_beep( 25, 0xffff, BeepNormal );                                 // kurzer Bestaetigungs-Beep
633
        set_beep( 25, 0xffff, BeepNormal );                                 // kurzer Bestaetigungs-Beep
Line -... Line 634...
-
 
634
        redraw = true;
-
 
635
 
634
        redraw = true;
636
//#define OFFLINE
635
 
637
#ifndef OFFLINE
636
    int retcode = GPSMouse_Connect();                                   // Abfrage der GPS-Daten zum testen Quick an Dirty ;-)
638
    int retcode = GPSMouse_Connect();                                   // Abfrage der GPS-Daten zum testen Quick an Dirty ;-)
637
    if( retcode <= 0 )
639
    if( retcode <= 0 )
638
    {
640
    {
-
 
641
        return;
-
 
642
    }
-
 
643
#endif
-
 
644
 
-
 
645
/*  // DEBUG
-
 
646
        NMEApos.lat = 520000000;
-
 
647
        NMEApos.lon = 0;
-
 
648
        Config.FM_Azimuth = 90;
Line 639... Line 649...
639
        return;
649
        Config.FM_Distance = 10000;
640
    }
650
*/
641
 
651
 
642
        while( true )
652
        while( true )
Line 653... Line 663...
653
                        lcdx_printf_center_P( 3, MNORMAL, 1,0, PSTR(" Target Lat/Lon") );
663
                        lcdx_printf_center_P( 3, MNORMAL, 1,0, PSTR(" Target Lat/Lon") );
Line 654... Line 664...
654
 
664
 
655
                        redraw = false;
665
                        redraw = false;
Line 656... Line -...
656
                }
-
 
657
 
-
 
658
                //#################
-
 
659
                //# DISTANCE TO TARGET
-
 
660
                //#################
-
 
661
 
-
 
662
                //lcdx_printf_at_P( 0, 1, MNORMAL,0,0, PSTR("Distance: %3d Meter"), Config.FM_Distance );
-
 
663
 
-
 
664
                //#################
-
 
665
                //# TARGET Azimuth
-
 
666
                //#################
-
 
667
                //lcdx_printf_at_P( 0, 2, MNORMAL, 0,0, PSTR(" Azimuth: %3d Grad"), Config.FM_Azimuth);
-
 
668
 
666
                }
669
 
667
 
Line 670... Line -...
670
                writex_gpspos( 1, 2, NMEApos.lat , MNORMAL,0,0 );                // GPS-Maus: Latitude
-
 
671
                writex_gpspos(10, 2, NMEApos.lon, MNORMAL, 0,0 );                // GPS-Maus: Longitude
-
 
672
 
-
 
673
                //followMeOffset.offset_lat = 10000;
668
                writex_gpspos( 1, 2, NMEApos.lat, MNORMAL, 0,0 );                // GPS-Maus: Latitude
-
 
669
                writex_gpspos(10, 2, NMEApos.lon, MNORMAL, 0,0 );                // GPS-Maus: Longitude
-
 
670
 
-
 
671
                followme_calculate_offset(Config.FM_Distance, Config.FM_Azimuth, &followMeOffset);
-
 
672
 
-
 
673
                // DEBUG
-
 
674
                writex_gpspos(  1, 6, (int32_t)Config.FM_Azimuth*100 , MNORMAL, 0, 0 );
-
 
675
                writex_gpspos( 10, 6, (int32_t)Config.FM_Distance*100 , MNORMAL, 0, 0 );
674
                //followMeOffset.offset_long = 10000;
676
                writex_gpspos(  1, 7, (int32_t)followMeOffset.offset_lat*100 , MNORMAL, 0, 0 );
Line 675... Line 677...
675
 
677
                writex_gpspos( 10, 7, (int32_t)followMeOffset.offset_long*100 , MNORMAL, 0, 0 );
676
                followme_calculate_offset(Config.FM_Distance, Config.FM_Azimuth, &followMeOffset);
678
 
Line 677... Line 679...
677
                followme_add_offset(&NMEApos, &NMEATarget, &followMeOffset);
679
                followme_add_offset(&NMEApos, &NMEATarget, &followMeOffset);
678
 
680
 
-
 
681
                writex_gpspos( 1, 4, (int32_t)NMEATarget.lat , MNORMAL, 0, 0 );       // Ziel Latitude
679
                writex_gpspos( 1, 4, (int32_t)NMEATarget.lat , MNORMAL, 0,0 );       // Ziel Latitude
682
                writex_gpspos(10, 4, (int32_t)NMEATarget.lon , MNORMAL, 0, 0 );       // Ziel Longitude
-
 
683
 
680
                writex_gpspos(10, 4, (int32_t)NMEATarget.lon , MNORMAL, 0,0 );       // Ziel Longitude
684
 
681
 
685
                if( get_key_press(1 << KEY_ESC) )
Line -... Line 686...
-
 
686
                {
682
 
687
#ifndef OFFLINE
683
                if( get_key_press(1 << KEY_ESC) )
688
                        GPSMouse_Disconnect();
684
                {
689
#endif
685
                        GPSMouse_Disconnect();
690
                        break;
686
                        break;
691
                }
-
 
692
 
-
 
693
 
-
 
694
                if( get_key_press(1 << KEY_ENTER) )
-
 
695
                {
-
 
696
                        redraw = true;
687
                }
697
                //    break;
-
 
698
                }
-
 
699
 
-
 
700
                if( get_key_press(1 << KEY_MINUS) )
-
 
701
                {
-
 
702
                        Config.FM_Azimuth -= 10;
-
 
703
                        redraw = true;
688
 
704
                }