comparison Discovery/Src/t7.c @ 577:9bb9a52d6ae5

Handle o2 voltage values < 0.5mV as invalid: Values < 0.5mv will now be handled as ppo2 = 0Bar to avaid problems (e.g. by negativ values) in the decompression calculation. In the custom display sensors with low voltage are show using '-'
author Ideenmodellierer
date Sun, 29 Nov 2020 22:58:11 +0100
parents 1c95f811967c
children 64bf41faab83
comparison
equal deleted inserted replaced
576:1105cf7bbf6f 577:9bb9a52d6ae5
1660 } while(cv_disabled); 1660 } while(cv_disabled);
1661 1661
1662 selection_customview = *pViews; 1662 selection_customview = *pViews;
1663 } 1663 }
1664 1664
1665 void t7_select_customview(uint8_t selectedCustomview)
1666 {
1667 if(selectedCustomview < CVIEW_END)
1668 {
1669 selection_customview = selectedCustomview;
1670 }
1671 }
1665 1672
1666 uint8_t t7_get_length_of_customtext(void) 1673 uint8_t t7_get_length_of_customtext(void)
1667 { 1674 {
1668 uint8_t i = 0; 1675 uint8_t i = 0;
1669 settingsGetPointer()->customtext[60-1] = 0; 1676 settingsGetPointer()->customtext[60-1] = 0;
1974 GFX_write_string(&FontT42,&t7cH,text,0); 1981 GFX_write_string(&FontT42,&t7cH,text,0);
1975 textpointer = 0; 1982 textpointer = 0;
1976 text[textpointer++] = '\030'; // main color 1983 text[textpointer++] = '\030'; // main color
1977 for(int i=0;i<3;i++) 1984 for(int i=0;i<3;i++)
1978 { 1985 {
1979 if(stateUsed->diveSettings.ppo2sensors_deactivated & (1<<i)) 1986 if((stateUsed->diveSettings.ppo2sensors_deactivated & (1<<i)) || (stateUsed->lifeData.ppO2Sensor_bar[i] == 0.0))
1980 { 1987 {
1981 text[textpointer++] = '\031'; // labelcolor 1988 text[textpointer++] = '\031'; // labelcolor
1982 text[textpointer++] = '\001'; 1989 text[textpointer++] = '\001';
1983 text[textpointer++] = '-'; 1990 text[textpointer++] = '-';
1984 text[textpointer++] = '\n'; 1991 text[textpointer++] = '\n';