comparison Discovery/Src/tInfo.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 a370741a743b
children 92a5dc16d52b
comparison
equal deleted inserted replaced
844:e04d7dd199fb 845:17d9d6eddd8d
35 #include "tHome.h" 35 #include "tHome.h"
36 //#include "tInfoDive.h" 36 //#include "tInfoDive.h"
37 //#include "tInfoSurface.h" 37 //#include "tInfoSurface.h"
38 #include "tInfoCompass.h" 38 #include "tInfoCompass.h"
39 #include "tInfoSensor.h" 39 #include "tInfoSensor.h"
40 #include "tInfoPreDive.h"
40 #include "tMenu.h" 41 #include "tMenu.h"
41 #include "tMenuEdit.h" 42 #include "tMenuEdit.h"
42 43
43 #include <string.h> 44 #include <string.h>
44 45
220 break; 221 break;
221 case StISENINFO: tIscreen.FBStartAdress = getFrame(14); 222 case StISENINFO: tIscreen.FBStartAdress = getFrame(14);
222 infoColor = CLUT_MenuPageHardware; 223 infoColor = CLUT_MenuPageHardware;
223 refreshInfo_Sensor(tIscreen); 224 refreshInfo_Sensor(tIscreen);
224 break; 225 break;
226 case StIPREDIVE: tIscreen.FBStartAdress = getFrame(14);
227 infoColor = CLUT_MenuPageGasCC;
228 refreshInfo_PreDive(tIscreen);
229 break;
230
225 default: 231 default:
226 break; 232 break;
227 } 233 }
228 } 234 }
229 if(oldIscreen != tIscreen.FBStartAdress) 235 if(oldIscreen != tIscreen.FBStartAdress)
817 localtext[2] = right2ByteCode; 823 localtext[2] = right2ByteCode;
818 localtext[3] = 0; 824 localtext[3] = 0;
819 write_content_simple(screenPtr, 0, 800, 480-24, &FontT24,localtext,CLUT_ButtonSurfaceScreen); 825 write_content_simple(screenPtr, 0, 800, 480-24, &FontT24,localtext,CLUT_ButtonSurfaceScreen);
820 } 826 }
821 } 827 }
828 void tInfo_write_buttonTextline_simple(uint8_t left2ByteCode, char middle2ByteCode, char right2ByteCode)
829 {
830 char localtext[32];
831
832 if(left2ByteCode)
833 {
834 localtext[0] = TXT_2BYTE;
835 localtext[1] = left2ByteCode;
836 localtext[2] = 0;
837 tInfo_write_content_simple(0, 800, 480-24, &FontT24,localtext,CLUT_ButtonSurfaceScreen);
838 }
839
840 if(middle2ByteCode)
841 {
842 localtext[0] = '\001';
843 localtext[1] = TXT_2BYTE;
844 localtext[2] = middle2ByteCode;
845 localtext[3] = 0;
846 tInfo_write_content_simple(0, 800, 480-24, &FontT24,localtext,CLUT_ButtonSurfaceScreen);
847 }
848
849 if(right2ByteCode)
850 {
851 localtext[0] = '\002';
852 localtext[1] = TXT_2BYTE;
853 localtext[2] = right2ByteCode;
854 localtext[3] = 0;
855 tInfo_write_content_simple(0, 800, 480-24, &FontT24,localtext,CLUT_ButtonSurfaceScreen);
856 }
857 }