Mercurial > public > ostc4
comparison Discovery/Src/tInfoPreDive.c @ 849:fce639612464 Evo_2_23
Consider flipped screen for Predive menu:
In previous version some values were not optimized for the visualization while the screen is flipped.
| author | Ideenmodellierer |
|---|---|
| date | Thu, 29 Feb 2024 18:49:55 +0100 |
| parents | 17d9d6eddd8d |
| children | bad5561c0c59 |
comparison
equal
deleted
inserted
replaced
| 848:92a5dc16d52b | 849:fce639612464 |
|---|---|
| 162 text[2] = 0; | 162 text[2] = 0; |
| 163 tInfo_write_content_simple( 30, 770, ME_Y_LINE_BASE, &FontT48, text, CLUT_MenuPageHardware); | 163 tInfo_write_content_simple( 30, 770, ME_Y_LINE_BASE, &FontT48, text, CLUT_MenuPageHardware); |
| 164 | 164 |
| 165 for(index = 0; index < EXT_INTERFACE_MUX_OFFSET; index++) | 165 for(index = 0; index < EXT_INTERFACE_MUX_OFFSET; index++) |
| 166 { | 166 { |
| 167 if(pSettings->ext_sensor_map[index] == SENSOR_DIGO2M) | 167 if((pSettings->ext_sensor_map[index] == SENSOR_DIGO2M) || (pSettings->ext_sensor_map[index] == SENSOR_ANALOG)) |
| 168 { | 168 { |
| 169 snprintf(text,32,"%c%c%d: %01.2f", TXT_2BYTE, TXT2BYTE_Sensor, index, pStateReal->lifeData.ppO2Sensor_bar[index]); | 169 snprintf(text,32,"%c%c%d: %01.2f", TXT_2BYTE, TXT2BYTE_Sensor, index, pStateReal->lifeData.ppO2Sensor_bar[index]); |
| 170 tInfo_write_content_simple( 30, 200, ME_Y_LINE1 + (index * ME_Y_LINE_STEP), &FontT48, text, CLUT_Font020); | 170 tInfo_write_content_simple( 5, 780, ME_Y_LINE1 + (index * ME_Y_LINE_STEP), &FontT48, text, CLUT_Font020); |
| 171 } | 171 } |
| 172 else if(pSettings->ext_sensor_map[index] == SENSOR_CO2M) | 172 else if(pSettings->ext_sensor_map[index] == SENSOR_CO2M) |
| 173 { | 173 { |
| 174 snprintf(text,32,"CO2: %4ld", pStateReal->lifeData.CO2_data.CO2_ppm); | 174 snprintf(text,32,"CO2: %4ld", pStateReal->lifeData.CO2_data.CO2_ppm); |
| 175 tInfo_write_content_simple( 30, 200, ME_Y_LINE5, &FontT48, text, CLUT_Font020); | 175 tInfo_write_content_simple( 5, 780, ME_Y_LINE5, &FontT48, text, CLUT_Font020); |
| 176 } | 176 } |
| 177 } | 177 } |
| 178 | 178 |
| 179 wintempppO2.left = 350; | 179 wintempppO2.left = 350; |
| 180 wintempppO2.right = 590; | 180 wintempppO2.right = 590; |
| 181 | 181 |
| 182 wintemptemp.left = 350; | 182 wintemptemp.left = 350; |
| 183 wintemptemp.right = 590; | 183 wintemptemp.right = 590; |
| 184 | 184 |
| 185 if(!pSettings->FlipDisplay) | 185 wintempppO2.top = ME_Y_LINE3; |
| 186 { | 186 wintempppO2.bottom = wintempppO2.top + DELTA_SHIFT * 2; |
| 187 wintempppO2.top = ME_Y_LINE3; | 187 wintemptemp.top = ME_Y_LINE5; |
| 188 wintempppO2.bottom = wintempppO2.top + DELTA_SHIFT * 2; | 188 wintemptemp.bottom = wintemptemp.top + DELTA_SHIFT * 2; |
| 189 wintemptemp.top = ME_Y_LINE5; | |
| 190 wintemptemp.bottom = wintemptemp.top + DELTA_SHIFT * 2; | |
| 191 } | |
| 192 else | |
| 193 { | |
| 194 wintempppO2.top = 470; /* TODO: consider flip display */ | |
| 195 wintempppO2.bottom = wintempppO2.top + 100; | |
| 196 } | |
| 197 GFX_graph_print(&s, &wintempppO2, 1,1,0, DELTA_SHIFT * 2, pressureHistory, HISTORY_BUF_SIZE, CLUT_Font030, NULL); | |
| 198 | |
| 199 GFX_graph_print(&s, &wintemptemp, 1,1, surfaceTemperatureStart - 2000, surfaceTemperatureStart + 10000, temperatureHistory, HISTORY_BUF_SIZE, CLUT_Font030, NULL); | |
| 200 | 189 |
| 201 start.x = wintempppO2.left - 5; | 190 start.x = wintempppO2.left - 5; |
| 202 start.y = 480 - wintemptemp.bottom - 5; | 191 start.y = 480 - wintemptemp.bottom - 5; |
| 203 stop.x = wintempppO2.right- start.x + 5; | 192 stop.x = wintempppO2.right- start.x + 5; |
| 204 stop.y = DELTA_SHIFT * 2 + 10; | 193 stop.y = DELTA_SHIFT * 2 + 10; |
| 205 GFX_draw_box(&s, start, stop,1, CLUT_Font020); | 194 GFX_draw_box(&s, start, stop,1, CLUT_Font020); |
| 206 | 195 |
| 207 start.y = 480 - wintempppO2.bottom - 5; | 196 start.y = 480 - wintempppO2.bottom - 5; |
| 208 GFX_draw_box(&s, start, stop,1, CLUT_Font020); | 197 GFX_draw_box(&s, start, stop,1, CLUT_Font020); |
| 209 | 198 |
| 199 if(pSettings->FlipDisplay) | |
| 200 { | |
| 201 wintempppO2.left = 800 - 590; | |
| 202 wintempppO2.right = 800 - 350; | |
| 203 wintemptemp.left = 800 - 590; | |
| 204 wintemptemp.right = 800 - 350; | |
| 205 } | |
| 206 GFX_graph_print(&s, &wintempppO2, 1,1,0, DELTA_SHIFT * 2, pressureHistory, HISTORY_BUF_SIZE, CLUT_Font030, NULL); | |
| 207 | |
| 208 GFX_graph_print(&s, &wintemptemp, 1,1, surfaceTemperatureStart - 2000, surfaceTemperatureStart + 10000, temperatureHistory, HISTORY_BUF_SIZE, CLUT_Font030, NULL); | |
| 209 | |
| 210 /* Graph labeling */ | 210 /* Graph labeling */ |
| 211 snprintf(text,32,"%c%c", TXT_2BYTE, TXT2BYTE_CounterLung); | 211 snprintf(text,32,"%c%c", TXT_2BYTE, TXT2BYTE_CounterLung); |
| 212 tInfo_write_content_simple( 350, 780, ME_Y_LINE2, &FontT48, text, CLUT_Font020); | 212 tInfo_write_content_simple( 350, 795, ME_Y_LINE2, &FontT48, text, CLUT_Font020); |
| 213 | 213 |
| 214 snprintf(text,32,"\002\016\016%c%c", TXT_2BYTE, TXT2BYTE_Pressure); | 214 snprintf(text,32,"\002\016\016%c%c", TXT_2BYTE, TXT2BYTE_Pressure); |
| 215 tInfo_write_content_simple( 600, 780, ME_Y_LINE3, &FontT48, text, CLUT_Font020); | 215 tInfo_write_content_simple( 500, 795, ME_Y_LINE3, &FontT48, text, CLUT_Font020); |
| 216 snprintf(text,32,"\002%d",deltaPressure); | 216 snprintf(text,32,"\002%d",deltaPressure); |
| 217 tInfo_write_content_simple( 600, 780, ME_Y_LINE4, &FontT48, text, CLUT_Font020); | 217 tInfo_write_content_simple( 500, 795, ME_Y_LINE4, &FontT48, text, CLUT_Font020); |
| 218 snprintf(text,32,"\002\016\016%c",TXT_Temperature); | 218 snprintf(text,32,"\002\016\016%c",TXT_Temperature); |
| 219 tInfo_write_content_simple( 600, 780, ME_Y_LINE5, &FontT48, text, CLUT_Font020); | 219 tInfo_write_content_simple( 300, 795, ME_Y_LINE5, &FontT48, text, CLUT_Font020); |
| 220 snprintf(text,32,"\002%2.2f",(temperature / 1000.0)); | 220 snprintf(text,32,"\002%2.2f",(temperature / 1000.0)); |
| 221 tInfo_write_content_simple( 600, 780, ME_Y_LINE6, &FontT48, text, CLUT_Font020); | 221 tInfo_write_content_simple( 300, 795, ME_Y_LINE6, &FontT48, text, CLUT_Font020); |
| 222 } | 222 } |
| 223 | 223 |
| 224 void sendActionToInfoPreDive(uint8_t sendAction) | 224 void sendActionToInfoPreDive(uint8_t sendAction) |
| 225 { | 225 { |
| 226 switch(sendAction) | 226 switch(sendAction) |
