Rev 2408 | Rev 2420 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2408 | Rev 2418 | ||
---|---|---|---|
Line 78... | Line 78... | ||
78 | #define HOTT_KEY_UP 4 |
78 | #define HOTT_KEY_UP 4 |
79 | #define HOTT_KEY_SET 6 |
79 | #define HOTT_KEY_SET 6 |
80 | #define HOTT_KEY_LEFT 8 |
80 | #define HOTT_KEY_LEFT 8 |
Line 81... | Line 81... | ||
81 | 81 | ||
82 | #define VARIO_ZERO 30000 |
82 | #define VARIO_ZERO 30000 |
83 | unsigned char NaviData_WaypointIndex = 0, NaviData_WaypointNumber = 0, NaviData_TargetHoldTime = 0; |
83 | unsigned char NaviData_WaypointIndex = 0, NaviData_WaypointNumber = 0, NaviData_TargetHoldTime = 0, ToNC_Load_WP_List = 0; |
Line 84... | Line 84... | ||
84 | unsigned int NaviData_TargetDistance = 0; |
84 | unsigned int NaviData_TargetDistance = 0; |
85 | 85 | ||
86 | unsigned char MaxBlTemperture = 0; |
86 | unsigned char MaxBlTemperture = 0; |
Line 411... | Line 411... | ||
411 | VarioPacket.Text[20] = 'a'+VERSION_PATCH; |
411 | VarioPacket.Text[20] = 'a'+VERSION_PATCH; |
412 | } |
412 | } |
413 | else |
413 | else |
414 | { |
414 | { |
415 | for(i=0; i<21;i++) VarioPacket.Text[i] = pgm_read_byte(&MIKROKOPTER[i]); // no Error |
415 | for(i=0; i<21;i++) VarioPacket.Text[i] = pgm_read_byte(&MIKROKOPTER[i]); // no Error |
- | 416 | if(RedundanceBlOperation) VarioPacket.Text[0] = 'R'; |
|
416 | } |
417 | } |
417 | return(sizeof(VarioPacket)); |
418 | return(sizeof(VarioPacket)); |
418 | break; |
419 | break; |
Line 419... | Line 420... | ||
419 | 420 | ||
Line 495... | Line 496... | ||
495 | } |
496 | } |
Line 496... | Line 497... | ||
496 | 497 | ||
497 | //--------------------------------------------------------------- |
498 | //--------------------------------------------------------------- |
498 | void HoTT_Menu(void) |
499 | void HoTT_Menu(void) |
499 | { |
500 | { |
500 | static unsigned char line, page = 0,show_current = 0,show_mag = 0, show_poti = 0; |
501 | static unsigned char line, page = 0,show_current = 0,show_mag = 0, show_poti = 0, load_waypoint_tmp, changed, load_waypoint_tmp2, changed2; |
501 | unsigned char tmp; |
502 | unsigned char tmp; |
Line 502... | Line 503... | ||
502 | HoTTVarioMeter = (HoTTVarioMeter * 7 + VarioMeter) / 8; |
503 | HoTTVarioMeter = (HoTTVarioMeter * 7 + VarioMeter) / 8; |
503 | 504 | ||
Line 818... | Line 819... | ||
818 | case 13: |
819 | case 13: |
819 | case 14: |
820 | case 14: |
820 | case 15: |
821 | case 15: |
821 | case 16: |
822 | case 16: |
822 | if(HottKeyboard == HOTT_KEY_SET) { if(show_poti) show_poti = 0; else show_poti = 1; Hott_ClearLine(6); Hott_ClearLine(7);} |
823 | if(HottKeyboard == HOTT_KEY_SET) { if(show_poti) show_poti = 0; else show_poti = 1; Hott_ClearLine(6); Hott_ClearLine(7);} |
823 | // else |
824 | else |
824 | // if(HottKeyboard == HOTT_KEY_LEFT) { LIBFC_HoTT_Clear(); page = 3; line = 0;} |
825 | if(HottKeyboard == HOTT_KEY_LEFT) { LIBFC_HoTT_Clear(); page = 3; line = 0;} |
825 | else |
826 | else |
826 | if(HottKeyboard == HOTT_KEY_RIGHT) { LIBFC_HoTT_Clear(); page = 1; line = 0;}; |
827 | if(HottKeyboard == HOTT_KEY_RIGHT) { LIBFC_HoTT_Clear(); page = 1; line = 0;}; |
827 | HottKeyboard = 0; |
828 | HottKeyboard = 0; |
828 | break; |
829 | break; |
829 | default: line = 0; |
830 | default: line = 0; |
830 | break; |
831 | break; |
831 | } |
832 | } |
- | 833 | else |
|
- | 834 | if(page == 3) |
|
- | 835 | switch(line++) |
|
- | 836 | { |
|
- | 837 | case 0: |
|
- | 838 | HoTT_printfxy(0,0,"Load Waypoints"); |
|
- | 839 | break; |
|
- | 840 | case 1: //HoTT_printfxy(0,1,"Min:%2i.%1iV %s ",BattLowVoltageWarning/10, BattLowVoltageWarning%10, Mixer.Name); |
|
- | 841 | HoTT_printfxy(0,1,"(Absolute)"); |
|
- | 842 | break; |
|
- | 843 | case 2: |
|
- | 844 | if(load_waypoint_tmp) |
|
- | 845 | { |
|
- | 846 | HoTT_printfxy(0,3,"Load list: ") |
|
- | 847 | if(changed && HoTTBlink) HoTT_printfxy(10,3," ", load_waypoint_tmp) |
|
- | 848 | else HoTT_printfxy(10,3,"%2d ", load_waypoint_tmp); |
|
- | 849 | } |
|
- | 850 | else |
|
- | 851 | { |
|
- | 852 | HoTT_printfxy(0,3,"Load list: -- "); |
|
- | 853 | } |
|
- | 854 | break; |
|
- | 855 | case 3: |
|
- | 856 | if(changed && load_waypoint_tmp) HoTT_printfxy(0,4,"(Set -> Load)") |
|
- | 857 | else HoTT_printfxy(0,4," "); |
|
- | 858 | break; |
|
- | 859 | case 4: |
|
- | 860 | break; |
|
- | 861 | case 5: |
|
- | 862 | break; |
|
- | 863 | case 6: |
|
- | 864 | if(NaviData_WaypointNumber) HoTT_printfxy(0,6,"Active: %2d WPs",NaviData_WaypointNumber) |
|
- | 865 | else HoTT_printfxy(0,6,"No WPs active ") |
|
- | 866 | break; |
|
- | 867 | case 7: |
|
- | 868 | case 8: |
|
- | 869 | case 9: |
|
- | 870 | case 10: |
|
- | 871 | case 11: |
|
- | 872 | case 12: |
|
- | 873 | case 13: |
|
- | 874 | case 14: |
|
- | 875 | case 15: |
|
- | 876 | case 16: |
|
- | 877 | if(HottKeyboard == HOTT_KEY_UP && load_waypoint_tmp < 99) { changed = 1; load_waypoint_tmp++;} |
|
- | 878 | else |
|
- | 879 | if(HottKeyboard == HOTT_KEY_DOWN && load_waypoint_tmp) { changed = 1; load_waypoint_tmp--;}; |
|
- | 880 | ||
- | 881 | if(HottKeyboard == HOTT_KEY_SET) { if(load_waypoint_tmp) ToNC_Load_WP_List = load_waypoint_tmp; changed = 0;} |
|
- | 882 | else |
|
- | 883 | if(HottKeyboard == HOTT_KEY_LEFT) { LIBFC_HoTT_Clear(); page = 4; line = 0;} |
|
- | 884 | else |
|
- | 885 | if(HottKeyboard == HOTT_KEY_RIGHT) { LIBFC_HoTT_Clear(); page = 2; line = 0;}; |
|
- | 886 | HottKeyboard = 0; |
|
- | 887 | break; |
|
- | 888 | default: line = 0; |
|
- | 889 | break; |
|
- | 890 | } |
|
- | 891 | else |
|
- | 892 | if(page == 4) |
|
- | 893 | switch(line++) |
|
- | 894 | { |
|
- | 895 | case 0: |
|
- | 896 | HoTT_printfxy(0,0,"Load Waypoints"); |
|
- | 897 | break; |
|
- | 898 | case 1: //HoTT_printfxy(0,1,"Min:%2i.%1iV %s ",BattLowVoltageWarning/10, BattLowVoltageWarning%10, Mixer.Name); |
|
- | 899 | HoTT_printfxy(0,1,"(Relative)"); |
|
- | 900 | break; |
|
- | 901 | case 2: |
|
- | 902 | if(load_waypoint_tmp2) |
|
- | 903 | { |
|
- | 904 | HoTT_printfxy(0,3,"Load list: ") |
|
- | 905 | if(changed && HoTTBlink) HoTT_printfxy(10,3," ", load_waypoint_tmp2) |
|
- | 906 | else HoTT_printfxy(10,3,"%2d ", load_waypoint_tmp2); |
|
- | 907 | } |
|
- | 908 | else |
|
- | 909 | { |
|
- | 910 | HoTT_printfxy(0,3,"Load list: -- "); |
|
- | 911 | } |
|
- | 912 | break; |
|
- | 913 | case 3: |
|
- | 914 | if(changed2 && load_waypoint_tmp2) HoTT_printfxy(0,4,"(Set -> Load)") |
|
- | 915 | else HoTT_printfxy(0,4," "); |
|
- | 916 | break; |
|
- | 917 | case 4: |
|
- | 918 | break; |
|
- | 919 | case 5: |
|
- | 920 | break; |
|
- | 921 | case 6: |
|
- | 922 | if(NaviData_WaypointNumber) HoTT_printfxy(0,6,"Active: %2d WPs",NaviData_WaypointNumber) |
|
- | 923 | else HoTT_printfxy(0,6,"No WPs active ") |
|
- | 924 | break; |
|
- | 925 | case 7: |
|
- | 926 | case 8: |
|
- | 927 | case 9: |
|
- | 928 | case 10: |
|
- | 929 | case 11: |
|
- | 930 | case 12: |
|
- | 931 | case 13: |
|
- | 932 | case 14: |
|
- | 933 | case 15: |
|
- | 934 | case 16: |
|
- | 935 | if(HottKeyboard == HOTT_KEY_UP && load_waypoint_tmp2 < 99) { changed2 = 1; load_waypoint_tmp2++;} |
|
- | 936 | else |
|
- | 937 | if(HottKeyboard == HOTT_KEY_DOWN && load_waypoint_tmp2) { changed2 = 1; load_waypoint_tmp2--;}; |
|
- | 938 | ||
- | 939 | if(HottKeyboard == HOTT_KEY_SET) { if(load_waypoint_tmp2) ToNC_Load_WP_List = load_waypoint_tmp2 | 128; changed2 = 0;} |
|
- | 940 | // else |
|
- | 941 | // if(HottKeyboard == HOTT_KEY_LEFT) { LIBFC_HoTT_Clear(); page = 5; line = 0;} |
|
- | 942 | else |
|
- | 943 | if(HottKeyboard == HOTT_KEY_RIGHT) { LIBFC_HoTT_Clear(); page = 3; line = 0;}; |
|
- | 944 | HottKeyboard = 0; |
|
- | 945 | break; |
|
- | 946 | default: line = 0; |
|
- | 947 | break; |
|
- | 948 | } |
|
- | 949 | ||
832 | /* else |
950 | /* else |
833 | if(page == 3) |
951 | if(page == 3) |
834 | switch(line++) |
952 | switch(line++) |
835 | { |
953 | { |
836 | case 0: |
954 | case 0: |