comparison Discovery/Src/t5_gauge.c @ 413:65c7b009136f Improment_NVM

Bugfix Flipdisplay Gauge and Apnoe mode: Changes needed to provide the same look and feel like in standard mode were not applied. Added missinng functions.
author ideenmodellierer
date Tue, 14 Jan 2020 21:10:37 +0100
parents 39c147e47c1c
children 0a09afac969f
comparison
equal deleted inserted replaced
412:b3ab85121e4d 413:65c7b009136f
93 } 93 }
94 94
95 95
96 void t5_init(void) 96 void t5_init(void)
97 { 97 {
98 SSettings* pSettings;
99 pSettings = settingsGetPointer();
100
98 t5_selection_customview = t5_customviewsStandard[0]; 101 t5_selection_customview = t5_customviewsStandard[0];
99 102
100 t5screen.FBStartAdress = 0; 103 t5screen.FBStartAdress = 0;
101 t5screen.ImageHeight = 480; 104 t5screen.ImageHeight = 480;
102 t5screen.ImageWidth = 800; 105 t5screen.ImageWidth = 800;
103 t5screen.LayerIndex = 1; 106 t5screen.LayerIndex = 1;
104 107
105 t5l1.Image = &t5screen; 108 t5l1.Image = &t5screen;
106 t5l1.WindowNumberOfTextLines = 2; 109 t5l1.WindowNumberOfTextLines = 2;
107 t5l1.WindowLineSpacing = 19; // Abstand von Y0 110 t5l1.WindowLineSpacing = 19; // Abstand von Y0
108 t5l1.WindowTab = 100; 111 t5l1.WindowTab = 100;
109 t5l1.WindowX0 = 0; 112 if(!pSettings->FlipDisplay)
110 t5l1.WindowX1 = BigFontSeperationLeftRight - 5; 113 {
111 t5l1.WindowY0 = BigFontSeperationTopBottom + 5; 114 t5l1.WindowX0 = 0;
112 t5l1.WindowY1 = 479; 115 t5l1.WindowX1 = BigFontSeperationLeftRight - 5;
116 t5l1.WindowY0 = BigFontSeperationTopBottom + 5;
117 t5l1.WindowY1 = 479;
118 }
119 else
120 {
121 t5l1.WindowX0 = 800 - BigFontSeperationLeftRight + 5;
122 t5l1.WindowX1 = 799;
123 t5l1.WindowY0 = 0;
124 t5l1.WindowY1 = 479 - BigFontSeperationTopBottom + 5 ;
125 }
113 126
114 t5r1.Image = &t5screen; 127 t5r1.Image = &t5screen;
115 t5r1.WindowNumberOfTextLines = t5l1.WindowNumberOfTextLines; 128 t5r1.WindowNumberOfTextLines = t5l1.WindowNumberOfTextLines;
116 t5r1.WindowLineSpacing = t5l1.WindowLineSpacing; 129 t5r1.WindowLineSpacing = t5l1.WindowLineSpacing;
117 t5r1.WindowTab = t5l1.WindowTab; 130 t5r1.WindowTab = t5l1.WindowTab;
118 t5r1.WindowX0 = BigFontSeperationLeftRight + 5; 131 if(!pSettings->FlipDisplay)
119 t5r1.WindowX1 = 799; 132 {
133 t5r1.WindowX0 = BigFontSeperationLeftRight + 5;
134 t5r1.WindowX1 = 799;
135 }
136 else
137 {
138 t5r1.WindowX0 = 0;
139 t5r1.WindowX1 = BigFontSeperationLeftRight - 5;
140 }
120 t5r1.WindowY0 = t5l1.WindowY0; 141 t5r1.WindowY0 = t5l1.WindowY0;
121 t5r1.WindowY1 = t5l1.WindowY1; 142 t5r1.WindowY1 = t5l1.WindowY1;
122 143
123 t5c1.Image = &t5screen; 144 t5c1.Image = &t5screen;
124 t5c1.WindowNumberOfTextLines = 2; 145 t5c1.WindowNumberOfTextLines = 2;
125 t5c1.WindowLineSpacing = t5l1.WindowLineSpacing; 146 t5c1.WindowLineSpacing = t5l1.WindowLineSpacing;
126 t5c1.WindowX0 = 0; 147 t5c1.WindowX0 = 0;
127 t5c1.WindowX1 = 799; 148 t5c1.WindowX1 = 799;
128 t5c1.WindowY0 = 0; 149 if(!pSettings->FlipDisplay)
129 t5c1.WindowY1 = BigFontSeperationTopBottom - 5; 150 {
151 t5c1.WindowY0 = 0;
152 t5c1.WindowY1 = BigFontSeperationTopBottom - 5;
153 }
154 else
155 {
156 t5c1.WindowY0 = 480 - BigFontSeperationTopBottom + 5;
157 t5c1.WindowY1 = 479;
158 }
130 159
131 t5c2.Image = &t5screen; 160 t5c2.Image = &t5screen;
132 t5c2.WindowNumberOfTextLines = 3; 161 t5c2.WindowNumberOfTextLines = 3;
133 t5c2.WindowLineSpacing = 58; 162 t5c2.WindowLineSpacing = 58;
134 t5c2.WindowX0 = 370; 163 t5c2.WindowX0 = 370;
141 t5c3.WindowNumberOfTextLines = 1; 170 t5c3.WindowNumberOfTextLines = 1;
142 t5c3.WindowLineSpacing = 0; // Abstand von Y0 171 t5c3.WindowLineSpacing = 0; // Abstand von Y0
143 t5c3.WindowTab = 100; 172 t5c3.WindowTab = 100;
144 t5c3.WindowX0 = CUSTOMBOX_LINE_LEFT + CUSTOMBOX_INSIDE_OFFSET; 173 t5c3.WindowX0 = CUSTOMBOX_LINE_LEFT + CUSTOMBOX_INSIDE_OFFSET;
145 t5c3.WindowX1 = CUSTOMBOX_LINE_RIGHT - CUSTOMBOX_INSIDE_OFFSET; 174 t5c3.WindowX1 = CUSTOMBOX_LINE_RIGHT - CUSTOMBOX_INSIDE_OFFSET;
146 t5c3.WindowY0 = 0; 175 if(!pSettings->FlipDisplay)
147 t5c3.WindowY1 = 69; 176 {
177 t5c3.WindowY0 = 0;
178 t5c3.WindowY1 = 69;
179 }
180 else
181 {
182 t5c3.WindowY0 = 480 - 69;
183 t5c3.WindowY1 = 479;
184 }
148 } 185 }
149 186
150 187
151 void t5_refresh(void) 188 void t5_refresh(void)
152 { 189 {