Rev 2212 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2212 | Rev 2214 | ||
---|---|---|---|
Line 32... | Line 32... | ||
32 | *****************************************************************************/ |
32 | *****************************************************************************/ |
Line 33... | Line 33... | ||
33 | 33 | ||
34 | //############################################################################ |
34 | //############################################################################ |
35 | //# HISTORY setup.c |
35 | //# HISTORY setup.c |
- | 36 | //# |
|
- | 37 | //# 14.10.2015 Starter |
|
- | 38 | //# - FollowMe neu mit Offset |
|
- | 39 | //# - enum Show_int3 fehlte für das Anzeigen von Setupwerten. Nun ergänzt |
|
36 | //# |
40 | //# - Umbenennen der Pareameter Distance und Azimuth in Offset_lat und Offset_long |
37 | //# |
41 | //# |
38 | //# 03.08.2015 CB |
42 | //# 03.08.2015 CB |
39 | //# - add: FollowMe Setup um Distance und Azimuth erweitert |
43 | //# - add: FollowMe Setup um Distance und Azimuth erweitert |
40 | //# |
44 | //# |
Line 596... | Line 600... | ||
596 | //############################################################################ |
600 | //############################################################################ |
Line 597... | Line 601... | ||
597 | 601 | ||
598 | //----------------------------- |
602 | //----------------------------- |
599 | // Setup_FollowMe() |
603 | // Setup_FollowMe() |
600 | //----------------------------- |
- | |
601 | #define FME_DISTANCE 1 |
604 | //----------------------------- |
602 | #define FME_SPEED 2 |
605 | #define FME_SPEED 1 |
603 | #define FME_RADIUS 3 |
- | |
604 | #define FME_AZIMUTH 4 |
- | |
605 | - | ||
606 | static const char FME_DISTANCE_de[] PROGMEM = "FollowMe Abstand"; |
- | |
Line 607... | Line 606... | ||
607 | static const char FME_DISTANCE_en[] PROGMEM = "followMe distance"; |
606 | #define FME_RADIUS 2 |
608 | 607 | ||
Line -... | Line 608... | ||
- | 608 | #define FME_OFFSET_LAT 3 |
|
609 | static const char FME_AZIMUTH_de[] PROGMEM = "FollowMe Winkel"; |
609 | #define FME_OFFSET_LONG 4 |
610 | static const char FME_AZIMUTH_en[] PROGMEM = "followMe angle"; |
610 | |
- | 611 | // FOLLOW_ME Step 2 |
|
- | 612 | static const char FME_OFFSET_LATITUDE_de[] PROGMEM = "Offset Lat"; |
|
Line -... | Line 613... | ||
- | 613 | static const char FME_OFFSET_LATITUDE_en[] PROGMEM = "offset lat"; |
|
- | 614 | static const char FME_OFFSET_LONGITUDE_de[] PROGMEM = "Offset Long"; |
|
- | 615 | static const char FME_OFFSET_LONGITUDE_en[] PROGMEM = "offset long"; |
|
611 | 616 | ||
612 | static const char FME_SPEED_de[] PROGMEM = "FollowMe Speed"; |
617 | static const char FME_SPEED_de[] PROGMEM = "Speed"; |
Line 613... | Line 618... | ||
613 | #define FME_SPEED_en FME_SPEED_de |
618 | #define FME_SPEED_en FME_SPEED_de |
Line 885... | Line 890... | ||
885 | switch( what ) |
890 | switch( what ) |
886 | { |
891 | { |
887 | case Show_uint3: pstr = buffered_sprintf_P( PSTR("%3d"), Value ); |
892 | case Show_uint3: pstr = buffered_sprintf_P( PSTR("%3d"), Value ); |
888 | break; |
893 | break; |
Line 889... | Line -... | ||
889 | - | ||
890 | 894 | ||
891 | case Show_uint5: pstr = buffered_sprintf_P( PSTR("%5d"), Value ); |
895 | case Show_uint5: pstr = buffered_sprintf_P( PSTR("%5d"), Value ); |
Line -... | Line 896... | ||
- | 896 | break; |
|
- | 897 | ||
Line 892... | Line 898... | ||
892 | break; |
898 | case Show_int3: pstr = buffered_sprintf_P( PSTR("%3d"), Value ); |
893 | 899 | break; |
|
Line 894... | Line -... | ||
894 | - | ||
895 | case Show_uint10th: pstr = buffered_sprintf_P( PSTR("%2.1d"), Value ); |
900 | |
896 | break; |
901 | case Show_uint10th: pstr = buffered_sprintf_P( PSTR("%2.1d"), Value ); |
897 | 902 | break; |
|
898 | 903 | ||
899 | case MK_Connection: switch( Value ) |
904 | case MK_Connection: switch( Value ) |
Line 911... | Line 916... | ||
911 | { |
916 | { |
912 | lcd_frect( 0, 37, 127, 21-6, 0); // Hilfebereich loeschen |
917 | lcd_frect( 0, 37, 127, 21-6, 0); // Hilfebereich loeschen |
913 | } |
918 | } |
914 | break; |
919 | break; |
Line 915... | Line -... | ||
915 | - | ||
916 | 920 | ||
917 | case GPSMOUSE: switch( Value ) |
921 | case GPSMOUSE: switch( Value ) |
918 | { |
922 | { |
919 | case GPS_Bluetoothmouse1: pStr = PSTR("BT-Mouse"); break; |
923 | case GPS_Bluetoothmouse1: pStr = PSTR("BT-Mouse"); break; |
920 | case GPS_Mikrokopter: pStr = PSTR("Mikrokopter"); break; |
924 | case GPS_Mikrokopter: pStr = PSTR("Mikrokopter"); break; |
921 | default: pStr = PSTR("unknown"); |
925 | default: pStr = PSTR("unknown"); |
922 | } |
926 | } |
Line 923... | Line -... | ||
923 | break; |
- | |
924 | 927 | break; |
|
925 | 928 | ||
926 | case Wi_Netmode: switch( Value ) |
929 | case Wi_Netmode: switch( Value ) |
927 | { |
930 | { |
928 | case false: pStr = strGet(SLAVE); break; |
931 | case false: pStr = strGet(SLAVE); break; |
929 | case true : pStr = strGet(NORMAL); break; |
932 | case true : pStr = strGet(NORMAL); break; |
Line 930... | Line -... | ||
930 | } |
- | |
931 | break; |
- | |
932 | 933 | } |
|
933 | 934 | break; |
|
934 | 935 | ||
935 | case OnOff: switch( Value ) |
936 | case OnOff: switch( Value ) |
936 | { |
937 | { |
937 | case 0: pStr = strGet(OFF); break; |
938 | case 0: pStr = strGet(OFF); break; |
Line 938... | Line -... | ||
938 | case 1: pStr = strGet(ON); break; |
- | |
939 | } |
939 | case 1: pStr = strGet(ON); break; |
940 | break; |
940 | } |
941 | 941 | break; |
|
942 | 942 | ||
943 | case YesNo: switch( Value ) |
943 | case YesNo: switch( Value ) |
944 | { |
944 | { |
Line 945... | Line -... | ||
945 | case 0: pStr = strGet(NOO); break; |
- | |
946 | case 1: pStr = strGet(YES); break; |
945 | case 0: pStr = strGet(NOO); break; |
947 | } |
946 | case 1: pStr = strGet(YES); break; |
948 | break; |
947 | } |
949 | 948 | break; |
|
950 | 949 | ||
951 | case WlanMode: switch( Value ) |
950 | case WlanMode: switch( Value ) |
952 | { |
951 | { |
Line 953... | Line -... | ||
953 | case 0: pStr = strGet(OFF); break; |
- | |
954 | case 1: pStr = PSTR("AP-Mode"); break; |
- | |
955 | case 2: pStr = PSTR("AdHoc"); break; |
952 | case 0: pStr = strGet(OFF); break; |
956 | } |
953 | case 1: pStr = PSTR("AP-Mode"); break; |
957 | break; |
954 | case 2: pStr = PSTR("AdHoc"); break; |
958 | 955 | } |
|
959 | 956 | break; |
|
960 | 957 | ||
Line 961... | Line -... | ||
961 | case NormRev: switch( Value ) // wird noch von stick/stick_setup.c verwendet |
- | |
962 | { |
958 | case NormRev: switch( Value ) // wird noch von stick/stick_setup.c verwendet |
963 | case 0 : pStr = strGet(NORMAL); break; |
959 | { |
964 | case 1 : pStr = strGet(REVERSE); break; |
960 | case 0 : pStr = strGet(NORMAL); break; |
965 | } |
961 | case 1 : pStr = strGet(REVERSE); break; |
966 | break; |
962 | } |
Line 981... | Line 977... | ||
981 | lcd_set_contrast( Value ); |
977 | lcd_set_contrast( Value ); |
Line 982... | Line 978... | ||
982 | 978 | ||
983 | pstr = buffered_sprintf_P( PSTR("%3d"), Value ); |
979 | pstr = buffered_sprintf_P( PSTR("%3d"), Value ); |
Line 984... | Line -... | ||
984 | break; |
- | |
985 | 980 | break; |
|
986 | 981 | ||
Line 987... | Line -... | ||
987 | case Baudrate: pstr = buffered_sprintf_P( PSTR("%ld"), Baud_to_uint32(Value) ); |
- | |
988 | break; |
982 | case Baudrate: pstr = buffered_sprintf_P( PSTR("%ld"), Baud_to_uint32(Value) ); |
989 | 983 | break; |
|
990 | 984 | ||
991 | case Language: switch( Value ) |
985 | case Language: switch( Value ) |
992 | { |
986 | { |
993 | case 0: pStr = strGet(DEUTSCH); break; |
987 | case 0: pStr = strGet(DEUTSCH); break; |
Line 994... | Line -... | ||
994 | case 1: pStr = strGet(ENGLISCH); break; |
- | |
995 | } |
988 | case 1: pStr = strGet(ENGLISCH); break; |
996 | break; |
989 | } |
997 | 990 | break; |
|
998 | 991 | ||
999 | case Sticktype: switch( Value ) |
992 | case Sticktype: switch( Value ) |
Line 1824... | Line 1817... | ||
1824 | // der BT GPS-Maus getriggert! |
1817 | // der BT GPS-Maus getriggert! |
1825 | //-------------------------------------------------------------------------------------------------------- |
1818 | //-------------------------------------------------------------------------------------------------------- |
1826 | //MenuCtrl_PushML2_P( FME_REFRESH , MENU_ITEM, NOFUNC , FME_REFRESH_de , FME_REFRESH_en ); |
1819 | //MenuCtrl_PushML2_P( FME_REFRESH , MENU_ITEM, NOFUNC , FME_REFRESH_de , FME_REFRESH_en ); |
Line -... | Line 1820... | ||
- | 1820 | ||
- | 1821 | ||
Line 1827... | Line -... | ||
1827 | - | ||
1828 | - | ||
1829 | - | ||
1830 | #ifdef USE_FOLLOWME_STEP2 |
- | |
1831 | MenuCtrl_PushML2_P( FME_DISTANCE, MENU_ITEM, NOFUNC, FME_DISTANCE_de, FME_DISTANCE_en ); |
1822 | MenuCtrl_PushML2_P( FME_OFFSET_LAT , MENU_ITEM, NOFUNC, FME_OFFSET_LATITUDE_de , FME_OFFSET_LATITUDE_en ); |
1832 | MenuCtrl_PushML2_P( FME_AZIMUTH , MENU_ITEM, NOFUNC, FME_AZIMUTH_de , FME_AZIMUTH_en ); |
1823 | MenuCtrl_PushML2_P( FME_OFFSET_LONG, MENU_ITEM, NOFUNC, FME_OFFSET_LONGITUDE_de, FME_OFFSET_LONGITUDE_en ); |
1833 | #endif |
1824 | |
1834 | MenuCtrl_PushML2_P( FME_SPEED , MENU_ITEM, NOFUNC, FME_SPEED_de , FME_SPEED_en ); |
1825 | MenuCtrl_PushML2_P( FME_SPEED , MENU_ITEM, NOFUNC, FME_SPEED_de , FME_SPEED_en ); |
Line 1847... | Line 1838... | ||
1847 | 1838 | ||
Line 1848... | Line 1839... | ||
1848 | itemid = MenuCtrl_GetItemId(); // welcher Menu-Punkt (ID) |
1839 | itemid = MenuCtrl_GetItemId(); // welcher Menu-Punkt (ID) |
Line 1849... | Line 1840... | ||
1849 | 1840 | ||
1850 | //if( itemid == FME_REFRESH ) { Config.FM_Refresh = Edit_generic( Config.FM_Refresh ,250,60000, Show_uint3,1 ,NULL,NULL); } |
1841 | //if( itemid == FME_REFRESH ) { Config.FM_Refresh = Edit_generic( Config.FM_Refresh ,250,60000, Show_uint3,1 ,NULL,NULL); } |
1851 | 1842 | ||
- | 1843 | // FollowMeStep2: Eingabe in m, intern als mm behandeln |
|
1852 | // FollowMeStep2: |
1844 | if( itemid == FME_OFFSET_LAT ) { Config.FM_Offest_Latitude = Edit_generic( Config.FM_Offest_Latitude / 1000, -30, 30, Show_int3, 1, strGet(STR_METERS), NULL) * 1000; } |
1853 | if( itemid == FME_DISTANCE) { Config.FM_Distance= Edit_generic( Config.FM_Distance , 0, 100, Show_uint3,1 ,strGet(STR_METERS),NULL); } |
1845 | if( itemid == FME_OFFSET_LONG) { Config.FM_Offset_Longitude = Edit_generic( Config.FM_Offset_Longitude / 1000, -30, 30, Show_int3, 1, strGet(STR_METERS), NULL) * 1000; } |
1854 | if( itemid == FME_AZIMUTH ) { Config.FM_Azimuth = Edit_generic( Config.FM_Azimuth , 0, 360, Show_uint3,1 ,PSTR("Grad"),NULL); } |
1846 | |
Line 1855... | Line 1847... | ||
1855 | // FollowMe: |
1847 | // FollowMe: |
1856 | if( itemid == FME_SPEED ) { Config.FM_Speed = Edit_generic( Config.FM_Speed , 0, 100, Show_uint3,1 ,PSTR("0.1 m/s") ,NULL); } |
1848 | if( itemid == FME_SPEED ) { Config.FM_Speed = Edit_generic( Config.FM_Speed , 0, 100, Show_uint3, 1, PSTR("0.1 m/s") , NULL); } |
1857 | if( itemid == FME_RADIUS ) { Config.FM_Radius = Edit_generic( Config.FM_Radius , 1, 20, Show_uint3,1 ,strGet(STR_METERS),NULL); } |
1849 | if( itemid == FME_RADIUS ) { Config.FM_Radius = Edit_generic( Config.FM_Radius, 1, 20, Show_uint3, 1, strGet(STR_METERS), NULL); } |
1858 | 1850 |