Mercurial > public > ostc4
comparison Discovery/Src/tMenuEditDecoParameter.c @ 902:d4622533271d Evo_2_23
VPM table mode:
Because of the model maths, usage of float data type and so on it may happen that the TTS decreases during ascent and continues calculation of the vpm. To keep the values stable the vpm table mode has been introduces. Instead of continously calculation of the stops the stop time is decreased if the diver is close to a deco stop. If the table is violated (e.g. by not doing gas change) the table will be updated to the new, longer runtime. The table will not be switch back to a shorter version in case e.g. the missed gas change is performed
author | Ideenmodellierer |
---|---|
date | Wed, 02 Oct 2024 22:18:19 +0200 |
parents | ba229a012ac7 |
children |
comparison
equal
deleted
inserted
replaced
901:e4e9acfde839 | 902:d4622533271d |
---|---|
31 | 31 |
32 #include "gfx_fonts.h" | 32 #include "gfx_fonts.h" |
33 #include "tMenuEdit.h" | 33 #include "tMenuEdit.h" |
34 #include "unit.h" // last stop in meter and feet | 34 #include "unit.h" // last stop in meter and feet |
35 | 35 |
36 #define MEDP_TAB (380) | 36 #define MEDP_TAB (525) |
37 | 37 |
38 /* Private function prototypes -----------------------------------------------*/ | 38 /* Private function prototypes -----------------------------------------------*/ |
39 static void openEdit_DecoAlgorithm(void); | 39 static void openEdit_DecoAlgorithm(void); |
40 static void openEdit_DecoGF(void); | 40 static void openEdit_DecoGF(void); |
41 static void openEdit_DecoAltGF(void); | 41 static void openEdit_DecoAltGF(void); |
42 static void openEdit_DecoVPM(void); | 42 static void openEdit_DecoVPM(void); |
43 static void openEdit_DecoLastStop(void); | 43 static void openEdit_DecoLastStop(void); |
44 static void openEdit_DecoVpmTable(void); | |
44 static void openEdit_DM_SwitchAlgorithm(uint8_t line); | 45 static void openEdit_DM_SwitchAlgorithm(uint8_t line); |
45 | 46 |
46 //void openEdit_DecoGasUsage(void); | 47 //void openEdit_DecoGasUsage(void); |
47 | 48 |
48 /* Announced function prototypes -----------------------------------------------*/ | 49 /* Announced function prototypes -----------------------------------------------*/ |
79 break; | 80 break; |
80 case 5: | 81 case 5: |
81 openEdit_DecoLastStop(); | 82 openEdit_DecoLastStop(); |
82 break; | 83 break; |
83 case 6: | 84 case 6: |
85 openEdit_DecoVpmTable(); | |
84 break; | 86 break; |
85 } | 87 } |
86 } | 88 } |
87 else | 89 else |
88 openEdit_DM_SwitchAlgorithm(line); | 90 openEdit_DM_SwitchAlgorithm(line); |
229 | 231 |
230 setEvent(StMDECOP5_LASTSTOP, (uint32_t)OnAction_LastStop); | 232 setEvent(StMDECOP5_LASTSTOP, (uint32_t)OnAction_LastStop); |
231 startEdit(); | 233 startEdit(); |
232 } | 234 } |
233 | 235 |
236 static void openEdit_DecoVpmTable(void) | |
237 { | |
238 SSettings *pSettings = settingsGetPointer(); | |
239 | |
240 if(pSettings->VPM_conservatism.ub.alternative == 0) | |
241 { | |
242 pSettings->VPM_conservatism.ub.alternative = 1; | |
243 } | |
244 else | |
245 { | |
246 pSettings->VPM_conservatism.ub.alternative = 0; | |
247 } | |
248 exitEditWithUpdate(); | |
249 } | |
250 | |
234 uint8_t OnAction_VPM(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | 251 uint8_t OnAction_VPM(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) |
235 { | 252 { |
236 SSettings *pSettings; | 253 SSettings *pSettings; |
237 uint8_t digitContentNew; | 254 uint8_t digitContentNew; |
238 uint32_t newConservatism; | 255 uint32_t newConservatism; |