Mercurial > public > ostc4
comparison Discovery/Src/tMenuEditXtra.c @ 845:17d9d6eddd8d Evo_2_23
Added new PreDiveCheck info page:
In case a DiveO2 sensor is connected to the OSTC than the values of the DiveO2 internal pressure and temperature sensors may be used for predive checks. The pressure sensors is used for over / under pressure test and the values are visualized using a graph to make it easier to check if the pressure keeps stable. The temperature measurement gives an indication if the scrubber is getting active. This view is highly dependend on the surface temperature but may be useful e.g. for diving in european area.
In addition the values ofthe connected sensors are shown.
author | Ideenmodellierer |
---|---|
date | Sun, 21 Jan 2024 22:24:36 +0100 |
parents | ffb1036c27c2 |
children | 7755a476f164 |
comparison
equal
deleted
inserted
replaced
844:e04d7dd199fb | 845:17d9d6eddd8d |
---|---|
36 #include "timer.h" | 36 #include "timer.h" |
37 #include "tMenuEdit.h" | 37 #include "tMenuEdit.h" |
38 #include "data_exchange_main.h" | 38 #include "data_exchange_main.h" |
39 #include "motion.h" | 39 #include "motion.h" |
40 #include "configuration.h" | 40 #include "configuration.h" |
41 #include "tInfoPreDive.h" | |
41 | 42 |
42 | 43 |
43 /* Private function prototypes -----------------------------------------------*/ | 44 /* Private function prototypes -----------------------------------------------*/ |
44 void openEdit_CompassHeading(void); | 45 void openEdit_CompassHeading(void); |
45 void openEdit_ResetStopwatch(void); | 46 void openEdit_ResetStopwatch(void); |
105 break; | 106 break; |
106 } | 107 } |
107 } | 108 } |
108 else /* surface mode */ | 109 else /* surface mode */ |
109 { | 110 { |
110 if((settingsGetPointer()->dive_mode != DIVEMODE_PSCR) && (line > 3)) /* PSCR items are only optional */ | |
111 { | |
112 line = 6; | |
113 } | |
114 | |
115 switch(line) | 111 switch(line) |
116 { | 112 { |
117 case 1: openEdit_CCRModeSensorOrFixedSP(); | 113 case 1: openEdit_CCRModeSensorOrFixedSP(); |
118 break; | 114 break; |
119 case 2: openEdit_Fallback(); | 115 case 2: openEdit_Fallback(); |
122 break; | 118 break; |
123 #ifdef ENABLE_PSCR_MODE | 119 #ifdef ENABLE_PSCR_MODE |
124 case 4: openEdit_PSCR(); | 120 case 4: openEdit_PSCR(); |
125 break; | 121 break; |
126 #endif | 122 #endif |
123 case 5: openInfo_PreDive(); | |
124 break; | |
127 default: | 125 default: |
128 break; | 126 break; |
129 } | 127 } |
130 } | 128 } |
131 } | 129 } |
393 { | 391 { |
394 drawCompassHeadingMenu(true); | 392 drawCompassHeadingMenu(true); |
395 } | 393 } |
396 | 394 |
397 | 395 |
398 void refresh_CO2Data(void) | |
399 { | |
400 char text[32]; | |
401 | |
402 snprintf(text,32,"\001%c",TXT_CO2Sensor); | |
403 write_topline(text); | |
404 | |
405 snprintf(text,32,"CO2: %ld ppm",stateUsed->lifeData.CO2_data.CO2_ppm); | |
406 write_label_var( 30, 800, ME_Y_LINE1, &FontT48, text); | |
407 | |
408 snprintf(text,32,"Signal: %d",stateUsed->lifeData.CO2_data.signalStrength); | |
409 write_label_var( 30, 800, ME_Y_LINE2, &FontT48, text); | |
410 | |
411 tMenuEdit_refresh_field(StMXTRA_CO2_Sensor); | |
412 tMenuEdit_refresh_field(StMXTRA_CO2_Sensor_Calib); | |
413 } | |
414 | |
415 void openEdit_CompassHeading(void) | 396 void openEdit_CompassHeading(void) |
416 { | 397 { |
417 drawCompassHeadingMenu(false); | 398 drawCompassHeadingMenu(false); |
418 } | 399 } |
419 | 400 |