annotate Discovery/Src/t6_apnea.c @ 157:018586760ca7 FlipDisplay

Binaries for beta testing SPI monitoring active
author Ideenmodellierer
date Sun, 03 Mar 2019 19:20:18 +0100
parents cc9c18075e00
children 255eedad4155
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1 ///////////////////////////////////////////////////////////////////////////////
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
2 /// -*- coding: UTF-8 -*-
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
3 ///
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
4 /// \file Discovery/Src/t6_apnea.c
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
5 /// \brief dive screen for Gauge mode
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
6 /// \author Heinrichs Weikamp gmbh
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
7 /// \date 1-Feb-2017
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
8 ///
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
9 /// \details
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
10 ///
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
11 /// $Id$
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
12 ///////////////////////////////////////////////////////////////////////////////
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
13 /// \par Copyright (c) 2014-2018 Heinrichs Weikamp gmbh
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
14 ///
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
15 /// This program is free software: you can redistribute it and/or modify
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
16 /// it under the terms of the GNU General Public License as published by
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
17 /// the Free Software Foundation, either version 3 of the License, or
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
18 /// (at your option) any later version.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
19 ///
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
20 /// This program is distributed in the hope that it will be useful,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
21 /// but WITHOUT ANY WARRANTY; without even the implied warranty of
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
22 /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
23 /// GNU General Public License for more details.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
24 ///
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
25 /// You should have received a copy of the GNU General Public License
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
26 /// along with this program. If not, see <http://www.gnu.org/licenses/>.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
27 //////////////////////////////////////////////////////////////////////////////
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
28
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
29 /* Includes ------------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
30 #include "t6_apnea.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
31
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
32 #include "data_exchange_main.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
33 #include "decom.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
34 #include "gfx_fonts.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
35 #include "math.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
36 #include "tHome.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
37 #include "simulation.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
38 #include "timer.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
39 #include "unit.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
40
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
41 /* Private variables ---------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
42 GFX_DrawCfgScreen t6screen;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
43 GFX_DrawCfgWindow t6l1;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
44 GFX_DrawCfgWindow t6r1;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
45 GFX_DrawCfgWindow t6c1;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
46 GFX_DrawCfgWindow t6c2;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
47 GFX_DrawCfgWindow t6c3; // for menu text
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
48
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
49 extern float depthLastCall[9];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
50 extern uint8_t idDepthLastCall;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
51 extern float temperatureLastCall[3];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
52 extern uint8_t idTemperatureLastCall;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
53
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
54 uint8_t t6_selection_customview = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
55
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
56 /* Importend function prototypes ---------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
57 extern uint8_t write_gas(char *text, uint8_t oxygen, uint8_t helium);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
58
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
59 /* Private types -------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
60
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
61 #define CUSTOMBOX_LINE_LEFT (250)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
62 #define CUSTOMBOX_LINE_RIGHT (549)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
63 #define CUSTOMBOX_INSIDE_OFFSET (2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
64 #define CUSTOMBOX_OUTSIDE_OFFSET (2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
65
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
66 #define TEXTSIZE 16
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
67
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
68 const uint8_t t6_customviewsStandard[] =
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
69 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
70 CVIEW_noneOrDebug,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
71 CVIEW_T3_Temperature,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
72 CVIEW_T3_END
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
73 };
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
74
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
75 const uint8_t *t6_customviews = t6_customviewsStandard;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
76 const uint8_t t6_customviewSurfaceMode = CVIEW_T3_ApnoeSurfaceInfo;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
77
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
78 /* Private function prototypes -----------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
79 void t6_refresh_divemode(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
80 void t6_refresh_customview(float depth);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
81
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
82 uint8_t t6_test_customview_warnings(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
83 void t6_show_customview_warnings(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
84 void t6_compass(uint16_t ActualHeading, uint16_t UserSetHeading);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
85
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
86 /* Exported functions --------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
87
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
88 // for tHomeDiveMenuControl() in tHome.c and t6_refresh_customview
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
89 uint8_t t6_getCustomView(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
90 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
91 if(stateUsed->lifeData.counterSecondsShallowDepth)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
92 return t6_customviewSurfaceMode;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
93 else
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
94 return t6_selection_customview;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
95 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
96
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
97 void t6_init(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
98 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
99 t6_selection_customview = t6_customviewsStandard[0];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
100
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
101 t6screen.FBStartAdress = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
102 t6screen.ImageHeight = 480;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
103 t6screen.ImageWidth = 800;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
104 t6screen.LayerIndex = 1;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
105
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
106 t6l1.Image = &t6screen;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
107 t6l1.WindowNumberOfTextLines = 2;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
108 t6l1.WindowLineSpacing = 19; // Abstand von Y0
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
109 t6l1.WindowTab = 100;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
110 t6l1.WindowX0 = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
111 t6l1.WindowX1 = BigFontSeperationLeftRight - 5;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
112 t6l1.WindowY0 = BigFontSeperationTopBottom + 5;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
113 t6l1.WindowY1 = 479;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
114
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
115 t6r1.Image = &t6screen;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
116 t6r1.WindowNumberOfTextLines = t6l1.WindowNumberOfTextLines;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
117 t6r1.WindowLineSpacing = t6l1.WindowLineSpacing;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
118 t6r1.WindowTab = t6l1.WindowTab;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
119 t6r1.WindowX0 = BigFontSeperationLeftRight + 5;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
120 t6r1.WindowX1 = 799;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
121 t6r1.WindowY0 = t6l1.WindowY0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
122 t6r1.WindowY1 = t6l1.WindowY1;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
123
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
124 t6c1.Image = &t6screen;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
125 t6c1.WindowNumberOfTextLines = 2;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
126 t6c1.WindowLineSpacing = t6l1.WindowLineSpacing;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
127 t6c1.WindowX0 = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
128 t6c1.WindowX1 = 799;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
129 t6c1.WindowY0 = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
130 t6c1.WindowY1 = BigFontSeperationTopBottom - 5;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
131
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
132 t6c2.Image = &t6screen;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
133 t6c2.WindowNumberOfTextLines = 3;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
134 t6c2.WindowLineSpacing = 58;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
135 t6c2.WindowX0 = 370;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
136 t6c2.WindowX1 = 799;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
137 t6c2.WindowY0 = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
138 t6c2.WindowY1 = BigFontSeperationTopBottom - 5;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
139 t6c2.WindowTab = 600;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
140
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
141 t6c3.Image = &t6screen;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
142 t6c3.WindowNumberOfTextLines = 1;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
143 t6c3.WindowLineSpacing = 0; // Abstand von Y0
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
144 t6c3.WindowTab = 100;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
145 t6c3.WindowX0 = CUSTOMBOX_LINE_LEFT + CUSTOMBOX_INSIDE_OFFSET;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
146 t6c3.WindowX1 = CUSTOMBOX_LINE_RIGHT - CUSTOMBOX_INSIDE_OFFSET;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
147 t6c3.WindowY0 = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
148 t6c3.WindowY1 = 69;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
149 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
150
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
151
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
152 void t6_refresh(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
153 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
154 static uint8_t last_mode = MODE_SURFACE;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
155
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
156 SStateList status;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
157 get_globalStateList(&status);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
158
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
159 if(stateUsed->mode != MODE_DIVE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
160 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
161 last_mode = MODE_SURFACE;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
162 settingsGetPointer()->design = 7;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
163 if(t6screen.FBStartAdress)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
164 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
165 releaseFrame(24,t6screen.FBStartAdress);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
166 t6screen.FBStartAdress = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
167 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
168 return;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
169 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
170
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
171 if(status.base != BaseHome)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
172 return;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
173
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
174 t6screen.FBStartAdress = getFrame(24);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
175
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
176 if(last_mode != MODE_DIVE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
177 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
178 last_mode = MODE_DIVE;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
179 t6_selection_customview = *t6_customviews;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
180 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
181
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
182 if(status.page == PageSurface)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
183 set_globalState(StD);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
184
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
185 t6_refresh_divemode();
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
186 GFX_SetFramesTopBottom(t6screen.FBStartAdress, NULL,480);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
187 releaseAllFramesExcept(24,t6screen.FBStartAdress);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
188 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
189
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
190 /* Private functions ---------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
191
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
192 void t6_refresh_divemode(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
193 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
194 char text[512];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
195 uint8_t customview_warnings = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
196 float depth_meter = 0.0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
197
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
198 // everything like lines, depth, ascent graph and divetime or counterSecondsShallowDepth
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
199 depth_meter = t3_basics_lines_depth_and_divetime(&t6screen, &t6l1, &t6r1, DIVEMODE_Apnea);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
200
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
201
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
202 // customview
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
203 if(stateUsed->warnings.numWarnings)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
204 customview_warnings = t6_test_customview_warnings();
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
205
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
206 if(customview_warnings && warning_count_high_time)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
207 t3_basics_show_customview_warnings(&t6c1);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
208 else
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
209 t6_refresh_customview(depth_meter);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
210
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
211 if(stateUsed->warnings.lowBattery)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
212 t3_basics_battery_low_customview_extra(&t6c1);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
213
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
214
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
215 /* Menu Selection (and gas mix) */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
216 if(get_globalState() == StDBEAR)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
217 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
218 snprintf(text,TEXTSIZE,"\a\001%c%c", TXT_2BYTE, TXT2BYTE_DiveBearingQ);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
219 GFX_write_string_color(&FontT48,&t6c3,text,0,CLUT_WarningYellow);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
220 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
221 else if(get_globalState() == StDRAVG)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
222 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
223 snprintf(text,TEXTSIZE,"\a\001%c%c", TXT_2BYTE, TXT2BYTE_DiveResetAvgQ);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
224 GFX_write_string_color(&FontT48,&t6c3,text,0,CLUT_WarningYellow);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
225 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
226 else if(get_globalState() == StDQUIT)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
227 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
228 snprintf(text,TEXTSIZE,"\a\001%c%c", TXT_2BYTE, TXT2BYTE_DiveQuitQ);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
229 GFX_write_string_color(&FontT48,&t6c3,text,0,CLUT_WarningYellow);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
230 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
231 else if(get_globalState() == StDSIM1)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
232 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
233 snprintf(text,TEXTSIZE,"\a\001%c%c", TXT_2BYTE, TXT2BYTE_DiveQuitQ);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
234 GFX_write_string_color(&FontT48,&t6c3,text,0,CLUT_WarningYellow);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
235 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
236 else if(get_globalState() == StDSIM2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
237 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
238 if(settingsGetPointer()->nonMetricalSystem)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
239 snprintf(text,TEXTSIZE,"\a\001" " Sim:-3.33ft ");
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
240 else
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
241 snprintf(text,TEXTSIZE,"\a\001" " Sim:-1m ");
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
242 GFX_write_string_color(&FontT48,&t6c3,text,0,CLUT_WarningYellow);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
243 snprintf(text,TEXTSIZE,"\a\f %u %c%c"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
244 , unit_depth_integer(simulation_get_aim_depth())
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
245 , unit_depth_char1()
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
246 , unit_depth_char2()
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
247 );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
248 GFX_write_string_color(&FontT42,&t6l1,text,0,CLUT_WarningYellow);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
249
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
250 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
251 else if(get_globalState() == StDSIM3)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
252 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
253 if(settingsGetPointer()->nonMetricalSystem)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
254 snprintf(text,TEXTSIZE,"\a\001" " Sim:+3.33ft ");
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
255 else
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
256 snprintf(text,TEXTSIZE,"\a\001" " Sim:+1m ");
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
257 GFX_write_string_color(&FontT48,&t6c3,text,0,CLUT_WarningYellow);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
258 snprintf(text,TEXTSIZE,"\a\f %u %c%c"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
259 , unit_depth_integer(simulation_get_aim_depth())
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
260 , unit_depth_char1()
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
261 , unit_depth_char2()
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
262 );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
263 GFX_write_string_color(&FontT42,&t6l1,text,0,CLUT_WarningYellow);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
264 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
265 else if(get_globalState() == StDSIM4)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
266 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
267 snprintf(text,TEXTSIZE,"\a\001" " Sim:+5' ");
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
268 GFX_write_string_color(&FontT48,&t6c3,text,0,CLUT_WarningYellow);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
269 snprintf(text,TEXTSIZE,"\a\f %u %c%c"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
270 , unit_depth_integer(simulation_get_aim_depth())
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
271 , unit_depth_char1()
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
272 , unit_depth_char2()
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
273 );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
274 GFX_write_string_color(&FontT42,&t6l1,text,0,CLUT_WarningYellow);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
275 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
276 else
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
277 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
278 // keep empty
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
279 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
280 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
281
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
282
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
283 void t6_battery_low_customview_extra(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
284 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
285 char TextC1[256];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
286
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
287 TextC1[0] = '\002';
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
288 TextC1[1] = '\f';
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
289 TextC1[2] = '\025';
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
290 TextC1[3] = '3';
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
291 TextC1[4] = '1';
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
292 TextC1[5] = '1';
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
293 TextC1[6] = '1';
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
294 TextC1[7] = '1';
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
295 TextC1[8] = '1';
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
296 TextC1[9] = '1';
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
297 TextC1[10] = '1';
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
298 TextC1[11] = '1';
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
299 TextC1[12] = '1';
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
300 TextC1[13] = '1';
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
301 TextC1[14] = '0';
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
302 TextC1[15] = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
303
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
304 if(!warning_count_high_time)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
305 TextC1[4] = '2';
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
306
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
307 GFX_write_string(&Batt24,&t6c1,TextC1,0);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
308 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
309
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
310
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
311
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
312 void t6_change_customview(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
313 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
314 t3_basics_change_customview(&t6_selection_customview, t6_customviews);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
315 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
316
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
317
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
318 void t6_refresh_customview(float depth)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
319 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
320 uint8_t customViewLeftSide = CVIEW_T3_MaxDepth;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
321
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
322 if((t6_selection_customview == CVIEW_sensors) &&(stateUsed->diveSettings.ccrOption == 0))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
323 t6_change_customview();
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
324
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
325 if(t6_getCustomView() == CVIEW_T3_ApnoeSurfaceInfo)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
326 customViewLeftSide = CVIEW_T3_ApnoeSurfaceInfo;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
327
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
328 t3_basics_refresh_customview(depth, customViewLeftSide, &t6screen, &t6c1, &t6c2, DIVEMODE_Apnea);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
329 t3_basics_refresh_apnoeRight(depth, t6_getCustomView(), &t6screen, &t6c1, &t6c2, DIVEMODE_Apnea);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
330 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
331
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
332
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
333 uint8_t t6_test_customview_warnings(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
334 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
335 uint8_t count = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
336
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
337 count = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
338 return count;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
339 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
340
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
341 /*
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
342
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
343 char text[512];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
344 uint16_t textpointer = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
345
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
346
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
347 // CVIEW_T3_Temperature
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
348 float temperatureThisCall;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
349 float temperature;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
350
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
351
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
352 // CVIEW_T3_StopWatch
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
353 SDivetime Stopwatch = {0,0,0,0};
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
354 float fAverageDepth, fAverageDepthAbsolute;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
355 uint16_t tempWinX0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
356 uint16_t tempWinY0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
357
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
358 switch(t6_selection_customview)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
359 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
360 case CVIEW_T3_ApnoeTimes:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
361 break;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
362
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
363 case CVIEW_T3_StopWatch:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
364 Stopwatch.Total = timer_Stopwatch_GetTime();
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
365 Stopwatch.Minutes = Stopwatch.Total / 60;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
366 Stopwatch.Seconds = Stopwatch.Total - ( Stopwatch.Minutes * 60 );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
367 fAverageDepth = timer_Stopwatch_GetAvarageDepth_Meter();
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
368 fAverageDepthAbsolute = stateUsed->lifeData.average_depth_meter;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
369
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
370 snprintf(text,TEXTSIZE,"\032\f%c",TXT_AvgDepth);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
371 GFX_write_string(&FontT42,&t6c1,text,0);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
372 snprintf(text,TEXTSIZE,"\030\003\016%01.1f",fAverageDepthAbsolute);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
373 GFX_write_string(&FontT105,&t6c1,text,0);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
374
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
375 tempWinX0 = t6c1.WindowX0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
376 tempWinY0 = t6c1.WindowY0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
377 t6c1.WindowX0 = 480;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
378 // snprintf(text,TEXTSIZE,"\032\f%c%c - %c",TXT_2BYTE, TXT2BYTE_Clock, TXT_AvgDepth);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
379 snprintf(text,TEXTSIZE,"\032\f%c", TXT_Stopwatch);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
380 GFX_write_string(&FontT42,&t6c1,text,0);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
381 snprintf(text,TEXTSIZE,"\030\016%01.1f",fAverageDepth);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
382 GFX_write_string(&FontT105,&t6c1,text,0);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
383 t6c1.WindowY0 = 100;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
384 snprintf(text,TEXTSIZE,"\030%u:\016\016%02u",Stopwatch.Minutes, Stopwatch.Seconds);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
385 GFX_write_string(&FontT105,&t6c1,text,0);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
386 t6c1.WindowX0 = tempWinX0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
387 t6c1.WindowY0 = tempWinY0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
388 break;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
389
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
390 case CVIEW_T3_Temperature:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
391 snprintf(text,TEXTSIZE,"\032\f%c",TXT_Temperature);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
392 GFX_write_string(&FontT42,&t6c1,text,0);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
393 // mean value
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
394 temperatureThisCall = unit_temperature_float(stateUsed->lifeData.temperature_celsius);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
395 temperature = (temperatureThisCall + temperatureLastCall[0] + temperatureLastCall[1] + temperatureLastCall[2]) / 4.0f;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
396 idTemperatureLastCall++;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
397 if(idTemperatureLastCall >= 3)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
398 idTemperatureLastCall = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
399 temperatureLastCall[idTemperatureLastCall] = temperatureThisCall;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
400 textpointer = snprintf(text,TEXTSIZE,"\030\003\016%01.1f \140",temperature); // "\016\016%01.1f `" + C or F
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
401 if(settingsGetPointer()->nonMetricalSystem == 0)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
402 text[textpointer++] = 'C';
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
403 else
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
404 text[textpointer++] = 'F';
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
405 text[textpointer++] = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
406 GFX_write_string(&FontT105,&t6c1,text,0);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
407 break;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
408
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
409 case CVIEW_Compass:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
410 snprintf(text,TEXTSIZE,"\032\f%c%c",TXT_2BYTE, TXT2BYTE_Compass);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
411 GFX_write_string(&FontT42,&t6c1,text,0);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
412 snprintf(text,100,"\030\003%03i`",(uint16_t)stateUsed->lifeData.compass_heading);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
413 GFX_write_string(&FontT105,&t6c1,text,0);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
414 t6_compass((uint16_t)stateUsed->lifeData.compass_heading, stateUsed->diveSettings.compassHeading);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
415 break;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
416
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
417 case CVIEW_T3_MaxDepth:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
418 default:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
419 snprintf(text,TEXTSIZE,"\032\f%c",TXT_MaxDepth);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
420 GFX_write_string(&FontT42,&t6c1,text,0);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
421 snprintf(text,TEXTSIZE,"\020\003\016%01.1f",unit_depth_float(stateUsed->lifeData.max_depth_meter));
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
422 t3_basics_colorscheme_mod(text);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
423 GFX_write_string(&FontT105,&t6c1,text,1);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
424 break;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
425 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
426 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
427
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
428
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
429 void t6_show_customview_warnings(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
430 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
431 char text[256], textMain[256];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
432 uint8_t textpointer, textpointerMain, lineFree, more;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
433
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
434 snprintf(text,TEXTSIZE,"\025\f%c",TXT_Warning);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
435 GFX_write_string(&FontT42,&t6c1,text,0);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
436
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
437 lineFree = 1;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
438 more = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
439
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
440 textpointerMain = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
441 textMain[textpointerMain++] = '\025';
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
442 textMain[textpointerMain++] = '\003';
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
443
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
444 textpointer = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
445
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
446 text[textpointer++] = '\021';
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
447 text[textpointer++] = TXT_2BYTE;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
448 text[textpointer++] = TXT2BYTE_WarnDecoMissed;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
449 if(stateUsed->warnings.decoMissed)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
450 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
451 text[textpointer - 3] = '\025';
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
452 if(lineFree)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
453 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
454 textMain[textpointerMain++] = TXT_2BYTE;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
455 textMain[textpointerMain++] = text[textpointer - 1];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
456 textMain[textpointerMain] = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
457 lineFree--;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
458 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
459 else
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
460 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
461 more++;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
462 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
463 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
464
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
465 text[textpointer++] = '\t';
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
466 text[textpointer++] = '\021';
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
467 text[textpointer++] = TXT_2BYTE;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
468 text[textpointer++] = TXT2BYTE_WarnPPO2Low;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
469 if(stateUsed->warnings.ppO2Low)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
470 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
471 text[textpointer - 3] = '\025';
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
472 if(lineFree)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
473 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
474 textMain[textpointerMain++] = TXT_2BYTE;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
475 textMain[textpointerMain++] = text[textpointer - 1];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
476 textMain[textpointerMain] = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
477 lineFree--;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
478 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
479 else
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
480 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
481 more++;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
482 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
483 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
484
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
485 text[textpointer++] = '\n';
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
486 text[textpointer++] = '\r';
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
487 text[textpointer++] = '\021';
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
488 text[textpointer++] = TXT_2BYTE;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
489 text[textpointer++] = TXT2BYTE_WarnPPO2High;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
490 if(stateUsed->warnings.ppO2High)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
491 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
492 text[textpointer - 3] = '\025';
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
493 if(lineFree)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
494 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
495 textMain[textpointerMain++] = TXT_2BYTE;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
496 textMain[textpointerMain++] = text[textpointer - 1];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
497 textMain[textpointerMain] = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
498 lineFree--;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
499 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
500 else
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
501 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
502 more++;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
503 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
504 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
505
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
506 text[textpointer++] = '\t';
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
507 text[textpointer++] = '\021';
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
508 text[textpointer++] = TXT_2BYTE;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
509 text[textpointer++] = TXT2BYTE_WarnFallback;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
510 if(stateUsed->warnings.fallback)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
511 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
512 text[textpointer - 3] = '\025';
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
513 if(lineFree)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
514 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
515 textMain[textpointerMain++] = TXT_2BYTE;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
516 textMain[textpointerMain++] = text[textpointer - 1];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
517 textMain[textpointerMain] = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
518 lineFree--;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
519 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
520 else
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
521 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
522 more++;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
523 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
524 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
525
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
526 text[textpointer++] = '\n';
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
527 text[textpointer++] = '\r';
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
528 text[textpointer++] = '\021';
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
529 text[textpointer++] = TXT_2BYTE;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
530 text[textpointer++] = TXT2BYTE_WarnSensorLinkLost;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
531 if(stateUsed->warnings.sensorLinkLost)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
532 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
533 text[textpointer - 3] = '\025';
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
534 if(lineFree)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
535 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
536 textMain[textpointerMain++] = TXT_2BYTE;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
537 textMain[textpointerMain++] = text[textpointer - 1];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
538 textMain[textpointerMain] = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
539 lineFree--;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
540 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
541 else
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
542 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
543 more++;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
544 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
545 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
546
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
547 text[textpointer] = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
548 GFX_write_string(&FontT48,&t6c1,textMain,1);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
549 if(more)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
550 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
551 GFX_write_string(&FontT48,&t6c2,text,1);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
552 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
553 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
554
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
555
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
556 void t6_change_customview(void)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
557 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
558 const uint8_t *pViews;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
559 pViews = t6_customviews;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
560
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
561 while((*pViews != CVIEW_T3_END) && (*pViews != t6_selection_customview))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
562 {pViews++;}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
563
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
564 if(*pViews < CVIEW_T3_END)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
565 pViews++;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
566
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
567 if(*pViews == CVIEW_T3_END)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
568 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
569 t6_selection_customview = t6_customviews[0];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
570 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
571 else
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
572 t6_selection_customview = *pViews;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
573 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
574
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
575
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
576 void t3_basics_colorscheme_mod(char *text)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
577 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
578 if((text[0] == '\020') && !GFX_is_colorschemeDiveStandard())
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
579 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
580 text[0] = '\027';
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
581 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
582 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
583
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
584 point_t t6_compass_circle(uint8_t id, uint16_t degree)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
585 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
586 float fCos, fSin;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
587 const float piMult = ((2 * 3.14159) / 360);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
588 // const int radius[4] = {95,105,115,60};
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
589 const int radius[4] = {85,95,105,90};
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
590 const point_t offset = {.x = 600, .y = 116};
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
591
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
592 static point_t r[4][360] = { 0 };
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
593
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
594 if(r[0][0].y == 0)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
595 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
596 for(int i=0;i<360;i++)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
597 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
598 fCos = cos(i * piMult);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
599 fSin = sin(i * piMult);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
600 for(int j=0;j<4;j++)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
601 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
602 r[j][i].x = offset.x + (int)(fSin * radius[j]);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
603 r[j][i].y = offset.y + (int)(fCos * radius[j]);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
604 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
605 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
606 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
607 if(id > 3) id = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
608 if(degree > 359) degree = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
609 return r[id][degree];
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
610 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
611
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
612
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
613 void t6_compass(uint16_t ActualHeading, uint16_t UserSetHeading)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
614 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
615 uint16_t LineHeading;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
616 point_t center;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
617 static int32_t LastHeading = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
618 int32_t newHeading = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
619 int32_t diff = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
620 int32_t diff2 = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
621
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
622 int32_t diffAbs = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
623 int32_t diffAbs2 = 0;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
624
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
625 newHeading = ActualHeading;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
626
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
627 diff = newHeading - LastHeading;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
628
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
629 if(newHeading < LastHeading)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
630 diff2 = newHeading + 360 - LastHeading;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
631 else
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
632 diff2 = newHeading - 360 - LastHeading;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
633
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
634 diffAbs = diff;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
635 if(diffAbs < 0)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
636 diffAbs *= -1;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
637
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
638 diffAbs2 = diff2;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
639 if(diffAbs2 < 0)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
640 diffAbs2 *= -1;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
641
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
642
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
643 if(diffAbs <= diffAbs2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
644 newHeading = LastHeading + (diff / 2);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
645 else
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
646 newHeading = LastHeading + (diff2 / 2);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
647
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
648 if(newHeading < 0)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
649 newHeading += 360;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
650 else
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
651 if(newHeading >= 360)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
652 newHeading -= 360;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
653
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
654 LastHeading = newHeading;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
655 ActualHeading = newHeading;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
656
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
657 if (ActualHeading < 90)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
658 ActualHeading += 360;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
659
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
660 while(ActualHeading > 359) ActualHeading -= 360;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
661
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
662 LineHeading = 360 - ActualHeading;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
663 GFX_draw_thick_line(9,&t6screen, t6_compass_circle(0,LineHeading), t6_compass_circle(2,LineHeading), CLUT_Font030); // North
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
664 LineHeading += 90;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
665 if(LineHeading > 359) LineHeading -= 360;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
666 GFX_draw_thick_line(9,&t6screen, t6_compass_circle(1,LineHeading), t6_compass_circle(2,LineHeading), CLUT_Font031); // Maintick
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
667 LineHeading += 90;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
668 if(LineHeading > 359) LineHeading -= 360;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
669 GFX_draw_thick_line(9,&t6screen, t6_compass_circle(1,LineHeading), t6_compass_circle(2,LineHeading), CLUT_Font031);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
670 LineHeading += 90;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
671 if(LineHeading > 359) LineHeading -= 360;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
672 GFX_draw_thick_line(9,&t6screen, t6_compass_circle(1,LineHeading), t6_compass_circle(2,LineHeading), CLUT_Font031);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
673
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
674 LineHeading = 360 - ActualHeading;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
675 LineHeading += 45;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
676 if(LineHeading > 359) LineHeading -= 360;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
677 GFX_draw_thick_line(5,&t6screen, t6_compass_circle(1,LineHeading), t6_compass_circle(2,LineHeading), CLUT_Font031); // Subtick
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
678 LineHeading += 90;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
679 if(LineHeading > 359) LineHeading -= 360;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
680 GFX_draw_thick_line(5,&t6screen, t6_compass_circle(1,LineHeading), t6_compass_circle(2,LineHeading), CLUT_Font031);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
681 LineHeading += 90;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
682 if(LineHeading > 359) LineHeading -= 360;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
683 GFX_draw_thick_line(5,&t6screen, t6_compass_circle(1,LineHeading), t6_compass_circle(2,LineHeading), CLUT_Font031);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
684 LineHeading += 90;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
685 if(LineHeading > 359) LineHeading -= 360;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
686 GFX_draw_thick_line(5,&t6screen, t6_compass_circle(1,LineHeading), t6_compass_circle(2,LineHeading), CLUT_Font031);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
687
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
688 LineHeading = 360 - ActualHeading;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
689 LineHeading += 22;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
690 if(LineHeading > 359) LineHeading -= 360;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
691 GFX_draw_thick_line(3,&t6screen, t6_compass_circle(1,LineHeading), t6_compass_circle(2,LineHeading), CLUT_Font031); // Subtick
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
692 LineHeading += 45;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
693 if(LineHeading > 359) LineHeading -= 360;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
694 GFX_draw_thick_line(3,&t6screen, t6_compass_circle(1,LineHeading), t6_compass_circle(2,LineHeading), CLUT_Font031);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
695 LineHeading += 45;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
696 if(LineHeading > 359) LineHeading -= 360;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
697 GFX_draw_thick_line(3,&t6screen, t6_compass_circle(1,LineHeading), t6_compass_circle(2,LineHeading), CLUT_Font031);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
698 LineHeading += 45;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
699 if(LineHeading > 359) LineHeading -= 360;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
700 GFX_draw_thick_line(3,&t6screen, t6_compass_circle(1,LineHeading), t6_compass_circle(2,LineHeading), CLUT_Font031);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
701 LineHeading += 45;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
702 if(LineHeading > 359) LineHeading -= 360;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
703 GFX_draw_thick_line(3,&t6screen, t6_compass_circle(1,LineHeading), t6_compass_circle(2,LineHeading), CLUT_Font031); // Subtick
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
704 LineHeading += 45;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
705 if(LineHeading > 359) LineHeading -= 360;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
706 GFX_draw_thick_line(3,&t6screen, t6_compass_circle(1,LineHeading), t6_compass_circle(2,LineHeading), CLUT_Font031);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
707 LineHeading += 45;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
708 if(LineHeading > 359) LineHeading -= 360;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
709 GFX_draw_thick_line(3,&t6screen, t6_compass_circle(1,LineHeading), t6_compass_circle(2,LineHeading), CLUT_Font031);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
710 LineHeading += 45;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
711 if(LineHeading > 359) LineHeading -= 360;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
712 GFX_draw_thick_line(3,&t6screen, t6_compass_circle(1,LineHeading), t6_compass_circle(2,LineHeading), CLUT_Font031);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
713
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
714 if(UserSetHeading)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
715 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
716 LineHeading = UserSetHeading + 360 - ActualHeading;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
717 if(LineHeading > 359) LineHeading -= 360;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
718 GFX_draw_thick_line(9,&t6screen, t6_compass_circle(3,LineHeading), t6_compass_circle(2,LineHeading), CLUT_CompassUserHeadingTick);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
719
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
720 // R�ckpeilung, User Back Heading
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
721 LineHeading = UserSetHeading + 360 + 180 - ActualHeading;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
722 if(LineHeading > 359) LineHeading -= 360;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
723 if(LineHeading > 359) LineHeading -= 360;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
724 GFX_draw_thick_line(9,&t6screen, t6_compass_circle(3,LineHeading), t6_compass_circle(2,LineHeading), CLUT_CompassUserBackHeadingTick);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
725 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
726
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
727 center.x = 600;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
728 center.y = 116;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
729 GFX_draw_circle(&t6screen, center, 106, CLUT_Font030);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
730 GFX_draw_circle(&t6screen, center, 107, CLUT_Font030);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
731 GFX_draw_circle(&t6screen, center, 108, CLUT_Font030);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
732 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
733 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
734