Mercurial > public > ostc4
comparison Discovery/Src/t3.c @ 553:43a2dd4ba30f
Added color indicator for focus state:
Some lines in T7 and T3 screen will turn blue in case the OSTC detects a potential view of the diver. During focus state motion events are evaluated and proceeded.
author | Ideenmodellierer |
---|---|
date | Sun, 08 Nov 2020 18:49:54 +0100 |
parents | 6960df7ddb09 |
children | 5e0a75e2f00b |
comparison
equal
deleted
inserted
replaced
552:531e7818b737 | 553:43a2dd4ba30f |
---|---|
34 #include "gfx_fonts.h" | 34 #include "gfx_fonts.h" |
35 #include "math.h" | 35 #include "math.h" |
36 #include "tHome.h" | 36 #include "tHome.h" |
37 #include "timer.h" | 37 #include "timer.h" |
38 #include "unit.h" | 38 #include "unit.h" |
39 #include "motion.h" | |
39 | 40 |
40 //* Imported function prototypes ---------------------------------------------*/ | 41 //* Imported function prototypes ---------------------------------------------*/ |
41 extern uint8_t write_gas(char *text, uint8_t oxygen, uint8_t helium); | 42 extern uint8_t write_gas(char *text, uint8_t oxygen, uint8_t helium); |
42 | 43 |
43 /* Exported variables --------------------------------------------------------*/ | 44 /* Exported variables --------------------------------------------------------*/ |
224 pSettings = settingsGetPointer(); | 225 pSettings = settingsGetPointer(); |
225 | 226 |
226 start.x = 0; | 227 start.x = 0; |
227 stop.x = 799; | 228 stop.x = 799; |
228 stop.y = start.y = BigFontSeperationTopBottom; | 229 stop.y = start.y = BigFontSeperationTopBottom; |
229 GFX_draw_line(tXscreen, start, stop, CLUT_Font020); | 230 if(viewInFocus()) |
231 { | |
232 GFX_draw_line(tXscreen, start, stop, CLUT_Font023); | |
233 } | |
234 else | |
235 { | |
236 GFX_draw_line(tXscreen, start, stop, CLUT_Font020); | |
237 } | |
238 | |
230 | 239 |
231 start.y = BigFontSeperationTopBottom; | 240 start.y = BigFontSeperationTopBottom; |
232 stop.y = 479; | 241 stop.y = 479; |
233 | 242 |
234 stop.x = start.x = BigFontSeperationLeftRight; | 243 stop.x = start.x = BigFontSeperationLeftRight; |
235 GFX_draw_line(tXscreen, start, stop, CLUT_Font020); | 244 if(viewInFocus()) |
245 { | |
246 GFX_draw_line(tXscreen, start, stop, CLUT_Font023); | |
247 } | |
248 else | |
249 { | |
250 GFX_draw_line(tXscreen, start, stop, CLUT_Font020); | |
251 } | |
236 | 252 |
237 /* depth */ | 253 /* depth */ |
238 float depth = unit_depth_float(stateUsed->lifeData.depth_meter); | 254 float depth = unit_depth_float(stateUsed->lifeData.depth_meter); |
239 | 255 |
240 if(depth <= 0.3f) | 256 if(depth <= 0.3f) |