comparison Discovery/Src/tMenuEditSystem.c @ 444:f2c4f5c90540 minor_improvments

Introduced enum for lower left corner view selection: Enums allow changes in view configuration without danger of index inconsistencies
author ideenmodellierer
date Sat, 29 Feb 2020 22:27:29 +0100
parents 8851702173e0
children f1257a32f2d4
comparison
equal deleted inserted replaced
443:a5101c688b49 444:f2c4f5c90540
874 text[2] = ' '; 874 text[2] = ' ';
875 text[3] = ' '; 875 text[3] = ' ';
876 switch(settingsGetPointer()->tX_userselectedLeftLowerCornerPrimary) 876 switch(settingsGetPointer()->tX_userselectedLeftLowerCornerPrimary)
877 { 877 {
878 /* Temperature */ 878 /* Temperature */
879 case 1: 879 case LLC_Temperature:
880 text[4] = TXT_Temperature; 880 text[4] = TXT_Temperature;
881 break; 881 break;
882 /* Average Depth */ 882 /* Average Depth */
883 case 2: 883 case LLC_AverageDepth:
884 text[4] = TXT_AvgDepth; 884 text[4] = TXT_AvgDepth;
885 break; 885 break;
886 /* ppO2 */ 886 /* ppO2 */
887 case 3: 887 case LLC_ppO2:
888 text[4] = TXT_ppO2; 888 text[4] = TXT_ppO2;
889 break; 889 break;
890 /* Stop Uhr */ 890 /* Stop Uhr */
891 case 4: 891 case LLC_Stopwatch:
892 text[4] = TXT_Stopwatch; 892 text[4] = TXT_Stopwatch;
893 break; 893 break;
894 /* Ceiling */ 894 /* Ceiling */
895 case 5: 895 case LLC_Ceiling:
896 text[4] = TXT_Ceiling; 896 text[4] = TXT_Ceiling;
897 break; 897 break;
898 /* Future TTS */ 898 /* Future TTS */
899 case 6: 899 case LLC_FutureTTS:
900 text[4] = TXT_FutureTTS; 900 text[4] = TXT_FutureTTS;
901 break; 901 break;
902 /* CNS */ 902 /* CNS */
903 case 7: 903 case LLC_CNS:
904 text[4] = TXT_CNS; 904 text[4] = TXT_CNS;
905 break; 905 break;
906 case 8: 906 case LLC_GF:
907 text[4] = TXT_ActualGradient; 907 text[4] = TXT_ActualGradient;
908 break; 908 break;
909 case LCC_BottleBar:
910 text[4] = TXT_AtemGasVorrat;
911 break;
909 /* none */ 912 /* none */
910 case 0: 913 case 0:
911 text[4] = '-'; 914 text[4] = '-';
912 break; 915 break;
913 default: 916 default:
1078 uint8_t value; 1081 uint8_t value;
1079 value = settingsGetPointer()->tX_userselectedLeftLowerCornerPrimary; 1082 value = settingsGetPointer()->tX_userselectedLeftLowerCornerPrimary;
1080 1083
1081 value += 1; 1084 value += 1;
1082 1085
1083 if(value > 8) 1086 if(value >= LLC_END)
1084 value = 0; 1087 value = 0;
1085 1088
1086 settingsGetPointer()->tX_userselectedLeftLowerCornerPrimary = value; 1089 settingsGetPointer()->tX_userselectedLeftLowerCornerPrimary = value;
1087 return UPDATE_DIVESETTINGS; 1090 return UPDATE_DIVESETTINGS;
1088 } 1091 }