Mercurial > public > ostc4
comparison Discovery/Src/tMenuEditSetpoint.c @ 638:4532953ac1a0
Added last measured PPO2 value to sensor selection dialog:
In the divemenu => setpoint => UseSensor menu just the number of the sensor was as label. To have a better base for the selection decision the last measured value is now added to the label.
author | Ideenmodellierer |
---|---|
date | Wed, 24 Feb 2021 21:45:35 +0100 |
parents | ba229a012ac7 |
children | 5f0d3dce5ef4 |
comparison
equal
deleted
inserted
replaced
637:d7dec417afa4 | 638:4532953ac1a0 |
---|---|
127 else // entire sub menu during dive to select sensors active | 127 else // entire sub menu during dive to select sensors active |
128 { | 128 { |
129 set_globalState_Menu_Line(line); | 129 set_globalState_Menu_Line(line); |
130 resetMenuEdit(CLUT_MenuPageGasSP); | 130 resetMenuEdit(CLUT_MenuPageGasSP); |
131 | 131 |
132 char text[3]; | 132 char text[20]; |
133 uint8_t sensorActive[3]; | 133 uint8_t sensorActive[3]; |
134 | 134 |
135 text[0] = '\001'; | 135 text[0] = '\001'; |
136 text[1] = TXT_o2Sensors; | 136 text[1] = TXT_o2Sensors; |
137 text[2] = 0; | 137 text[2] = 0; |
138 write_topline(text); | 138 write_topline(text); |
139 | 139 |
140 write_label_var( 96, 340, ME_Y_LINE1, &FontT48, "Sensor 1"); | 140 if(stateUsedWrite->diveSettings.ppo2sensors_deactivated & 1) |
141 write_label_var( 96, 340, ME_Y_LINE2, &FontT48, "Sensor 2"); | 141 { |
142 write_label_var( 96, 340, ME_Y_LINE3, &FontT48, "Sensor 3"); | 142 snprintf (text,20,"Sensor 1"); |
143 sensorActive[0] = 0; | |
144 } | |
145 else | |
146 { | |
147 snprintf (text,20,"Sensor 1 (%01.2f)", stateUsed->lifeData.ppO2Sensor_bar[0] ); | |
148 } | |
149 write_label_var( 96, 600, ME_Y_LINE1, &FontT48, text); | |
150 if(stateUsedWrite->diveSettings.ppo2sensors_deactivated & 2) | |
151 { | |
152 snprintf (text,20,"Sensor 2"); | |
153 sensorActive[1] = 0; | |
154 } | |
155 else | |
156 { | |
157 snprintf (text,20,"Sensor 2 (%01.2f)", stateUsed->lifeData.ppO2Sensor_bar[1] ); | |
158 } | |
159 write_label_var( 96, 600, ME_Y_LINE2, &FontT48, text); | |
160 if(stateUsedWrite->diveSettings.ppo2sensors_deactivated & 4) | |
161 { | |
162 snprintf (text,20,"Sensor 3"); | |
163 sensorActive[2] = 0; | |
164 } | |
165 else | |
166 { | |
167 snprintf (text,20,"Sensor 3 (%01.2f)", stateUsed->lifeData.ppO2Sensor_bar[2] ); | |
168 } | |
169 write_label_var( 96, 600, ME_Y_LINE3, &FontT48, text); | |
143 | 170 |
144 sensorActive[0] = 1; | 171 sensorActive[0] = 1; |
145 sensorActive[1] = 1; | 172 sensorActive[1] = 1; |
146 sensorActive[2] = 1; | 173 sensorActive[2] = 1; |
147 if(stateUsedWrite->diveSettings.ppo2sensors_deactivated & 1) | |
148 sensorActive[0] = 0; | |
149 if(stateUsedWrite->diveSettings.ppo2sensors_deactivated & 2) | |
150 sensorActive[1] = 0; | |
151 if(stateUsedWrite->diveSettings.ppo2sensors_deactivated & 4) | |
152 sensorActive[2] = 0; | |
153 | 174 |
154 write_field_on_off(StMSP_Sensor1, 30, 95, ME_Y_LINE1, &FontT48, "", sensorActive[0]); | 175 write_field_on_off(StMSP_Sensor1, 30, 95, ME_Y_LINE1, &FontT48, "", sensorActive[0]); |
155 write_field_on_off(StMSP_Sensor2, 30, 95, ME_Y_LINE2, &FontT48, "", sensorActive[1]); | 176 write_field_on_off(StMSP_Sensor2, 30, 95, ME_Y_LINE2, &FontT48, "", sensorActive[1]); |
156 write_field_on_off(StMSP_Sensor3, 30, 95, ME_Y_LINE3, &FontT48, "", sensorActive[2]); | 177 write_field_on_off(StMSP_Sensor3, 30, 95, ME_Y_LINE3, &FontT48, "", sensorActive[2]); |
157 | 178 |