comparison Discovery/Src/t7.c @ 160:e3ca52b8e7fa

Merge with FlipDisplay
author heinrichsweikamp
date Thu, 07 Mar 2019 15:06:43 +0100
parents e1d66bc78f9a
children 255eedad4155
comparison
equal deleted inserted replaced
80:cc2bb7bb8456 160:e3ca52b8e7fa
27 ////////////////////////////////////////////////////////////////////////////// 27 //////////////////////////////////////////////////////////////////////////////
28 28
29 /* Includes ------------------------------------------------------------------*/ 29 /* Includes ------------------------------------------------------------------*/
30 #include "t7.h" 30 #include "t7.h"
31 31
32 //#include "bonexConnect.h"
33 #include "data_exchange_main.h" 32 #include "data_exchange_main.h"
34 #include "decom.h" 33 #include "decom.h"
35 #include "gfx_fonts.h" 34 #include "gfx_fonts.h"
36 #include "logbook_miniLive.h" 35 #include "logbook_miniLive.h"
37 #include "math.h" 36 #include "math.h"
51 50
52 void draw_frame(_Bool PluginBoxHeader, _Bool LinesOnTheSides, uint8_t colorBox, uint8_t colorLinesOnTheSide); 51 void draw_frame(_Bool PluginBoxHeader, _Bool LinesOnTheSides, uint8_t colorBox, uint8_t colorLinesOnTheSide);
53 52
54 void t7_tissues(const SDiveState * pState); 53 void t7_tissues(const SDiveState * pState);
55 void t7_compass(uint16_t ActualHeading, uint16_t UserSetHeading); 54 void t7_compass(uint16_t ActualHeading, uint16_t UserSetHeading);
56 void t7_scooter(void);
57 void t7_SummaryOfLeftCorner(void); 55 void t7_SummaryOfLeftCorner(void);
58 void t7_debug(void); 56 void t7_debug(void);
59 57
60 void t7_miniLiveLogProfile(void); 58 void t7_miniLiveLogProfile(void);
61 //void t7_clock(void); 59 //void t7_clock(void);
142 CVIEW_sensors_mV, 140 CVIEW_sensors_mV,
143 CVIEW_END, 141 CVIEW_END,
144 CVIEW_END 142 CVIEW_END
145 }; 143 };
146 144
147 const uint8_t customviewsDiveScooter[] =
148 {
149 CVIEW_Scooter,
150 CVIEW_sensors,
151 CVIEW_Compass,
152 CVIEW_Decolist,
153 CVIEW_Tissues,
154 CVIEW_Profile,
155 CVIEW_Gaslist,
156 CVIEW_sensors_mV,
157 CVIEW_EADTime,
158 CVIEW_SummaryOfLeftCorner,
159 CVIEW_noneOrDebug,
160 CVIEW_END,
161 CVIEW_END
162 };
163
164 const uint8_t customviewsSurfaceScooter[] =
165 {
166 // CVIEW_CompassDebug,
167 CVIEW_Scooter,
168 CVIEW_Hello,
169 CVIEW_sensors,
170 CVIEW_Compass,
171 CVIEW_Tissues,
172 CVIEW_sensors_mV,
173 CVIEW_END,
174 CVIEW_END
175 };
176
177 const uint8_t *customviewsDive = customviewsDiveStandard; 145 const uint8_t *customviewsDive = customviewsDiveStandard;
178 const uint8_t *customviewsSurface = customviewsSurfaceStandard; 146 const uint8_t *customviewsSurface = customviewsSurfaceStandard;
179 147
180 #define TEXTSIZE 16 148 #define TEXTSIZE 16
181 /* offset includes line: 2 = line +1 149 /* offset includes line: 2 = line +1
185 * right of box are 249 px (551 .. 799) 153 * right of box are 249 px (551 .. 799)
186 */ 154 */
187 155
188 #define CUSTOMBOX_LINE_LEFT (250) 156 #define CUSTOMBOX_LINE_LEFT (250)
189 #define CUSTOMBOX_LINE_RIGHT (549) 157 #define CUSTOMBOX_LINE_RIGHT (549)
158 #define CUSTOMBOX_LINE_TOP (0)
159 #define CUSTOMBOX_LINE_MIDDLE (142)
160 #define CUSTOMBOX_LINE_BOTTOM (318)
190 #define CUSTOMBOX_INSIDE_OFFSET (2) 161 #define CUSTOMBOX_INSIDE_OFFSET (2)
191 #define CUSTOMBOX_OUTSIDE_OFFSET (2) 162 #define CUSTOMBOX_OUTSIDE_OFFSET (2)
192 #define CUSTOMBOX_SPACE_INSIDE (CUSTOMBOX_LINE_RIGHT + 1 - (CUSTOMBOX_LINE_LEFT + CUSTOMBOX_INSIDE_OFFSET + CUSTOMBOX_INSIDE_OFFSET)) 163 #define CUSTOMBOX_SPACE_INSIDE (CUSTOMBOX_LINE_RIGHT + 1 - (CUSTOMBOX_LINE_LEFT + CUSTOMBOX_INSIDE_OFFSET + CUSTOMBOX_INSIDE_OFFSET))
193 164 #define TOP_LINE_HIGHT (25)
194 165
195 /* Exported functions --------------------------------------------------------*/ 166 /* Exported functions --------------------------------------------------------*/
196 167
197 void t7_init(void) 168 void t7_init(void)
198 { 169 {
199 if(getLicence() == LICENCEBONEX) 170
200 { 171 SSettings* pSettings;
201 customviewsDive = customviewsDiveScooter; 172 pSettings = settingsGetPointer();
202 customviewsSurface = customviewsSurfaceScooter;
203 }
204 173
205 selection_custom_field = 1; 174 selection_custom_field = 1;
206 selection_customview = customviewsSurface[0]; 175 selection_customview = customviewsSurface[0];
207 176
208 t7screen.FBStartAdress = 0; 177 t7screen.FBStartAdress = 0;
213 t7screenCompass.FBStartAdress = 0; 182 t7screenCompass.FBStartAdress = 0;
214 t7screenCompass.ImageHeight = 240; 183 t7screenCompass.ImageHeight = 240;
215 t7screenCompass.ImageWidth = 1600; 184 t7screenCompass.ImageWidth = 1600;
216 t7screenCompass.LayerIndex = 0; 185 t7screenCompass.LayerIndex = 0;
217 186
187 if(!pSettings->FlipDisplay)
188 {
189 t7l1.Image = &t7screen;
190 t7l1.WindowNumberOfTextLines = 2;
191 t7l1.WindowLineSpacing = 19; // Abstand von Y0
192 t7l1.WindowTab = 100; // vermtl. ohne Verwendung in diesem Fenster
193 t7l1.WindowX0 = 0;
194 t7l1.WindowX1 = CUSTOMBOX_LINE_LEFT - CUSTOMBOX_OUTSIDE_OFFSET;
195 t7l1.WindowY0 = 318;
196 t7l1.WindowY1 = 479;
197
198 t7l2.Image = &t7screen;
199 t7l2.WindowNumberOfTextLines = 2;
200 t7l2.WindowLineSpacing = 22; // Abstand von Y0
201 t7l2.WindowTab = 100; // vermtl. ohne Verwendung in diesem Fenster
202 t7l2.WindowX0 = 0;
203 t7l2.WindowX1 = t7l1.WindowX1;
204 t7l2.WindowY0 = 142;
205 t7l2.WindowY1 = t7l1.WindowY0 - 5;
206
207 t7l3.Image = &t7screen;
208 t7l3.WindowNumberOfTextLines = 2;
209 t7l3.WindowLineSpacing = 58; // Abstand von Y0
210 t7l3.WindowTab = 100; // vermtl. ohne Verwendung in diesem Fenster
211 t7l3.WindowX0 = 0;
212 t7l3.WindowX1 = t7l1.WindowX1;
213 t7l3.WindowY0 = 0;
214 t7l3.WindowY1 = t7l2.WindowY0 - 5;
215
216 t7r1.Image = &t7screen;
217 t7r1.WindowNumberOfTextLines = 2;
218 t7r1.WindowLineSpacing = t7l1.WindowLineSpacing;
219 t7r1.WindowTab = 100;
220 t7r1.WindowX0 = 550;
221 t7r1.WindowX1 = 799;
222 t7r1.WindowY0 = t7l1.WindowY0;
223 t7r1.WindowY1 = 479;
224
225 t7r2.Image = &t7screen;
226 t7r2.WindowNumberOfTextLines = 2;
227 t7r2.WindowLineSpacing = t7l2.WindowLineSpacing;
228 t7r2.WindowTab = 100;
229 t7r2.WindowX0 = 550;
230 t7r2.WindowX1 = 799;
231 t7r2.WindowY0 = t7l2.WindowY0;
232 t7r2.WindowY1 = t7l2.WindowY1;
233
234 t7r3.Image = &t7screen;
235 t7r3.WindowNumberOfTextLines = 2;
236 t7r3.WindowLineSpacing = 0;//t7l3.WindowLineSpacing;
237 t7r3.WindowTab = 100;
238 t7r3.WindowX0 = CUSTOMBOX_LINE_RIGHT + CUSTOMBOX_OUTSIDE_OFFSET;
239 t7r3.WindowX1 = 799;
240 t7r3.WindowY0 = t7l3.WindowY0;
241 t7r3.WindowY1 = t7l3.WindowY1;
242
243 t7cC.Image = &t7screen;
244 t7cC.WindowNumberOfTextLines = 3;
245 t7cC.WindowLineSpacing = 95; // Abstand von Y0
246 t7cC.WindowTab = 100;
247 t7cC.WindowX0 = CUSTOMBOX_LINE_LEFT + CUSTOMBOX_INSIDE_OFFSET;
248 t7cC.WindowX1 = CUSTOMBOX_LINE_RIGHT - CUSTOMBOX_INSIDE_OFFSET;
249 t7cC.WindowY0 = 90;
250 t7cC.WindowY1 = 434 - 95;
251
252 t7cH.Image = &t7screen;
253 t7cH.WindowNumberOfTextLines = 1;
254 t7cH.WindowLineSpacing = 95; // Abstand von Y0
255 t7cH.WindowTab = 100;
256 t7cH.WindowX0 = CUSTOMBOX_LINE_LEFT + CUSTOMBOX_INSIDE_OFFSET;
257 t7cH.WindowX1 = CUSTOMBOX_LINE_RIGHT - CUSTOMBOX_INSIDE_OFFSET;
258 t7cH.WindowY0 = 434 - 94;
259 t7cH.WindowY1 = 434;
260
261 t7cW.Image = &t7screen;
262 t7cW.WindowNumberOfTextLines = 3;
263 t7cW.WindowLineSpacing = 95; // Abstand von Y0
264 t7cW.WindowTab = 100;
265 t7cW.WindowX0 = CUSTOMBOX_LINE_LEFT + CUSTOMBOX_INSIDE_OFFSET;
266 t7cW.WindowX1 = CUSTOMBOX_LINE_RIGHT - CUSTOMBOX_INSIDE_OFFSET;
267 t7cW.WindowY0 = 90;
268 t7cW.WindowY1 = 434 - 95;
269
270
271 t7surfaceL.Image = &t7screen;
272 t7surfaceL.WindowNumberOfTextLines = 9;
273 t7surfaceL.WindowLineSpacing = 53;
274 t7surfaceL.WindowTab = 100;
275 t7surfaceL.WindowX0 = 0;
276 t7surfaceL.WindowX1 = CUSTOMBOX_LINE_LEFT - CUSTOMBOX_OUTSIDE_OFFSET;
277 t7surfaceL.WindowY0 = 0;
278 t7surfaceL.WindowY1 = 480;
279
280 t7surfaceR.Image = &t7screen;
281 t7surfaceR.WindowNumberOfTextLines = 9;
282 t7surfaceR.WindowLineSpacing = 53;
283 t7surfaceR.WindowTab = 100;
284 t7surfaceR.WindowX0 = CUSTOMBOX_LINE_RIGHT + CUSTOMBOX_OUTSIDE_OFFSET;
285 t7surfaceR.WindowX1 = 800;
286 t7surfaceR.WindowY0 = 0;
287 t7surfaceR.WindowY1 = 480;
288
289 t7cY0free.Image = &t7screen;
290 t7cY0free.WindowNumberOfTextLines = 1;
291 t7cY0free.WindowLineSpacing = 95;
292 t7cY0free.WindowTab = 100;
293 t7cY0free.WindowX0 = CUSTOMBOX_LINE_LEFT + CUSTOMBOX_INSIDE_OFFSET;
294 t7cY0free.WindowX1 = CUSTOMBOX_LINE_RIGHT - CUSTOMBOX_INSIDE_OFFSET;
295 t7cY0free.WindowY0 = 90;
296 t7cY0free.WindowY1 = 434 - 95;
297
298 t7batt.Image = &t7screen;
299 t7batt.WindowNumberOfTextLines = 1;
300 t7batt.WindowLineSpacing = 10;
301 t7batt.WindowTab = 100;
302 t7batt.WindowX1 = CUSTOMBOX_LINE_RIGHT - CUSTOMBOX_INSIDE_OFFSET;
303 t7batt.WindowX0 = t7batt.WindowX1 - (52+52);
304 t7batt.WindowY1 = 479;
305 t7batt.WindowY0 = t7batt.WindowY1 - 25;
306
307 t7charge.Image = &t7screen;
308 t7charge.WindowNumberOfTextLines = 1;
309 t7charge.WindowLineSpacing = 10;
310 t7charge.WindowTab = 100;
311 t7charge.WindowX1 = t7batt.WindowX1 - 18;
312 t7charge.WindowX0 = t7charge.WindowX1 - 14;
313 t7charge.WindowY1 = 479;
314 t7charge.WindowY0 = t7batt.WindowY1 - 25;
315
316 t7voltage.Image = &t7screen;
317 t7voltage.WindowNumberOfTextLines = 1;
318 t7voltage.WindowLineSpacing = 10;
319 t7voltage.WindowTab = 100;
320 t7voltage.WindowX0 = t7charge.WindowX0 - 10;
321 t7voltage.WindowX1 = t7voltage.WindowX0 + (18*3)+ 9;
322 t7voltage.WindowY1 = 479;
323 t7voltage.WindowY0 = t7batt.WindowY1 - 25;
324
325 t7c1.Image = &t7screen;
326 t7c1.WindowNumberOfTextLines = 1;
327 t7c1.WindowLineSpacing = 10;
328 t7c1.WindowTab = 100;
329 t7c1.WindowX0 = CUSTOMBOX_LINE_LEFT + CUSTOMBOX_INSIDE_OFFSET;
330 t7c1.WindowX1 = t7batt.WindowX0 - 18;
331 t7c1.WindowY0 = 435;
332 t7c1.WindowY1 = 479;
333
334 t7c2.Image = &t7screen;
335 t7c2.WindowNumberOfTextLines = 1;
336 t7c2.WindowLineSpacing = 0; // Abstand von Y0
337 t7c2.WindowTab = 100;
338 t7c2.WindowX0 = CUSTOMBOX_LINE_LEFT + CUSTOMBOX_INSIDE_OFFSET;
339 t7c2.WindowX1 = CUSTOMBOX_LINE_RIGHT - CUSTOMBOX_INSIDE_OFFSET;
340 t7c2.WindowY0 = 0;
341 t7c2.WindowY1 = 69;
342
343 t7pCompass.Image = &t7screenCompass;
344 t7pCompass.WindowNumberOfTextLines = 1;
345 t7pCompass.WindowLineSpacing = 100; // Abstand von Y0
346 t7pCompass.WindowTab = 100;
347 t7pCompass.WindowX0 = 0;
348 t7pCompass.WindowX1 = 1600-1;
349 t7pCompass.WindowY0 = 0;
350 t7pCompass.WindowY1 = 100-1;
351 }
352 else
353 {
354 /* 6 segments (left / right) used to show data during dive */
355
218 t7l1.Image = &t7screen; 356 t7l1.Image = &t7screen;
219 t7l1.WindowNumberOfTextLines = 2; 357 t7l1.WindowNumberOfTextLines = 2;
220 t7l1.WindowLineSpacing = 19; // Abstand von Y0 358 t7l1.WindowLineSpacing = 19; // Abstand von Y0
221 t7l1.WindowTab = 100; // vermtl. ohne Verwendung in diesem Fenster 359 t7l1.WindowTab = 100; // vermtl. ohne Verwendung in diesem Fenster
222 t7l1.WindowX0 = 0; 360 t7l1.WindowX0 = CUSTOMBOX_LINE_RIGHT + CUSTOMBOX_OUTSIDE_OFFSET;
223 t7l1.WindowX1 = CUSTOMBOX_LINE_LEFT - CUSTOMBOX_OUTSIDE_OFFSET; 361 t7l1.WindowX1 = 799;
224 t7l1.WindowY0 = 318; 362 t7l1.WindowY0 = CUSTOMBOX_LINE_TOP;
225 t7l1.WindowY1 = 479; 363 t7l1.WindowY1 = 150 + TOP_LINE_HIGHT;
226 364
227 t7l2.Image = &t7screen; 365 t7l2.Image = &t7screen;
228 t7l2.WindowNumberOfTextLines = 2; 366 t7l2.WindowNumberOfTextLines = 2;
229 t7l2.WindowLineSpacing = 22; // Abstand von Y0 367 t7l2.WindowLineSpacing = 22; // Abstand von Y0
230 t7l2.WindowTab = 100; // vermtl. ohne Verwendung in diesem Fenster 368 t7l2.WindowTab = 100; // vermtl. ohne Verwendung in diesem Fenster
231 t7l2.WindowX0 = 0; 369 t7l2.WindowX0 = t7l1.WindowX0;
232 t7l2.WindowX1 = t7l1.WindowX1; 370 t7l2.WindowX1 = t7l1.WindowX1;
233 t7l2.WindowY0 = 142; 371 t7l2.WindowY0 = t7l1.WindowY1 + 5;
234 t7l2.WindowY1 = t7l1.WindowY0 - 5; 372 t7l2.WindowY1 = t7l2.WindowY0 + 146;
235 373
236 t7l3.Image = &t7screen; 374 t7l3.Image = &t7screen;
237 t7l3.WindowNumberOfTextLines = 2; 375 t7l3.WindowNumberOfTextLines = 2;
238 t7l3.WindowLineSpacing = 58; // Abstand von Y0 376 t7l3.WindowLineSpacing = 58; // Abstand von Y0
239 t7l3.WindowTab = 100; // vermtl. ohne Verwendung in diesem Fenster 377 t7l3.WindowTab = 100; // vermtl. ohne Verwendung in diesem Fenster
240 t7l3.WindowX0 = 0; 378 t7l3.WindowX0 = t7l1.WindowX0;
241 t7l3.WindowX1 = t7l1.WindowX1; 379 t7l3.WindowX1 = t7l1.WindowX1;;
242 t7l3.WindowY0 = 0; 380 t7l3.WindowY0 = 479 - 150;
243 t7l3.WindowY1 = t7l2.WindowY0 - 5; 381 t7l3.WindowY1 = 479;
244 382
245 t7r1.Image = &t7screen; 383 t7r1.Image = &t7screen;
246 t7r1.WindowNumberOfTextLines = 2; 384 t7r1.WindowNumberOfTextLines = 2;
247 t7r1.WindowLineSpacing = t7l1.WindowLineSpacing; 385 t7r1.WindowLineSpacing = t7l1.WindowLineSpacing;
248 t7r1.WindowTab = 100; 386 t7r1.WindowTab = 100;
249 t7r1.WindowX0 = 550; 387 t7r1.WindowX0 = 0;
250 t7r1.WindowX1 = 799; 388 t7r1.WindowX1 = CUSTOMBOX_LINE_LEFT - CUSTOMBOX_OUTSIDE_OFFSET;
251 t7r1.WindowY0 = t7l1.WindowY0; 389 t7r1.WindowY0 = t7l1.WindowY0;
252 t7r1.WindowY1 = 479; 390 t7r1.WindowY1 = t7l1.WindowY1;
253 391
254 t7r2.Image = &t7screen; 392 t7r2.Image = &t7screen;
255 t7r2.WindowNumberOfTextLines = 2; 393 t7r2.WindowNumberOfTextLines = 2;
256 t7r2.WindowLineSpacing = t7l2.WindowLineSpacing; 394 t7r2.WindowLineSpacing = t7l2.WindowLineSpacing;
257 t7r2.WindowTab = 100; 395 t7r2.WindowTab = 100;
258 t7r2.WindowX0 = 550; 396 t7r2.WindowX0 = t7r1.WindowX0;
259 t7r2.WindowX1 = 799; 397 t7r2.WindowX1 = t7r1.WindowX1;
260 t7r2.WindowY0 = t7l2.WindowY0; 398 t7r2.WindowY0 = t7l2.WindowY0;
261 t7r2.WindowY1 = t7l2.WindowY1; 399 t7r2.WindowY1 = t7l2.WindowY1;
262 400
263 t7r3.Image = &t7screen; 401 t7r3.Image = &t7screen;
264 t7r3.WindowNumberOfTextLines = 2; 402 t7r3.WindowNumberOfTextLines = 2;
265 t7r3.WindowLineSpacing = 0;//t7l3.WindowLineSpacing; 403 t7r3.WindowLineSpacing = 0;//t7l3.WindowLineSpacing;
266 t7r3.WindowTab = 100; 404 t7r3.WindowTab = 100;
267 t7r3.WindowX0 = CUSTOMBOX_LINE_RIGHT + CUSTOMBOX_OUTSIDE_OFFSET; 405 t7r3.WindowX0 = t7r1.WindowX0;
268 t7r3.WindowX1 = 799; 406 t7r3.WindowX1 = t7r1.WindowX1;
269 t7r3.WindowY0 = t7l3.WindowY0; 407 t7r3.WindowY0 = t7l3.WindowY0;
270 t7r3.WindowY1 = t7l3.WindowY1; 408 t7r3.WindowY1 = t7l3.WindowY1;
271 409
410 /* screen for CustomText / serial number */
272 t7cC.Image = &t7screen; 411 t7cC.Image = &t7screen;
273 t7cC.WindowNumberOfTextLines = 3; 412 t7cC.WindowNumberOfTextLines = 3;
274 t7cC.WindowLineSpacing = 95; // Abstand von Y0 413 t7cC.WindowLineSpacing = 95; // Abstand von Y0
275 t7cC.WindowTab = 100; 414 t7cC.WindowTab = 100;
276 t7cC.WindowX0 = CUSTOMBOX_LINE_LEFT + CUSTOMBOX_INSIDE_OFFSET; 415 t7cC.WindowX0 = CUSTOMBOX_LINE_LEFT + CUSTOMBOX_INSIDE_OFFSET;
277 t7cC.WindowX1 = CUSTOMBOX_LINE_RIGHT - CUSTOMBOX_INSIDE_OFFSET; 416 t7cC.WindowX1 = CUSTOMBOX_LINE_RIGHT - CUSTOMBOX_INSIDE_OFFSET;
278 t7cC.WindowY0 = 90; 417 t7cC.WindowY0 = 165; //90;
279 t7cC.WindowY1 = 434 - 95; 418 t7cC.WindowY1 = 415;
280 419
420 /* used by warning message box */
281 t7cH.Image = &t7screen; 421 t7cH.Image = &t7screen;
282 t7cH.WindowNumberOfTextLines = 1; 422 t7cH.WindowNumberOfTextLines = 1;
283 t7cH.WindowLineSpacing = 95; // Abstand von Y0 423 t7cH.WindowLineSpacing = 95; // Abstand von Y0
284 t7cH.WindowTab = 100; 424 t7cH.WindowTab = 100;
285 t7cH.WindowX0 = CUSTOMBOX_LINE_LEFT + CUSTOMBOX_INSIDE_OFFSET; 425 t7cH.WindowX0 = CUSTOMBOX_LINE_LEFT + CUSTOMBOX_INSIDE_OFFSET;
286 t7cH.WindowX1 = CUSTOMBOX_LINE_RIGHT - CUSTOMBOX_INSIDE_OFFSET; 426 t7cH.WindowX1 = CUSTOMBOX_LINE_RIGHT - CUSTOMBOX_INSIDE_OFFSET;
287 t7cH.WindowY0 = 434 - 94; 427 t7cH.WindowY0 = 46; //480 - 434;
288 t7cH.WindowY1 = 434; 428 t7cH.WindowY1 = 390 - 46;// - 90; //46 + 390; //480 - (434 - 94); //434;
289 429
430 /* used by warning custom box */
290 t7cW.Image = &t7screen; 431 t7cW.Image = &t7screen;
291 t7cW.WindowNumberOfTextLines = 3; 432 t7cW.WindowNumberOfTextLines = 3;
292 t7cW.WindowLineSpacing = 95; // Abstand von Y0 433 t7cW.WindowLineSpacing = 95; // Abstand von Y0
293 t7cW.WindowTab = 100; 434 t7cW.WindowTab = 100;
294 t7cW.WindowX0 = CUSTOMBOX_LINE_LEFT + CUSTOMBOX_INSIDE_OFFSET; 435 t7cW.WindowX0 = CUSTOMBOX_LINE_LEFT + CUSTOMBOX_INSIDE_OFFSET;
295 t7cW.WindowX1 = CUSTOMBOX_LINE_RIGHT - CUSTOMBOX_INSIDE_OFFSET; 436 t7cW.WindowX1 = CUSTOMBOX_LINE_RIGHT - CUSTOMBOX_INSIDE_OFFSET;
296 t7cW.WindowY0 = 90; 437 t7cW.WindowY0 = 480 - (434 - 90);
297 t7cW.WindowY1 = 434 - 95; 438 t7cW.WindowY1 = 480 - 90; //434 - 95;
298 439
440 /* time and environment */
299 t7surfaceL.Image = &t7screen; 441 t7surfaceL.Image = &t7screen;
300 t7surfaceL.WindowNumberOfTextLines = 9; 442 t7surfaceL.WindowNumberOfTextLines = 9;
301 t7surfaceL.WindowLineSpacing = 53; 443 t7surfaceL.WindowLineSpacing = 53;
302 t7surfaceL.WindowTab = 100; 444 t7surfaceL.WindowTab = 100;
303 t7surfaceL.WindowX0 = 0; 445 t7surfaceL.WindowX0 = CUSTOMBOX_LINE_RIGHT + CUSTOMBOX_OUTSIDE_OFFSET;
304 t7surfaceL.WindowX1 = CUSTOMBOX_LINE_LEFT - CUSTOMBOX_OUTSIDE_OFFSET; 446 t7surfaceL.WindowX1 = 799;
305 t7surfaceL.WindowY0 = 0; 447 t7surfaceL.WindowY0 = 0;
306 t7surfaceL.WindowY1 = 480; 448 t7surfaceL.WindowY1 = 479;
307 449
308 t7surfaceR.Image = &t7screen; 450 t7surfaceR.Image = &t7screen;
309 t7surfaceR.WindowNumberOfTextLines = 9; 451 t7surfaceR.WindowNumberOfTextLines = 9;
310 t7surfaceR.WindowLineSpacing = 53; 452 t7surfaceR.WindowLineSpacing = 53;
311 t7surfaceR.WindowTab = 100; 453 t7surfaceR.WindowTab = 100;
312 t7surfaceR.WindowX0 = CUSTOMBOX_LINE_RIGHT + CUSTOMBOX_OUTSIDE_OFFSET; 454 t7surfaceR.WindowX0 = 0;
313 t7surfaceR.WindowX1 = 800; 455 t7surfaceR.WindowX1 = CUSTOMBOX_LINE_LEFT - CUSTOMBOX_OUTSIDE_OFFSET;
314 t7surfaceR.WindowY0 = 0; 456 t7surfaceR.WindowY0 = 0;
315 t7surfaceR.WindowY1 = 480; 457 t7surfaceR.WindowY1 = 479;
316 458
459 /* info screen in the middle */
317 t7cY0free.Image = &t7screen; 460 t7cY0free.Image = &t7screen;
318 t7cY0free.WindowNumberOfTextLines = 1; 461 t7cY0free.WindowNumberOfTextLines = 1;
319 t7cY0free.WindowLineSpacing = 95; 462 t7cY0free.WindowLineSpacing = 95;
320 t7cY0free.WindowTab = 100; 463 t7cY0free.WindowTab = 100;
321 t7cY0free.WindowX0 = CUSTOMBOX_LINE_LEFT + CUSTOMBOX_INSIDE_OFFSET; 464 t7cY0free.WindowX0 = CUSTOMBOX_LINE_LEFT + CUSTOMBOX_INSIDE_OFFSET;
322 t7cY0free.WindowX1 = CUSTOMBOX_LINE_RIGHT - CUSTOMBOX_INSIDE_OFFSET; 465 t7cY0free.WindowX1 = CUSTOMBOX_LINE_RIGHT - CUSTOMBOX_INSIDE_OFFSET;
323 t7cY0free.WindowY0 = 90; 466 t7cY0free.WindowY0 = 115;
324 t7cY0free.WindowY1 = 434 - 95; 467 t7cY0free.WindowY1 = 365;
325 468
469 /* voltage value (V or %) */
470 t7voltage.Image = &t7screen;
471 t7voltage.WindowNumberOfTextLines = 1;
472 t7voltage.WindowLineSpacing = 10;
473 t7voltage.WindowTab = 100;
474 t7voltage.WindowX0 = CUSTOMBOX_LINE_LEFT + CUSTOMBOX_INSIDE_OFFSET;
475 t7voltage.WindowX1 = t7voltage.WindowX0 + (18*3) +9;
476 t7voltage.WindowY1 = TOP_LINE_HIGHT;
477 t7voltage.WindowY0 = 0;
478
479 /* battery symbol */
326 t7batt.Image = &t7screen; 480 t7batt.Image = &t7screen;
327 t7batt.WindowNumberOfTextLines = 1; 481 t7batt.WindowNumberOfTextLines = 1;
328 t7batt.WindowLineSpacing = 10; 482 t7batt.WindowLineSpacing = 10;
329 t7batt.WindowTab = 100; 483 t7batt.WindowTab = 100;
330 t7batt.WindowX1 = CUSTOMBOX_LINE_RIGHT - CUSTOMBOX_INSIDE_OFFSET; 484 t7batt.WindowX0 = t7voltage.WindowX1;
331 t7batt.WindowX0 = t7batt.WindowX1 - (52+52); 485 t7batt.WindowX1 = t7batt.WindowX0 + (52);
332 t7batt.WindowY1 = 479; 486 t7batt.WindowY1 = TOP_LINE_HIGHT;
333 t7batt.WindowY0 = t7batt.WindowY1 - 25; 487 t7batt.WindowY0 = 0;
334 488
489 /* charger symbol */
335 t7charge.Image = &t7screen; 490 t7charge.Image = &t7screen;
336 t7charge.WindowNumberOfTextLines = 1; 491 t7charge.WindowNumberOfTextLines = 1;
337 t7charge.WindowLineSpacing = 10; 492 t7charge.WindowLineSpacing = 10;
338 t7charge.WindowTab = 100; 493 t7charge.WindowTab = 100;
339 t7charge.WindowX1 = t7batt.WindowX1 - 18; 494 t7charge.WindowX1 = t7batt.WindowX0 - 18;
340 t7charge.WindowX0 = t7charge.WindowX1 - 14; 495 t7charge.WindowX0 = t7charge.WindowX1 - 14;
341 t7charge.WindowY1 = 479; 496
342 t7charge.WindowY0 = t7batt.WindowY1 - 25; 497 t7charge.WindowY1 = TOP_LINE_HIGHT;
343 498 t7charge.WindowY0 = 0;
344 t7voltage.Image = &t7screen; 499
345 t7voltage.WindowNumberOfTextLines = 1; 500 /* show dive mode OC / CC */
346 t7voltage.WindowLineSpacing = 10;
347 t7voltage.WindowTab = 100;
348 t7voltage.WindowX0 = t7charge.WindowX0 - 10;
349 t7voltage.WindowX1 = t7voltage.WindowX0 + (18*3)+ 9;
350 t7voltage.WindowY1 = 479;
351 t7voltage.WindowY0 = t7batt.WindowY1 - 25;
352
353 t7c1.Image = &t7screen; 501 t7c1.Image = &t7screen;
354 t7c1.WindowNumberOfTextLines = 1; 502 t7c1.WindowNumberOfTextLines = 1;
355 t7c1.WindowLineSpacing = 10; 503 t7c1.WindowLineSpacing = 10;
356 t7c1.WindowTab = 100; 504 t7c1.WindowTab = 100;
357 t7c1.WindowX0 = CUSTOMBOX_LINE_LEFT + CUSTOMBOX_INSIDE_OFFSET; 505 t7c1.WindowX0 = t7batt.WindowX1 + 18; //CUSTOMBOX_LINE_LEFT + CUSTOMBOX_INSIDE_OFFSET;
358 t7c1.WindowX1 = t7batt.WindowX0 - 18; 506 t7c1.WindowX1 = CUSTOMBOX_LINE_RIGHT - CUSTOMBOX_INSIDE_OFFSET; //t7batt.WindowX1 + 18;
359 t7c1.WindowY0 = 435; 507 t7c1.WindowY0 = 0;
360 t7c1.WindowY1 = 479; 508 t7c1.WindowY1 = 479 - 435;
361 509
510 /* Gas warnings and exit Sim*/
362 t7c2.Image = &t7screen; 511 t7c2.Image = &t7screen;
363 t7c2.WindowNumberOfTextLines = 1; 512 t7c2.WindowNumberOfTextLines = 1;
364 t7c2.WindowLineSpacing = 0; // Abstand von Y0 513 t7c2.WindowLineSpacing = 0; // Abstand von Y0
365 t7c2.WindowTab = 100; 514 t7c2.WindowTab = 100;
366 t7c2.WindowX0 = CUSTOMBOX_LINE_LEFT + CUSTOMBOX_INSIDE_OFFSET; 515 t7c2.WindowX0 = CUSTOMBOX_LINE_LEFT + CUSTOMBOX_INSIDE_OFFSET;
367 t7c2.WindowX1 = CUSTOMBOX_LINE_RIGHT - CUSTOMBOX_INSIDE_OFFSET; 516 t7c2.WindowX1 = CUSTOMBOX_LINE_RIGHT - CUSTOMBOX_INSIDE_OFFSET;
368 t7c2.WindowY0 = 0; 517 t7c2.WindowY0 = 480 - 69;
369 t7c2.WindowY1 = 69; 518 t7c2.WindowY1 = 479;
370 519
520 /* Rotating compass */
371 t7pCompass.Image = &t7screenCompass; 521 t7pCompass.Image = &t7screenCompass;
372 t7pCompass.WindowNumberOfTextLines = 1; 522 t7pCompass.WindowNumberOfTextLines = 1;
373 t7pCompass.WindowLineSpacing = 100; // Abstand von Y0 523 t7pCompass.WindowLineSpacing = 100; // Abstand von Y0
374 t7pCompass.WindowTab = 100; 524 t7pCompass.WindowTab = 100;
375 t7pCompass.WindowX0 = 0; 525 t7pCompass.WindowX0 = 0;
376 t7pCompass.WindowX1 = 1600-1; 526 t7pCompass.WindowX1 = 1600-1;
377 t7pCompass.WindowY0 = 0; 527 t7pCompass.WindowY0 = 479 - 75;
378 t7pCompass.WindowY1 = 100-1; 528 t7pCompass.WindowY1 = 479;
529
530 }
379 531
380 init_t7_compass(); 532 init_t7_compass();
381 } 533 }
382 534
383 535
439 settingsGetPointer()->design = 6; 591 settingsGetPointer()->design = 6;
440 releaseAllFramesExcept(22,t7screen.FBStartAdress); 592 releaseAllFramesExcept(22,t7screen.FBStartAdress);
441 releaseFrame(22,t7screen.FBStartAdress); 593 releaseFrame(22,t7screen.FBStartAdress);
442 return; 594 return;
443 } 595 }
444 else if(DataEX_scooterFoundAndValidLicence()) // new for t9 hw 160711
445 {
446 settingsGetPointer()->design = 9;
447 releaseAllFramesExcept(22,t7screen.FBStartAdress);
448 releaseFrame(22,t7screen.FBStartAdress);
449 return;
450 }
451 else 596 else
452 { 597 {
453 t7_refresh_divemode(); 598 t7_refresh_divemode();
454 } 599 }
455 } 600 }
536 681
537 uint8_t oxygen_percentage, gasOffset, actualGasID; 682 uint8_t oxygen_percentage, gasOffset, actualGasID;
538 // uint16_t bottleFirstGas_bar; 683 // uint16_t bottleFirstGas_bar;
539 point_t start, stop;//, other; 684 point_t start, stop;//, other;
540 685
686 SSettings* pSettings;
687 pSettings = settingsGetPointer();
688
689
541 // update in all customview modes 690 // update in all customview modes
542 if(DataEX_check_RTE_version__needs_update() || font_update_required()) 691 if(DataEX_check_RTE_version__needs_update() || font_update_required())
543 updateNecessary = 1; 692 updateNecessary = 1;
544 else 693 else
545 updateNecessary = 0; 694 updateNecessary = 0;
546 695
547 /* buttons */ 696 /* buttons */
548 text[0] = TXT_2BYTE; 697 text[0] = TXT_2BYTE;
549 text[1] = TXT2BYTE_ButtonLogbook; 698 text[1] = TXT2BYTE_ButtonLogbook;
550 text[2] = 0; 699 text[2] = 0;
551 write_content_simple(&t7screen, 0, 800, 480-24, &FontT24,text,CLUT_ButtonSurfaceScreen); 700 write_content_simple(&t7screen, 0, 799, 479-TOP_LINE_HIGHT, &FontT24,text,CLUT_ButtonSurfaceScreen);
552 701
553 text[0] = '\001'; 702 text[0] = '\001';
554 text[1] = TXT_2BYTE; 703 text[1] = TXT_2BYTE;
555 text[2] = TXT2BYTE_ButtonView; 704 text[2] = TXT2BYTE_ButtonView;
556 text[3] = 0; 705 text[3] = 0;
557 write_content_simple(&t7screen, 0, 800, 480-24, &FontT24,text,CLUT_ButtonSurfaceScreen); 706 write_content_simple(&t7screen, 0, 799, 479-TOP_LINE_HIGHT, &FontT24,text,CLUT_ButtonSurfaceScreen);
558 707
559 text[0] = '\002'; 708 text[0] = '\002';
560 text[1] = TXT_2BYTE; 709 text[1] = TXT_2BYTE;
561 text[2] = TXT2BYTE_ButtonMenu; 710 text[2] = TXT2BYTE_ButtonMenu;
562 text[3] = 0; 711 text[3] = 0;
563 write_content_simple(&t7screen, 0, 800, 480-24, &FontT24,text,CLUT_ButtonSurfaceScreen); 712 write_content_simple(&t7screen, 0, 799, 479-TOP_LINE_HIGHT, &FontT24,text,CLUT_ButtonSurfaceScreen);
564
565 /*
566 // scooter connected?
567 if(bC_getData(0,0,0,0) == BC_CONNECTED)
568 {
569 text[0] = '\f';
570 text[1] = '\002';
571 memcpy(&text[2],&settingsGetPointer()->scooterDeviceName,19);
572 text[21] = 0;
573 GFX_write_string_color(&FontT24,&t7r1,text,0,CLUT_NiceGreen);
574 }
575 */
576 713
577 /* was power on reset */ 714 /* was power on reset */
578 //..... 715 //.....
579 /* removed hw 160802 in V1.1.1 716 /* removed hw 160802 in V1.1.1
580 if(errorsInSettings) 717 if(errorsInSettings)
773 } 910 }
774 911
775 /* surface pressure and temperature */ 912 /* surface pressure and temperature */
776 if(stateUsed->sensorErrorsRTE == 0) 913 if(stateUsed->sensorErrorsRTE == 0)
777 { 914 {
778 snprintf(text,30,"%01.0f\022\016\016 mbar", stateUsed->lifeData.pressure_surface_bar * 1000.0f); 915 snprintf(text,30,"%01.0f\022\016\016 %s", stateUsed->lifeData.pressure_surface_bar * 1000.0f,TEXT_PRESSURE_UNIT);
779 GFX_write_string(&FontT48,&t7surfaceL,text,3); 916 GFX_write_string(&FontT48,&t7surfaceL,text,3);
780 917
781 if(settingsGetPointer()->nonMetricalSystem) 918 if(settingsGetPointer()->nonMetricalSystem)
782 snprintf(text,40,"%01.0f\140\022\016\016 fahrenheit",unit_temperature_float(stateUsed->lifeData.temperature_celsius)); 919 snprintf(text,40,"%01.0f\140\022\016\016 fahrenheit",unit_temperature_float(stateUsed->lifeData.temperature_celsius));
783 else 920 else
784 snprintf(text,30,"%01.0f\140\022\016\016 celsius",stateUsed->lifeData.temperature_celsius); 921 snprintf(text,30,"%01.0f\140\022\016\016 celsius",stateUsed->lifeData.temperature_celsius);
785 GFX_write_string(&FontT48,&t7surfaceL,text,4); 922 GFX_write_string(&FontT48,&t7surfaceL,text,4);
786 } 923 }
787 else 924 else
788 { 925 {
789 snprintf(text,30,"ERR\022\016\016 mbar"); 926 snprintf(text,30,"ERR\022\016\016 %s",TEXT_PRESSURE_UNIT);
790 GFX_write_string(&FontT48,&t7surfaceL,text,3); 927 GFX_write_string(&FontT48,&t7surfaceL,text,3);
791 928
792 if(settingsGetPointer()->nonMetricalSystem) 929 if(settingsGetPointer()->nonMetricalSystem)
793 snprintf(text,40,"ERR\022\016\016 fahrenheit"); 930 snprintf(text,40,"ERR\022\016\016 fahrenheit");
794 else 931 else
863 } 1000 }
864 */ 1001 */
865 // after gas name :-) 1002 // after gas name :-)
866 if(actualGasID > gasOffset) // security 1003 if(actualGasID > gasOffset) // security
867 { 1004 {
868 start.y = t7surfaceL.WindowY0 + (3 * t7surfaceL.WindowLineSpacing); 1005 if(!pSettings->FlipDisplay)
869 start.x = t7surfaceL.WindowX0 + ((stateUsed->lifeData.actualGas.GasIdInSettings - gasOffset - 1) * 35); 1006 {
1007 start.y = t7surfaceL.WindowY0 + (3 * t7surfaceL.WindowLineSpacing);
1008 start.x = t7surfaceL.WindowX0 + ((stateUsed->lifeData.actualGas.GasIdInSettings - gasOffset - 1) * 35);
1009 }
1010 else
1011 {
1012 start.y = t7surfaceR.WindowY0 + (3 * t7surfaceR.WindowLineSpacing);
1013 start.x = t7surfaceR.WindowX0 + ((stateUsed->lifeData.actualGas.GasIdInSettings - gasOffset - 1) * 35);
1014 }
1015
870 stop.x = start.x + 25; 1016 stop.x = start.x + 25;
871 stop.y = start.y + 52; 1017 stop.y = start.y + 52;
872 GFX_draw_box2(&t7screen, start, stop, CLUT_Font020, 1); 1018 GFX_draw_box2(&t7screen, start, stop, CLUT_Font020, 1);
873 } 1019 }
874 } 1020 }
919 if((stateUsed->lifeData.battery_charge > 0) && (stateUsed->lifeData.battery_charge < 140)) 1065 if((stateUsed->lifeData.battery_charge > 0) && (stateUsed->lifeData.battery_charge < 140))
920 { 1066 {
921 snprintf(text,16,"\004\025\f\002%u%%",(uint8_t)stateUsed->lifeData.battery_charge); 1067 snprintf(text,16,"\004\025\f\002%u%%",(uint8_t)stateUsed->lifeData.battery_charge);
922 if(warning_count_high_time) 1068 if(warning_count_high_time)
923 text[0] = '\a'; 1069 text[0] = '\a';
924 GFX_write_string(&FontT24,&t7batt,text,0); 1070 GFX_write_string(&FontT24,&t7voltage,text,0);
925 } 1071 }
926 else 1072 else
927 { 1073 {
928 snprintf(text,6,"\f%.1fV",stateUsed->lifeData.battery_voltage); 1074 snprintf(text,6,"\f%.1fV",stateUsed->lifeData.battery_voltage);
929 GFX_write_string(&FontT24,&t7voltage,text,0); 1075 GFX_write_string(&FontT24,&t7voltage,text,0);
934 GFX_write_string_color(&Batt24,&t7batt,text,0,CLUT_BatteryStandard); 1080 GFX_write_string_color(&Batt24,&t7batt,text,0,CLUT_BatteryStandard);
935 1081
936 if((stateUsed->lifeData.battery_charge > 0) && (stateUsed->lifeData.battery_charge < 140)) 1082 if((stateUsed->lifeData.battery_charge > 0) && (stateUsed->lifeData.battery_charge < 140))
937 { 1083 {
938 snprintf(text,16,"\f\002%u%%",(uint8_t)stateUsed->lifeData.battery_charge); 1084 snprintf(text,16,"\f\002%u%%",(uint8_t)stateUsed->lifeData.battery_charge);
939 GFX_write_string(&FontT24,&t7batt,text,0); 1085 // GFX_write_string(&FontT24,&t7batt,text,0);
1086 GFX_write_string(&FontT24,&t7voltage,text,0);
940 } 1087 }
941 else 1088 else
942 { 1089 {
943 snprintf(text,6,"\f%.1fV",stateUsed->lifeData.battery_voltage); 1090 snprintf(text,6,"\f%.1fV",stateUsed->lifeData.battery_voltage);
944 GFX_write_string(&FontT24,&t7voltage,text,0); 1091 GFX_write_string(&FontT24,&t7voltage,text,0);
1088 Gfx_write_label_var(&t7screen, 0,400,145,&FontT48,CLUT_Font020,TextL1); 1235 Gfx_write_label_var(&t7screen, 0,400,145,&FontT48,CLUT_Font020,TextL1);
1089 snprintf(TextL1,TEXTSIZE,"Z %i",stateUsed->lifeData.compass_DZ_f); 1236 snprintf(TextL1,TEXTSIZE,"Z %i",stateUsed->lifeData.compass_DZ_f);
1090 Gfx_write_label_var(&t7screen, 0,400,255,&FontT48,CLUT_Font020,TextL1); 1237 Gfx_write_label_var(&t7screen, 0,400,255,&FontT48,CLUT_Font020,TextL1);
1091 return; 1238 return;
1092 } 1239 }
1093 snprintf(TextL1,TEXTSIZE,"%01.0f mbar",stateUsed->lifeData.pressure_ambient_bar * 1000.0f); 1240 snprintf(TextL1,TEXTSIZE,"%01.0f %s",stateUsed->lifeData.pressure_ambient_bar * 1000.0f,TEXT_PRESSURE_UNIT);
1094 Gfx_write_label_var(&t7screen, 0,400, 0,&FontT42,CLUT_DiveMainLabel,"Ambient Pressure"); 1241 Gfx_write_label_var(&t7screen, 0,400, 0,&FontT42,CLUT_DiveMainLabel,"Ambient Pressure");
1095 Gfx_write_label_var(&t7screen, 0,400, 45,&FontT48,CLUT_Font020,TextL1); 1242 Gfx_write_label_var(&t7screen, 0,400, 45,&FontT48,CLUT_Font020,TextL1);
1096 1243
1097 snprintf(TextL1,TEXTSIZE,"%01.2f C",stateUsed->lifeData.temperature_celsius); 1244 snprintf(TextL1,TEXTSIZE,"%01.2f C",stateUsed->lifeData.temperature_celsius);
1098 Gfx_write_label_var(&t7screen, 0,400,100,&FontT42,CLUT_DiveMainLabel,"Temperature"); 1245 Gfx_write_label_var(&t7screen, 0,400,100,&FontT42,CLUT_DiveMainLabel,"Temperature");
1100 1247
1101 snprintf(TextL1,TEXTSIZE,"%03.0f %03.0f %03.0f",stateUsed->lifeData.compass_heading,stateUsed->lifeData.compass_roll,stateUsed->lifeData.compass_pitch); 1248 snprintf(TextL1,TEXTSIZE,"%03.0f %03.0f %03.0f",stateUsed->lifeData.compass_heading,stateUsed->lifeData.compass_roll,stateUsed->lifeData.compass_pitch);
1102 Gfx_write_label_var(&t7screen, 0,400,200,&FontT42,CLUT_DiveMainLabel,"Heading Roll Pitch"); 1249 Gfx_write_label_var(&t7screen, 0,400,200,&FontT42,CLUT_DiveMainLabel,"Heading Roll Pitch");
1103 Gfx_write_label_var(&t7screen, 0,400,255,&FontT48,CLUT_Font020,TextL1); 1250 Gfx_write_label_var(&t7screen, 0,400,255,&FontT48,CLUT_Font020,TextL1);
1104 1251
1105 snprintf(TextL1,TEXTSIZE,"%01.0f mbar",stateUsed->lifeData.pressure_surface_bar * 1000.0f); 1252 snprintf(TextL1,TEXTSIZE,"%01.0f %s",stateUsed->lifeData.pressure_surface_bar * 1000.0f,TEXT_PRESSURE_UNIT);
1106 Gfx_write_label_var(&t7screen, 0,400,310,&FontT42,CLUT_DiveMainLabel,"Surface Pressure"); 1253 Gfx_write_label_var(&t7screen, 0,400,310,&FontT42,CLUT_DiveMainLabel,"Surface Pressure");
1107 Gfx_write_label_var(&t7screen, 0,400,355,&FontT48,CLUT_Font020,TextL1); 1254 Gfx_write_label_var(&t7screen, 0,400,355,&FontT48,CLUT_Font020,TextL1);
1108 1255
1109 // gasIdFirst = stateUsed->lifeData.actualGas.GasIdInSettings; 1256 // gasIdFirst = stateUsed->lifeData.actualGas.GasIdInSettings;
1110 snprintf(TextL1,TEXTSIZE,"%u.%u",dataIn.RTE_VERSION_high,dataIn.RTE_VERSION_low); 1257 snprintf(TextL1,TEXTSIZE,"%u.%u",dataIn.RTE_VERSION_high,dataIn.RTE_VERSION_low);
1380 pViews = customviewsDive; 1527 pViews = customviewsDive;
1381 } 1528 }
1382 } 1529 }
1383 } while(cv_disabled); 1530 } while(cv_disabled);
1384 } 1531 }
1385
1386
1387 // if((*pViews == CVIEW_Scooter) && (getLicence() != LICENCEBONEX))
1388 // pViews++;
1389
1390 selection_customview = *pViews; 1532 selection_customview = *pViews;
1391 } 1533 }
1392 1534
1393 1535
1394 uint8_t t7_get_length_of_customtext(void) 1536 uint8_t t7_get_length_of_customtext(void)
1401 } 1543 }
1402 1544
1403 1545
1404 void t7_refresh_customview(void) 1546 void t7_refresh_customview(void)
1405 { 1547 {
1406 if((selection_customview == CVIEW_Scooter) && (getLicence() != LICENCEBONEX))
1407 t7_change_customview();
1408 if((selection_customview == CVIEW_Scooter) && (!DataEX_scooterFoundAndValidLicence() && (stateRealGetPointer()->mode == MODE_DIVE)))
1409 t7_change_customview();
1410 if((selection_customview == CVIEW_sensors) &&(stateUsed->diveSettings.ccrOption == 0))
1411 t7_change_customview();
1412 if((selection_customview == CVIEW_sensors_mV) &&(stateUsed->diveSettings.ccrOption == 0))
1413 t7_change_customview();
1414 if((selection_customview == CVIEW_sensors) &&(stateUsed->diveSettings.ccrOption == 0))
1415 t7_change_customview();
1416 1548
1417 char text[256]; 1549 char text[256];
1418 uint16_t textpointer = 0; 1550 uint16_t textpointer = 0;
1419 int16_t start; 1551 int16_t start;
1420 uint8_t lineCountCustomtext = 0; 1552 uint8_t lineCountCustomtext = 0;
1423 RTC_TimeTypeDef Stime; 1555 RTC_TimeTypeDef Stime;
1424 float fPpO2limitHigh, fPpO2limitLow, fPpO2ofGasAtThisDepth; // CVIEW_Gaslist 1556 float fPpO2limitHigh, fPpO2limitLow, fPpO2ofGasAtThisDepth; // CVIEW_Gaslist
1425 const SGasLine * pGasLine; // CVIEW_Gaslist 1557 const SGasLine * pGasLine; // CVIEW_Gaslist
1426 uint8_t oxygen, helium; // CVIEW_Gaslist 1558 uint8_t oxygen, helium; // CVIEW_Gaslist
1427 float depth, surface, fraction_nitrogen, fraction_helium, ead, end; // CVIEW_EADTime 1559 float depth, surface, fraction_nitrogen, fraction_helium, ead, end; // CVIEW_EADTime
1560
1561 SSettings* pSettings;
1562 pSettings = settingsGetPointer();
1563
1564 if((selection_customview == CVIEW_sensors) &&(stateUsed->diveSettings.ccrOption == 0))
1565 t7_change_customview();
1566 if((selection_customview == CVIEW_sensors_mV) &&(stateUsed->diveSettings.ccrOption == 0))
1567 t7_change_customview();
1568 if((selection_customview == CVIEW_sensors) &&(stateUsed->diveSettings.ccrOption == 0))
1569 t7_change_customview();
1428 1570
1429 switch(selection_customview) 1571 switch(selection_customview)
1430 { 1572 {
1431 case CVIEW_noneOrDebug: 1573 case CVIEW_noneOrDebug:
1432 if(settingsGetPointer()->showDebugInfo) 1574 if(settingsGetPointer()->showDebugInfo)
1532 ); 1674 );
1533 GFX_write_string(&FontT24,&t7cC,text,0); 1675 GFX_write_string(&FontT24,&t7cC,text,0);
1534 } 1676 }
1535 break; 1677 break;
1536 1678
1537 case CVIEW_Scooter:
1538 snprintf(text,100,"\032\f\001Scooter");
1539 GFX_write_string(&FontT42,&t7cH,text,0);
1540 t7_scooter();
1541 break;
1542
1543 case CVIEW_Gaslist: 1679 case CVIEW_Gaslist:
1544 // a lot of code taken from tMenuGas.c 1680 // a lot of code taken from tMenuGas.c
1545 // header 1681 // header
1546 snprintf(text,100,"\032\f\001%c%c",TXT_2BYTE,TXT2BYTE_Gaslist); 1682 snprintf(text,100,"\032\f\001%c%c",TXT_2BYTE,TXT2BYTE_Gaslist);
1547 GFX_write_string(&FontT42,&t7cH,text,0); 1683 GFX_write_string(&FontT42,&t7cH,text,0);
1548 // content 1684 // content
1549 textpointer = 0; 1685 textpointer = 0;
1550 t7cY0free.WindowY0 = t7cC.WindowY0 - 10; 1686
1687 if(!pSettings->FlipDisplay)
1688 {
1689 t7cY0free.WindowY0 = t7cC.WindowY0 - 10;
1690 }
1691 else
1692 {
1693 t7cY0free.WindowY1 = 400;
1694 }
1551 t7cY0free.WindowLineSpacing = 48+9; 1695 t7cY0free.WindowLineSpacing = 48+9;
1552 t7cY0free.WindowNumberOfTextLines = 5; // NUM_GASES == 5 1696 t7cY0free.WindowNumberOfTextLines = 5; // NUM_GASES == 5
1553 t7cY0free.WindowTab = 420; 1697 t7cY0free.WindowTab = 420;
1554 1698
1555 pGasLine = settingsGetPointer()->gas; 1699 pGasLine = settingsGetPointer()->gas;
1586 snprintf(text,100,"\032\f\001%c%c",TXT_2BYTE,TXT2BYTE_Info ); 1730 snprintf(text,100,"\032\f\001%c%c",TXT_2BYTE,TXT2BYTE_Info );
1587 GFX_write_string(&FontT42,&t7cH,text,0); 1731 GFX_write_string(&FontT42,&t7cH,text,0);
1588 textpointer = 0; 1732 textpointer = 0;
1589 1733
1590 t7cY0free.WindowY0 = t7cC.WindowY0 - 10; 1734 t7cY0free.WindowY0 = t7cC.WindowY0 - 10;
1735 if(pSettings->FlipDisplay)
1736 {
1737 t7cY0free.WindowY1 = 400;
1738 }
1591 t7cY0free.WindowLineSpacing = 48; 1739 t7cY0free.WindowLineSpacing = 48;
1592 t7cY0free.WindowNumberOfTextLines = 6; 1740 t7cY0free.WindowNumberOfTextLines = 6;
1593 1741
1594 // time 1742 // time
1595 snprintf(text,100,"\032\001%c%c",TXT_2BYTE,TXT2BYTE_Clock ); 1743 snprintf(text,100,"\032\001%c%c",TXT_2BYTE,TXT2BYTE_Clock );
1714 case CVIEW_Compass: 1862 case CVIEW_Compass:
1715 default: 1863 default:
1716 snprintf(text,100,"\032\f\001%c%c",TXT_2BYTE, TXT2BYTE_Compass); 1864 snprintf(text,100,"\032\f\001%c%c",TXT_2BYTE, TXT2BYTE_Compass);
1717 GFX_write_string(&FontT42,&t7cH,text,0); 1865 GFX_write_string(&FontT42,&t7cH,text,0);
1718 t7_compass((uint16_t)stateUsed->lifeData.compass_heading, stateUsed->diveSettings.compassHeading); 1866 t7_compass((uint16_t)stateUsed->lifeData.compass_heading, stateUsed->diveSettings.compassHeading);
1719 t7cY0free.WindowY0 = 230; 1867
1720 t7cY0free.WindowX0 += 15; 1868 if(!pSettings->FlipDisplay)
1869 {
1870 t7cY0free.WindowX0 += 15;
1871 t7cY0free.WindowY0 = 230;
1872 }
1873 else
1874 {
1875 t7cY0free.WindowX0 -= 15;
1876 t7cY0free.WindowY0 = 0;
1877 t7cY0free.WindowY1 = 250;
1878 }
1721 snprintf(text,100,"\030\001%03i`",(uint16_t)stateUsed->lifeData.compass_heading); 1879 snprintf(text,100,"\030\001%03i`",(uint16_t)stateUsed->lifeData.compass_heading);
1722 GFX_write_string(&FontT54,&t7cY0free,text,0); 1880 GFX_write_string(&FontT54,&t7cY0free,text,0);
1723 t7cY0free.WindowX0 -= 15; 1881 if(!pSettings->FlipDisplay)
1882 {
1883 t7cY0free.WindowX0 -= 15;
1884 }
1885 else
1886 {
1887 t7cY0free.WindowX0 += 15;
1888 }
1724 break; 1889 break;
1725 1890
1726 case CVIEW_Decolist: 1891 case CVIEW_Decolist:
1727 snprintf(text,100,"\032\f\001 %c%c", TXT_2BYTE, TXT2BYTE_Decolist); 1892 snprintf(text,100,"\032\f\001 %c%c", TXT_2BYTE, TXT2BYTE_Decolist);
1728 GFX_write_string(&FontT42,&t7cH,text,0); 1893 GFX_write_string(&FontT42,&t7cH,text,0);
1763 textpointer += snprintf(&text[textpointer],20,"\030\034 %2u\016\016%c%c\017%3i'\n\r",depthNext, unit_depth_char1(), unit_depth_char2(), (pDecoinfo->output_stop_length_seconds[i]+59)/60); 1928 textpointer += snprintf(&text[textpointer],20,"\030\034 %2u\016\016%c%c\017%3i'\n\r",depthNext, unit_depth_char1(), unit_depth_char2(), (pDecoinfo->output_stop_length_seconds[i]+59)/60);
1764 else 1929 else
1765 textpointer += snprintf(&text[textpointer],20,"\031\034 %2u\016\016%c%c\017\n\r",depthNext, unit_depth_char1(), unit_depth_char2()); 1930 textpointer += snprintf(&text[textpointer],20,"\031\034 %2u\016\016%c%c\017\n\r",depthNext, unit_depth_char1(), unit_depth_char2());
1766 if(textpointer > 200) break; 1931 if(textpointer > 200) break;
1767 } 1932 }
1768 t7cY0free.WindowY0 = t7cC.WindowY0 - 10; 1933 if(!pSettings->FlipDisplay)
1934 {
1935 t7cY0free.WindowY0 = t7cC.WindowY0 - 10;
1936 }
1937 else
1938 {
1939 t7cY0free.WindowY0 = t7cC.WindowY0 - 10;
1940 t7cY0free.WindowY1 = 400;
1941 }
1942
1769 t7cY0free.WindowLineSpacing = 48; 1943 t7cY0free.WindowLineSpacing = 48;
1770 t7cY0free.WindowNumberOfTextLines = 6; 1944 t7cY0free.WindowNumberOfTextLines = 6;
1771 GFX_write_string(&FontT42, &t7cY0free, text, 1); 1945 GFX_write_string(&FontT42, &t7cY0free, text, 1);
1772 break; 1946 break;
1773 } 1947 }
1801 SDivetime SafetyStopTime = {0,0,0,0}; 1975 SDivetime SafetyStopTime = {0,0,0,0};
1802 SDivetime TimeoutTime = {0,0,0,0}; 1976 SDivetime TimeoutTime = {0,0,0,0};
1803 uint8_t customview_warnings = 0; 1977 uint8_t customview_warnings = 0;
1804 const SDecoinfo * pDecoinfo; 1978 const SDecoinfo * pDecoinfo;
1805 1979
1980 SSettings* pSettings;
1981 pSettings = settingsGetPointer();
1982
1806 Divetime.Total = stateUsed->lifeData.dive_time_seconds_without_surface_time; 1983 Divetime.Total = stateUsed->lifeData.dive_time_seconds_without_surface_time;
1807 Divetime.Minutes = Divetime.Total / 60; 1984 Divetime.Minutes = Divetime.Total / 60;
1808 Divetime.Seconds = Divetime.Total - ( Divetime.Minutes * 60 ); 1985 Divetime.Seconds = Divetime.Total - ( Divetime.Minutes * 60 );
1809 1986
1810 SafetyStopTime.Total = timer_Safetystop_GetCountDown(); 1987 SafetyStopTime.Total = timer_Safetystop_GetCountDown();
1896 GFX_write_string(&FontT105,&t7l2,TextL2,1); 2073 GFX_write_string(&FontT105,&t7l2,TextL2,1);
1897 2074
1898 /* ascentrate graph */ 2075 /* ascentrate graph */
1899 if(stateUsed->lifeData.ascent_rate_meter_per_min > 0) 2076 if(stateUsed->lifeData.ascent_rate_meter_per_min > 0)
1900 { 2077 {
1901 start.y = t7l1.WindowY0 - 1; 2078 if(!pSettings->FlipDisplay)
2079 {
2080 start.y = t7l1.WindowY0 - 1;
2081 }
2082 else
2083 {
2084 start.y = t7l3.WindowY0 - 25;
2085 }
2086
1902 for(int i = 0; i<4;i++) 2087 for(int i = 0; i<4;i++)
1903 { 2088 {
1904 start.y += 5*6; 2089 start.y += 5*6;
1905 stop.y = start.y; 2090 stop.y = start.y;
1906 start.x = CUSTOMBOX_LINE_LEFT - 1; 2091 start.x = CUSTOMBOX_LINE_LEFT - 1;
1911 // GFX_draw_line(&t7screen, start, stop, 0); 2096 // GFX_draw_line(&t7screen, start, stop, 0);
1912 } 2097 }
1913 // new thick bar design Sept. 2015 2098 // new thick bar design Sept. 2015
1914 start.x = CUSTOMBOX_LINE_LEFT - CUSTOMBOX_OUTSIDE_OFFSET - 3 - 5; 2099 start.x = CUSTOMBOX_LINE_LEFT - CUSTOMBOX_OUTSIDE_OFFSET - 3 - 5;
1915 stop.x = start.x; 2100 stop.x = start.x;
1916 start.y = t7l1.WindowY0 - 1; 2101 if(!pSettings->FlipDisplay)
2102 {
2103 start.y = t7l1.WindowY0 - 1;
2104 }
2105 else
2106 {
2107 start.y = t7l3.WindowY0 - 25;
2108 }
1917 stop.y = start.y + (uint16_t)(stateUsed->lifeData.ascent_rate_meter_per_min * 6); 2109 stop.y = start.y + (uint16_t)(stateUsed->lifeData.ascent_rate_meter_per_min * 6);
1918 stop.y -= 3; // wegen der Liniendicke von 12 anstelle von 9 2110 stop.y -= 3; // wegen der Liniendicke von 12 anstelle von 9
1919 if(stop.y >= 470) 2111 if(stop.y >= 470)
1920 stop.y = 470; 2112 stop.y = 470;
1921 start.y += 7; // starte etwas weiter oben 2113 start.y += 7; // starte etwas weiter oben
2225 if((stateUsed->lifeData.battery_charge > 0) && (stateUsed->lifeData.battery_charge < 140)) 2417 if((stateUsed->lifeData.battery_charge > 0) && (stateUsed->lifeData.battery_charge < 140))
2226 { 2418 {
2227 snprintf(TextC1,16,"\004\025\f\002%u%%",(uint8_t)stateUsed->lifeData.battery_charge); 2419 snprintf(TextC1,16,"\004\025\f\002%u%%",(uint8_t)stateUsed->lifeData.battery_charge);
2228 if(warning_count_high_time) 2420 if(warning_count_high_time)
2229 TextC1[0] = '\a'; 2421 TextC1[0] = '\a';
2230 GFX_write_string(&FontT24,&t7batt,TextC1,0); 2422 GFX_write_string(&FontT24,&t7voltage,TextC1,0);
2231 } 2423 }
2232 } 2424 }
2233 else 2425 else
2234 { 2426 {
2235 t7_colorscheme_mod(TextC1); 2427 t7_colorscheme_mod(TextC1);
2237 2429
2238 if((stateUsed->lifeData.battery_charge > 0) && (stateUsed->lifeData.battery_charge < 140)) 2430 if((stateUsed->lifeData.battery_charge > 0) && (stateUsed->lifeData.battery_charge < 140))
2239 { 2431 {
2240 snprintf(TextC1,16,"\020\f\002%u%%",(uint8_t)stateUsed->lifeData.battery_charge); 2432 snprintf(TextC1,16,"\020\f\002%u%%",(uint8_t)stateUsed->lifeData.battery_charge);
2241 t7_colorscheme_mod(TextC1); 2433 t7_colorscheme_mod(TextC1);
2242 GFX_write_string(&FontT24,&t7batt,TextC1,0); 2434 GFX_write_string(&FontT24,&t7voltage,TextC1,0); // t7batt
2243 } 2435 }
2244 } 2436 }
2245 2437
2246 /* customizable left lower corner */ 2438 /* customizable left lower corner */
2247 t7_refresh_divemode_userselected_left_lower_corner(); 2439 t7_refresh_divemode_userselected_left_lower_corner();
2482 void draw_frame(_Bool PluginBoxHeader, _Bool LinesOnTheSides, uint8_t colorBox, uint8_t colorLinesOnTheSide) 2674 void draw_frame(_Bool PluginBoxHeader, _Bool LinesOnTheSides, uint8_t colorBox, uint8_t colorLinesOnTheSide)
2483 { 2675 {
2484 point_t LeftLow, WidthHeight; 2676 point_t LeftLow, WidthHeight;
2485 point_t start, stop; 2677 point_t start, stop;
2486 2678
2679 SSettings* pSettings;
2680 pSettings = settingsGetPointer();
2681
2487 // plugin box 2682 // plugin box
2488 LeftLow.x = CUSTOMBOX_LINE_LEFT; 2683 LeftLow.x = CUSTOMBOX_LINE_LEFT;
2489 WidthHeight.x = CUSTOMBOX_LINE_RIGHT - CUSTOMBOX_LINE_LEFT; 2684 WidthHeight.x = CUSTOMBOX_LINE_RIGHT - CUSTOMBOX_LINE_LEFT;
2490 LeftLow.y = 60; 2685 LeftLow.y = 60;
2491 WidthHeight.y = 440 - LeftLow.y; 2686 WidthHeight.y = 440 - LeftLow.y;
2503 if(LinesOnTheSides) 2698 if(LinesOnTheSides)
2504 { 2699 {
2505 // aufteilung links 2700 // aufteilung links
2506 start.x = 0; 2701 start.x = 0;
2507 stop.x = CUSTOMBOX_LINE_LEFT; 2702 stop.x = CUSTOMBOX_LINE_LEFT;
2508 stop.y = start.y = t7l1.WindowY0 - 1; 2703 if(!pSettings->FlipDisplay)
2704 {
2705 stop.y = start.y = t7l1.WindowY0 - 1;
2706 }
2707 else
2708 {
2709 stop.y = start.y = 480 - t7l1.WindowY1 - 1;
2710 }
2711
2509 GFX_draw_line(&t7screen, start, stop, colorLinesOnTheSide); 2712 GFX_draw_line(&t7screen, start, stop, colorLinesOnTheSide);
2510 stop.y = start.y = t7l2.WindowY0 -1; 2713 if(!pSettings->FlipDisplay)
2714 {
2715 stop.y = start.y = t7l2.WindowY0 -1;
2716 }
2717 else
2718 {
2719 stop.y = start.y = 480 - t7l2.WindowY1 -1;
2720 }
2511 GFX_draw_line(&t7screen, start, stop, colorLinesOnTheSide); 2721 GFX_draw_line(&t7screen, start, stop, colorLinesOnTheSide);
2512 2722
2513 // aufteilung rechts 2723 // aufteilung rechts
2514 start.x = CUSTOMBOX_LINE_RIGHT; 2724 start.x = CUSTOMBOX_LINE_RIGHT;
2515 stop.x = 799; 2725 stop.x = 799;
2516 stop.y = start.y = t7l1.WindowY0 - 1; 2726 if(!pSettings->FlipDisplay)
2727 {
2728 stop.y = start.y = t7l1.WindowY0 - 1;
2729 }
2730 else
2731 {
2732 stop.y = start.y = 480 - t7l1.WindowY1 - 1;
2733 }
2734
2517 GFX_draw_line(&t7screen, start, stop, colorLinesOnTheSide); 2735 GFX_draw_line(&t7screen, start, stop, colorLinesOnTheSide);
2518 stop.y = start.y = t7l2.WindowY0 - 1; 2736 if(!pSettings->FlipDisplay)
2737 {
2738 stop.y = start.y = t7l2.WindowY0 - 1;
2739 }
2740 else
2741 {
2742 stop.y = start.y = 480 - t7l2.WindowY1 - 1;
2743 }
2519 GFX_draw_line(&t7screen, start, stop, colorLinesOnTheSide); 2744 GFX_draw_line(&t7screen, start, stop, colorLinesOnTheSide);
2520 } 2745 }
2521 } 2746 }
2522 2747
2523 2748
2539 const int radius[4] = {95,105,115,100}; 2764 const int radius[4] = {95,105,115,100};
2540 const point_t offset = {.x = 400, .y = 250}; 2765 const point_t offset = {.x = 400, .y = 250};
2541 2766
2542 static point_t r[4][360] = { 0 }; 2767 static point_t r[4][360] = { 0 };
2543 2768
2544 if(r[0][0].y == 0) 2769 if(r[0][0].y == 0) /* calc table at first call only */
2545 { 2770 {
2546 for(int i=0;i<360;i++) 2771 for(int i=0;i<360;i++)
2547 { 2772 {
2548 fCos = cos(i * piMult); 2773 fCos = cos(i * piMult);
2549 fSin = sin(i * piMult); 2774 fSin = sin(i * piMult);
2574 float percent_N2; 2799 float percent_N2;
2575 float percent_He; 2800 float percent_He;
2576 float partial_pressure_N2; 2801 float partial_pressure_N2;
2577 float partial_pressure_He; 2802 float partial_pressure_He;
2578 2803
2804 SSettings* pSettings;
2805 pSettings = settingsGetPointer();
2806
2579 2807
2580 /* N2 */ 2808 /* N2 */
2581 t7cY0free.WindowLineSpacing = 28 + 48 + 14; 2809 t7cY0free.WindowLineSpacing = 28 + 48 + 14;
2582 t7cY0free.WindowY0 = t7cH.WindowY0 - 5 - 2 * t7cY0free.WindowLineSpacing; 2810 if(!pSettings->FlipDisplay)
2811 {
2812 t7cY0free.WindowY0 = t7cH.WindowY0 - 5 - 2 * t7cY0free.WindowLineSpacing;
2813 }
2814 else
2815 {
2816 t7cY0free.WindowY0 = t7cH.WindowY0 + 15;
2817 t7cY0free.WindowY1 = t7cY0free.WindowY0 + 250;
2818 }
2583 t7cY0free.WindowNumberOfTextLines = 3; 2819 t7cY0free.WindowNumberOfTextLines = 3;
2584 2820
2585 text[textpointer++] = '\030'; 2821 text[textpointer++] = '\030';
2586 text[textpointer++] = TXT_2BYTE; 2822 text[textpointer++] = TXT_2BYTE;
2587 text[textpointer++] = TXT2BYTE_Nitrogen; 2823 text[textpointer++] = TXT2BYTE_Nitrogen;
2595 text[textpointer++] = TXT2BYTE_CNS; 2831 text[textpointer++] = TXT2BYTE_CNS;
2596 text[textpointer++] = 0; 2832 text[textpointer++] = 0;
2597 2833
2598 GFX_write_string(&FontT24, &t7cY0free, text, 1); 2834 GFX_write_string(&FontT24, &t7cY0free, text, 1);
2599 2835
2600 start.y = t7cH.WindowY0 - 5; 2836 if(!pSettings->FlipDisplay)
2837 {
2838 start.y = t7cH.WindowY0 - 5;
2839 }
2840 else
2841 {
2842 start.y = t7cH.WindowY1 - 5;
2843 }
2601 start.x = CUSTOMBOX_LINE_LEFT + CUSTOMBOX_INSIDE_OFFSET; 2844 start.x = CUSTOMBOX_LINE_LEFT + CUSTOMBOX_INSIDE_OFFSET;
2602 stop.x = start.x + CUSTOMBOX_SPACE_INSIDE; 2845 stop.x = start.x + CUSTOMBOX_SPACE_INSIDE;
2603 2846
2604 for(int i=0;i<16;i++) 2847 for(int i=0;i<16;i++)
2605 { 2848 {
2692 decom_get_inert_gases(pState->lifeData.pressure_ambient_bar, &pState->lifeData.actualGas, &percent_N2, &percent_He); 2935 decom_get_inert_gases(pState->lifeData.pressure_ambient_bar, &pState->lifeData.actualGas, &percent_N2, &percent_He);
2693 partial_pressure_N2 = (pState->lifeData.pressure_ambient_bar - WATER_VAPOUR_PRESSURE) * percent_N2; 2936 partial_pressure_N2 = (pState->lifeData.pressure_ambient_bar - WATER_VAPOUR_PRESSURE) * percent_N2;
2694 partial_pressure_He = (pState->lifeData.pressure_ambient_bar - WATER_VAPOUR_PRESSURE) * percent_He; 2937 partial_pressure_He = (pState->lifeData.pressure_ambient_bar - WATER_VAPOUR_PRESSURE) * percent_He;
2695 2938
2696 // Nitrogen vertical bar 2939 // Nitrogen vertical bar
2697 start.y = t7cH.WindowY0 + 1 - 5; 2940 if(!pSettings->FlipDisplay)
2941 {
2942 start.y = t7cH.WindowY0 + 1 - 5;
2943 }
2944 else
2945 {
2946 start.y = t7cH.WindowY1 - 5;
2947 }
2948
2698 stop.y = start.y - (3 * 15) - 1; 2949 stop.y = start.y - (3 * 15) - 1;
2699 if((percent_N2 > 0) && (partial_pressure_N2 > 0.8f))//(0.8f + 0.5f))) 2950 if((percent_N2 > 0) && (partial_pressure_N2 > 0.8f))//(0.8f + 0.5f)))
2700 { 2951 {
2701 value = partial_pressure_N2; 2952 value = partial_pressure_N2;
2702 value *= 80;//20 2953 value *= 80;//20
2716 stop.x = start.x; 2967 stop.x = start.x;
2717 GFX_draw_thick_line(2,&t7screen, start, stop, CLUT_EverythingOkayGreen); 2968 GFX_draw_thick_line(2,&t7screen, start, stop, CLUT_EverythingOkayGreen);
2718 2969
2719 2970
2720 // Helium vertical bar 2971 // Helium vertical bar
2721 start.y = t7cH.WindowY0 + 1 - 5 - 3*16 - 28 - 14; 2972 if(!pSettings->FlipDisplay)
2973 {
2974 start.y = t7cH.WindowY0 + 1 - 5 - 3*16 - 28 - 14;
2975 }
2976 else
2977 {
2978 start.y = t7cH.WindowY1 - 5 - 3*16 - 28 - 14;
2979 }
2980
2722 stop.y = start.y - (3 * 15) - 1; 2981 stop.y = start.y - (3 * 15) - 1;
2723 if((percent_He > 0) && (partial_pressure_He > 0.01f)) // 0.5f 2982 if((percent_He > 0) && (partial_pressure_He > 0.01f)) // 0.5f
2724 { 2983 {
2725 2984
2726 value = partial_pressure_He; 2985 value = partial_pressure_He;
2741 start.x = CUSTOMBOX_LINE_LEFT + CUSTOMBOX_INSIDE_OFFSET + front; 3000 start.x = CUSTOMBOX_LINE_LEFT + CUSTOMBOX_INSIDE_OFFSET + front;
2742 stop.x = start.x; 3001 stop.x = start.x;
2743 GFX_draw_thick_line(2,&t7screen, start, stop, CLUT_EverythingOkayGreen); 3002 GFX_draw_thick_line(2,&t7screen, start, stop, CLUT_EverythingOkayGreen);
2744 3003
2745 // Oxygen vertical bar 3004 // Oxygen vertical bar
2746 start.y = t7cH.WindowY0 + 1 - 5 - 6*16 - 2*28 - 2*14; 3005 if(!pSettings->FlipDisplay)
3006 {
3007 start.y = t7cH.WindowY0 + 1 - 5 - 6*16 - 2*28 - 2*14;
3008 }
3009 else
3010 {
3011 start.y = t7cH.WindowY1 - 5 - 6*16 - 2*28 - 2*14;
3012 }
3013
2747 stop.y = start.y - (3 * 15) - 1; 3014 stop.y = start.y - (3 * 15) - 1;
2748 3015
2749 start.x = CUSTOMBOX_LINE_LEFT + CUSTOMBOX_INSIDE_OFFSET + cns100pixel; 3016 start.x = CUSTOMBOX_LINE_LEFT + CUSTOMBOX_INSIDE_OFFSET + cns100pixel;
2750 stop.x = start.x; 3017 stop.x = start.x;
2751 GFX_draw_thick_line(2, &t7screen, start, stop, CLUT_WarningRed); 3018 GFX_draw_thick_line(2, &t7screen, start, stop, CLUT_WarningRed);
3019
2752 } 3020 }
2753 3021
2754 3022
2755 void t7_debug(void) 3023 void t7_debug(void)
2756 { 3024 {
2861 text[textpointer++] = 0; 3129 text[textpointer++] = 0;
2862 GFX_write_string(&FontT42, &t7cY0free, text, 1); 3130 GFX_write_string(&FontT42, &t7cY0free, text, 1);
2863 } 3131 }
2864 3132
2865 3133
2866 void t7_scooter(void)
2867 {
2868 float scooterTemperatureLocal;
2869 uint16_t scooterSpeedLocal;
2870 // uint16_t scooterDrehzhl;
2871 uint8_t scooterResidualCapacity;
2872 // float scooterVoltage;
2873 // uint8_t scooterCurrent;
2874 //uint16_t scooterWattHours;
2875 // uint16_t bkpX0, bkpX1;
2876 uint16_t ageInMilliSeconds;
2877
2878 uint8_t textSize;
2879
2880 scooterTemperatureLocal = unit_temperature_float(((float)(stateUsed->lifeData.scooterTemperature)) / 10.0f);
2881 scooterSpeedLocal = unit_speed_integer(stateUsed->lifeData.scooterSpeed);
2882 scooterResidualCapacity = stateUsed_scooterRemainingBattCapacity();
2883
2884 // scooterDrehzhl = stateUsed->lifeData.scooterDrehzahl;
2885 // scooterVoltage = stateUsed->lifeData.scooterSpannung;
2886 // scooterCurrent = stateUsed->lifeData.scooterAmpere;
2887 // scooterWattHours = stateUsed->lifeData.scooterWattstunden;
2888
2889 ageInMilliSeconds = stateUsed->lifeData.scooterAgeInMilliSeconds;
2890 if(!ageInMilliSeconds)
2891 ageInMilliSeconds = 9999;
2892
2893 char text[256+60];
2894 uint8_t textpointer = 0;
2895
2896 t7cY0free.WindowLineSpacing = 28 + 48 + 14;
2897 t7cY0free.WindowY0 = t7cH.WindowY0 - 5 - 2 * t7cY0free.WindowLineSpacing;
2898 t7cY0free.WindowNumberOfTextLines = 3;
2899
2900 // header
2901 // text[textpointer++] = '\032';
2902 text[textpointer++] = TXT_2BYTE;
2903 text[textpointer++] = TXT2BYTE_ScooterRestkapazitaet;
2904 text[textpointer++] = '\n';
2905 text[textpointer++] = '\r';
2906 text[textpointer++] = TXT_2BYTE;
2907 text[textpointer++] = TXT2BYTE_ScooterTemperature;
2908 text[textpointer++] = '\n';
2909 text[textpointer++] = '\r';
2910 text[textpointer++] = TXT_2BYTE;
2911 text[textpointer++] = TXT2BYTE_ScooterSpeed;
2912 text[textpointer++] = 0;
2913 GFX_write_string(&FontT24, &t7cY0free, text, 1);
2914
2915 /*
2916 snprintf(text,60,
2917 "\032"
2918 "%0u" "\016\016 Wh used\017"
2919 ,stateUsed->lifeData.scooterWattstunden);
2920 */
2921
2922 GFX_write_string(&FontT24, &t7cY0free, text, 1);
2923
2924 /*
2925 snprintf(text,60,
2926 "\030"
2927 "\n\r"
2928 "\n\r"
2929 "%0u" "\022\016\016 rpm\017\030"
2930 ,stateUsed->lifeData.scooterDrehzahl);
2931 GFX_write_string(&FontT24, &t7cY0free, text, 1);
2932 */
2933 // data
2934 t7cY0free.WindowY0 -= 52;
2935 if(settingsGetPointer()->nonMetricalSystem == 0)
2936 {
2937 textSize = snprintf(text,60,
2938 "\030"
2939 "%0u" "\022\016\016 %%\017\030"
2940 "\n\r"
2941 "%0.0f\140" "\022\016\016 C\017\030"
2942 "\n\r"
2943 "%u" "\022\016\016 m/min\017\030"
2944 ,scooterResidualCapacity,scooterTemperatureLocal,scooterSpeedLocal);
2945 }
2946 else
2947 {
2948 textSize = snprintf(text,60,
2949 "\030"
2950 "%0u" "\022\016\016 %%\017\030"
2951 "\n\r"
2952 "%0.0f\140" "\022\016\016 Fht\017\030"
2953 "\n\r"
2954 "%u" "\022\016\016 ft/min\017\030"
2955 ,scooterResidualCapacity,scooterTemperatureLocal,scooterSpeedLocal);
2956 }
2957 // connection active
2958 if(ageInMilliSeconds > 1500)
2959 {
2960 for(int i=0; i < textSize -2; i++)
2961 {
2962 if(text[i] == '\030')
2963 text[i] = '\031';
2964 }
2965 }
2966 // write data
2967 GFX_write_string(&FontT42, &t7cY0free, text, 1);
2968
2969 // age stamp
2970 if(ageInMilliSeconds < 9999)
2971 {
2972 t7cY0free.WindowY0 -= 30;
2973 snprintf(text,60,
2974 "\021\001%u"
2975 ,ageInMilliSeconds);
2976 GFX_write_string(&FontT24, &t7cY0free, text, 0);
2977 }
2978 }
2979
2980
2981 void t7_scooter_May2016_01(void)
2982 {
2983 float scooterTemperature;
2984 uint16_t scooterDrehzhl;
2985 uint8_t scooterResidualCapacity;
2986 float scooterSpeed;
2987 float scooterVoltage;
2988 uint8_t scooterCurrent;
2989 // uint16_t scooterWattHours;
2990 uint16_t bkpX0, bkpX1;
2991
2992 uint16_t ageInMilliSeconds;
2993 uint8_t textSize;
2994 // old scooterStatus = bC_getData(0,&scooterTemperature,&scooterDrehzhl,&scooterResidualCapacity);
2995
2996 scooterDrehzhl = stateUsed->lifeData.scooterDrehzahl;
2997 scooterTemperature = ((float)(stateUsed->lifeData.scooterTemperature)) / 10.0f;
2998 scooterResidualCapacity = stateUsed_scooterRemainingBattCapacity();
2999
3000 scooterVoltage = stateUsed->lifeData.scooterSpannung;
3001 scooterCurrent = stateUsed->lifeData.scooterAmpere;
3002 // scooterWattHours = stateUsed->lifeData.scooterWattstunden;
3003
3004 ageInMilliSeconds = stateUsed->lifeData.scooterAgeInMilliSeconds;
3005
3006 scooterSpeed = scooterDrehzhl * 80 / 3300;
3007
3008 char text[256+60];
3009
3010 t7cY0free.WindowLineSpacing = (28 + 48 + 14)/2;
3011 t7cY0free.WindowY0 = t7cH.WindowY0 - 5 - 5 * t7cY0free.WindowLineSpacing;
3012 t7cY0free.WindowNumberOfTextLines = 6;
3013
3014 t7cY0free.WindowY0 -= 7;
3015
3016 bkpX0 = t7cY0free.WindowX0;
3017 bkpX1 = t7cY0free.WindowX1;
3018 t7cY0free.WindowX0 = 430;
3019
3020 textSize = snprintf(text,120,
3021 "\022\016\016"
3022 "%%"
3023 "\n\r"
3024 "celsius"
3025 "\n\r"
3026 "rpm"
3027 "\n\r"
3028 "m/min"
3029 "\n\r"
3030 "Ampere"
3031 "\n\r"
3032 "Volt"
3033 // "\n\r"
3034 // "Wh"
3035 );
3036 GFX_write_string(&FontT42, &t7cY0free, text, 1);
3037
3038 t7cY0free.WindowX0 = bkpX0;
3039 t7cY0free.WindowX1 = 420;
3040
3041 textSize = snprintf(text,120,
3042 "\030"
3043 "\002"
3044 "%0u"
3045 "\n\r"
3046 "\002"
3047 "%0.0f"
3048 "\n\r"
3049 "\002"
3050 "%0u"
3051 "\n\r"
3052 "\002"
3053 "%0.0f"
3054 "\n\r"
3055 "\002"
3056 "%0u"
3057 "\n\r"
3058 "\002"
3059 "%0.1f"
3060 // "\n\r"
3061 // "%0u" "\022\016\016 Wh\017\030"
3062 ,scooterResidualCapacity,scooterTemperature,scooterDrehzhl,scooterSpeed
3063 ,scooterCurrent,scooterVoltage);//,scooterWattHours);
3064
3065 if((ageInMilliSeconds > 1500) || (stateUsed->lifeData.scooterType == 0xFF))
3066 {
3067 for(int i=0; i < textSize -2; i++)
3068 {
3069 if(text[i] == '\030')
3070 text[i] = '\031';
3071 }
3072 }
3073 GFX_write_string(&FontT42, &t7cY0free, text, 1);
3074
3075 t7cY0free.WindowX0 = bkpX0;
3076 t7cY0free.WindowX1 = bkpX1;
3077
3078 t7cY0free.WindowY0 -= 30;
3079 snprintf(text,60,
3080 "\021\001%u"
3081 ,ageInMilliSeconds);
3082 GFX_write_string(&FontT24, &t7cY0free, text, 0);
3083
3084 }
3085
3086 void t7_scooter_alt(void)
3087 {
3088 float scooterTemperature;
3089 uint16_t scooterDrehzhl;
3090 uint8_t scooterStatus;
3091 uint8_t scooterResidualCapacity;
3092 float scooterSpeed;
3093 uint16_t ageInMilliSeconds;
3094 uint8_t textSize;
3095 // old scooterStatus = bC_getData(0,&scooterTemperature,&scooterDrehzhl,&scooterResidualCapacity);
3096
3097 scooterStatus = 2;//BC_CONNECTED;
3098 scooterDrehzhl = stateUsed->lifeData.scooterDrehzahl;
3099 scooterTemperature = ((float)(stateUsed->lifeData.scooterTemperature)) / 10.0f;
3100 scooterResidualCapacity = stateUsed_scooterRemainingBattCapacity();
3101 ageInMilliSeconds = stateUsed->lifeData.scooterAgeInMilliSeconds;
3102 if(!ageInMilliSeconds)
3103 ageInMilliSeconds = 9999;
3104
3105 scooterSpeed = scooterDrehzhl * 80 / 3300;
3106
3107 char text[256+60];
3108 uint8_t textpointer = 0;
3109
3110 //float percent_N2;
3111 //float percent_He;
3112 //float partial_pressure_N2;
3113 //float partial_pressure_He;
3114
3115 t7cY0free.WindowLineSpacing = 28 + 48 + 14;
3116 t7cY0free.WindowY0 = t7cH.WindowY0 - 5 - 2 * t7cY0free.WindowLineSpacing;
3117 t7cY0free.WindowNumberOfTextLines = 3;
3118
3119 text[textpointer++] = '\032';
3120 text[textpointer++] = TXT_2BYTE;
3121 text[textpointer++] = TXT2BYTE_ScooterRestkapazitaet;
3122 text[textpointer++] = '\n';
3123 text[textpointer++] = '\r';
3124 text[textpointer++] = TXT_2BYTE;
3125 text[textpointer++] = TXT2BYTE_ScooterTemperature;
3126 text[textpointer++] = '\n';
3127 text[textpointer++] = '\r';
3128 text[textpointer++] = TXT_2BYTE;
3129 text[textpointer++] = TXT2BYTE_ScooterSpeed;
3130 text[textpointer++] = 0;
3131
3132 GFX_write_string(&FontT24, &t7cY0free, text, 1);
3133
3134 if(scooterStatus == 2)//BC_CONNECTED)
3135 {
3136 t7cY0free.WindowY0 -= 52;
3137 textSize = snprintf(text,60,
3138 "\030"
3139 "%0u" "\022\016\016 %%\017\030"
3140 "\n\r"
3141 "%0.0f\140" "\022\016\016 celsius\017\030"
3142 "\n\r"
3143 "%0.0f" "\022\016\016 m/min\017\030"
3144 ,scooterResidualCapacity,scooterTemperature,scooterSpeed);
3145
3146 if(ageInMilliSeconds > 1500)
3147 {
3148 for(int i=0; i < textSize -2; i++)
3149 {
3150 if(text[i] == '\030')
3151 text[i] = '\031';
3152 }
3153 }
3154 // snprintf(text,60,"\031%0.2f\n\r%0.2f\n\r%u",scooterWatt,scooterTemperature,scooterDrehzhl);
3155 GFX_write_string(&FontT42, &t7cY0free, text, 1);
3156
3157 t7cY0free.WindowY0 -= 30;
3158 snprintf(text,60,
3159 "\021\001%u"
3160 ,ageInMilliSeconds);
3161 GFX_write_string(&FontT24, &t7cY0free, text, 0);
3162
3163 }
3164 }
3165 3134
3166 3135
3167 /* 3136 /*
3168 point_t start, change, stop; 3137 point_t start, change, stop;
3169 float value; 3138 float value;
3365 else 3334 else
3366 ActualHeading = lastHeading - resultKalman; 3335 ActualHeading = lastHeading - resultKalman;
3367 3336
3368 lastHeading = ActualHeading; 3337 lastHeading = ActualHeading;
3369 */ 3338 */
3339 uint16_t ActualHeadingRose;
3370 uint16_t LeftBorderHeading, LineHeading; 3340 uint16_t LeftBorderHeading, LineHeading;
3371 uint32_t offsetPicture; 3341 uint32_t offsetPicture;
3372 point_t start, stop, center; 3342 point_t start, stop, center;
3373 static int32_t LastHeading = 0; 3343 static int32_t LastHeading = 0;
3374 int32_t newHeading = 0; 3344 int32_t newHeading = 0;
3376 int32_t diff2 = 0; 3346 int32_t diff2 = 0;
3377 3347
3378 int32_t diffAbs = 0; 3348 int32_t diffAbs = 0;
3379 int32_t diffAbs2 = 0; 3349 int32_t diffAbs2 = 0;
3380 3350
3351 SSettings* pSettings;
3352 pSettings = settingsGetPointer();
3353
3381 newHeading = ActualHeading; 3354 newHeading = ActualHeading;
3382 3355
3383 diff = newHeading - LastHeading; 3356 diff = newHeading - LastHeading;
3384 3357
3385 if(newHeading < LastHeading) 3358 if(newHeading < LastHeading)
3407 if(newHeading >= 360) 3380 if(newHeading >= 360)
3408 newHeading -= 360; 3381 newHeading -= 360;
3409 3382
3410 LastHeading = newHeading; 3383 LastHeading = newHeading;
3411 ActualHeading = newHeading; 3384 ActualHeading = newHeading;
3385 ActualHeadingRose = ActualHeading;
3412 /* 3386 /*
3413 if (ActualHeading < 90) 3387 if (ActualHeading < 90)
3414 ActualHeading += 360; 3388 ActualHeading += 360;
3415 3389
3416 if(ActualHeading > LastHeading) 3390 if(ActualHeading > LastHeading)
3423 { 3397 {
3424 if((LastHeading - ActualHeading) < 25) 3398 if((LastHeading - ActualHeading) < 25)
3425 ActualHeading = LastHeading - 1; 3399 ActualHeading = LastHeading - 1;
3426 } 3400 }
3427 */ 3401 */
3428 if (ActualHeading < 90) 3402 if(pSettings->FlipDisplay)
3429 ActualHeading += 360; 3403 {
3404 ActualHeadingRose = 360 - ActualHeadingRose;
3405 if (ActualHeadingRose < 170) ActualHeadingRose += 360;
3406 }
3407 else
3408 {
3409 if (ActualHeadingRose < 90) ActualHeadingRose += 360;
3410 ActualHeading = ActualHeadingRose;
3411 }
3430 3412
3431 // new hw 160822 3413 // new hw 160822
3432 // if (ActualHeading >= 360 + 90) 3414 // if (ActualHeading >= 360 + 90)
3433 // ActualHeading = 360; 3415 // ActualHeading = 360;
3434 3416
3435 LeftBorderHeading = 2 * (ActualHeading - (CUSTOMBOX_SPACE_INSIDE/4)); 3417 LeftBorderHeading = 2 * (ActualHeadingRose - (CUSTOMBOX_SPACE_INSIDE/4));
3418
3419 if(pSettings->FlipDisplay) /* add offset caused by mirrowed drawing */
3420 {
3421 LeftBorderHeading += 2 * 80;
3422 }
3436 3423
3437 offsetPicture = LeftBorderHeading * t7screenCompass.ImageHeight * 2; 3424 offsetPicture = LeftBorderHeading * t7screenCompass.ImageHeight * 2;
3438 3425
3426 /* the background is used to draw the rotating compass rose */
3439 background.pointer = t7screenCompass.FBStartAdress+offsetPicture; 3427 background.pointer = t7screenCompass.FBStartAdress+offsetPicture;
3440 background.x0 = CUSTOMBOX_LINE_LEFT + CUSTOMBOX_INSIDE_OFFSET; 3428 background.x0 = CUSTOMBOX_LINE_LEFT + CUSTOMBOX_INSIDE_OFFSET;
3441 background.y0 = 65; 3429 if(!pSettings->FlipDisplay)
3430 {
3431 background.y0 = 65;
3432 }
3433 else
3434 {
3435 background.y0 = 480 - t7screenCompass.ImageHeight - 65;
3436 }
3437
3442 background.width = CUSTOMBOX_SPACE_INSIDE; 3438 background.width = CUSTOMBOX_SPACE_INSIDE;
3443 background.height = t7screenCompass.ImageHeight; 3439 background.height = t7screenCompass.ImageHeight;
3444 3440
3445 3441
3446 start.x = CUSTOMBOX_LINE_LEFT + CUSTOMBOX_INSIDE_OFFSET + (CUSTOMBOX_SPACE_INSIDE/2); 3442 start.x = CUSTOMBOX_LINE_LEFT + CUSTOMBOX_INSIDE_OFFSET + (CUSTOMBOX_SPACE_INSIDE/2);
3642 3638
3643 3639
3644 void t7_miniLiveLogProfile(void) 3640 void t7_miniLiveLogProfile(void)
3645 { 3641 {
3646 SWindowGimpStyle wintemp; 3642 SWindowGimpStyle wintemp;
3643 SSettings* pSettings;
3644 pSettings = settingsGetPointer();
3645
3647 wintemp.left = CUSTOMBOX_LINE_LEFT + CUSTOMBOX_INSIDE_OFFSET; 3646 wintemp.left = CUSTOMBOX_LINE_LEFT + CUSTOMBOX_INSIDE_OFFSET;
3648 wintemp.right = wintemp.left + CUSTOMBOX_SPACE_INSIDE; 3647 wintemp.right = wintemp.left + CUSTOMBOX_SPACE_INSIDE;
3649 wintemp.top = 480 - t7l1.WindowY0; 3648 if(!pSettings->FlipDisplay)
3650 wintemp.bottom = wintemp. top + 200; 3649 {
3650 wintemp.top = 480 - t7l1.WindowY0;
3651 wintemp.bottom = wintemp. top + 200;
3652 }
3653 else
3654 {
3655 wintemp.top = t7l1.WindowY1;
3656 wintemp.bottom = wintemp. top + 200;
3657 }
3651 3658
3652 uint16_t max_depth = (uint16_t)(stateUsed->lifeData.max_depth_meter * 10); 3659 uint16_t max_depth = (uint16_t)(stateUsed->lifeData.max_depth_meter * 10);
3653 3660
3654 GFX_graph_print(&t7screen, &wintemp, 0,1,0, max_depth, getMiniLiveLogbookPointerToData(), getMiniLiveLogbookActualDataLength(), CLUT_Font030, NULL); 3661 GFX_graph_print(&t7screen, &wintemp, 0,1,0, max_depth, getMiniLiveLogbookPointerToData(), getMiniLiveLogbookActualDataLength(), CLUT_Font030, NULL);
3655 } 3662 }
3656 3663
3657 void t7_logo_OSTC(void) 3664 void t7_logo_OSTC(void)
3658 { 3665 {
3659 SWindowGimpStyle windowGimp; 3666 SWindowGimpStyle windowGimp;
3667 SSettings* pSettings;
3668 pSettings = settingsGetPointer();
3669
3660 /* OSTC logo */ 3670 /* OSTC logo */
3661 windowGimp.left = t7l1.WindowX1 + 32; 3671 if(!pSettings->FlipDisplay)
3672 {
3673 windowGimp.left = t7l1.WindowX1 + 32;
3674 }
3675 else
3676 {
3677 windowGimp.left = t7r1.WindowX1 + 32;
3678 }
3679
3662 windowGimp.top = 40 + 32; 3680 windowGimp.top = 40 + 32;
3663 GFX_draw_image_monochrome(&t7screen, windowGimp, &ImgOSTC, 0); 3681 GFX_draw_image_monochrome(&t7screen, windowGimp, &ImgOSTC, 0);
3664 } 3682 }