Mercurial > public > ostc4
comparison Discovery/Src/tMenuGas.c @ 351:ba53ab77f059
Merge
author | heinrichsweikamp |
---|---|
date | Sun, 06 Oct 2019 14:12:41 +0200 |
parents | 3f09b283d993 |
children | a9c195be907e |
comparison
equal
deleted
inserted
replaced
341:591c03a1e68d | 351:ba53ab77f059 |
---|---|
72 | 72 |
73 void tMG_refresh(uint8_t line, char *text, uint16_t *tab, char *subtext, uint8_t start, uint8_t gasMode) | 73 void tMG_refresh(uint8_t line, char *text, uint16_t *tab, char *subtext, uint8_t start, uint8_t gasMode) |
74 { | 74 { |
75 const SGasLine * pGasLine; | 75 const SGasLine * pGasLine; |
76 | 76 |
77 uint8_t gasId, oxygen, helium, depthUp, active, first, typeDeco, wirelessId; | 77 uint8_t gasId, oxygen, helium, depthUp, active, first, typeDeco; |
78 float fPpO2limitHigh = 0; | 78 float fPpO2limitHigh = 0; |
79 float fPpO2ofGasAtThisDepth = 0; | 79 float fPpO2ofGasAtThisDepth = 0; |
80 //uint8_t senderCode, depthDown,; | 80 //uint8_t senderCode, depthDown,; |
81 //uint16_t bar; | 81 //uint16_t bar; |
82 uint16_t textPointer, mod, ltr; | 82 uint16_t textPointer, mod, ltr; |
140 active = pGasLine[gasId].note.ub.active; | 140 active = pGasLine[gasId].note.ub.active; |
141 first = pGasLine[gasId].note.ub.first; | 141 first = pGasLine[gasId].note.ub.first; |
142 typeDeco = pGasLine[gasId].note.ub.deco; | 142 typeDeco = pGasLine[gasId].note.ub.deco; |
143 mod = calc_MOD(gasId); | 143 mod = calc_MOD(gasId); |
144 ltr = pGasLine[gasId].bottle_size_liter; | 144 ltr = pGasLine[gasId].bottle_size_liter; |
145 wirelessId = pGasLine[gasId].bottle_wireless_id; | |
146 //bar = stateUsed->lifeData.bottle_bar[gasId]; | 145 //bar = stateUsed->lifeData.bottle_bar[gasId]; |
147 | 146 |
148 if(active) | 147 if(active) |
149 { | 148 { |
150 if(actual_menu_content == MENU_SURFACE) | 149 if(actual_menu_content == MENU_SURFACE) |
222 color[1] = '\020'; | 221 color[1] = '\020'; |
223 /* ltr */ | 222 /* ltr */ |
224 if(ltr) | 223 if(ltr) |
225 color[2] = '\020'; | 224 color[2] = '\020'; |
226 /* bar */ | 225 /* bar */ |
227 if(wirelessId) | |
228 color[3] = '\020'; | |
229 /* wireless */ | |
230 if(wirelessId) | |
231 color[4] = '\020'; | |
232 /* ltr, bar */ | |
233 | 226 |
234 if(mod < depthUp) | 227 if(mod < depthUp) |
235 { | 228 { |
236 color[0] = '\025'; | 229 color[0] = '\025'; |
237 color[1] = '\025'; | 230 color[1] = '\025'; |
300 "bar" | 293 "bar" |
301 "\017", | 294 "\017", |
302 color[3], bar | 295 color[3], bar |
303 ); | 296 ); |
304 */ | 297 */ |
305 /* wireless */ | |
306 /* | |
307 if(wirelessId) | |
308 { | |
309 textPointer += snprintf(&text[textPointer], 8,\ | |
310 "%c" | |
311 " *" | |
312 "%u", | |
313 color[4], (wirelessId%0x0F) | |
314 ); | |
315 } | |
316 */ | |
317 text[textPointer++] = '\035'; | 298 text[textPointer++] = '\035'; |
318 text[textPointer++] = '\n'; | 299 text[textPointer++] = '\n'; |
319 text[textPointer++] = '\r'; | 300 text[textPointer++] = '\r'; |
320 text[textPointer] = 0; | 301 text[textPointer] = 0; |
321 } | 302 } |