Mercurial > public > ostc4
comparison Discovery/Src/t3.c @ 582:64bf41faab83
Show Fallback if no valid sensor value is available:
In previous version fallback was shown when communication to HUD was lost. Now it will be displayed in case no sensor value ist judged as valid. In case of a fallback event ppo2 warnings as well as the data readings are no longer displayed.
author | Ideenmodellierer |
---|---|
date | Sat, 12 Dec 2020 20:52:58 +0100 |
parents | 9bb9a52d6ae5 |
children | f52bc70e380f |
comparison
equal
deleted
inserted
replaced
581:011d8f9f5ddb | 582:64bf41faab83 |
---|---|
687 } | 687 } |
688 | 688 |
689 | 689 |
690 void t3_basics_refresh_customview(float depth, uint8_t tX_selection_customview, GFX_DrawCfgScreen *tXscreen, GFX_DrawCfgWindow* tXc1, GFX_DrawCfgWindow* tXc2, uint8_t mode) | 690 void t3_basics_refresh_customview(float depth, uint8_t tX_selection_customview, GFX_DrawCfgScreen *tXscreen, GFX_DrawCfgWindow* tXc1, GFX_DrawCfgWindow* tXc2, uint8_t mode) |
691 { | 691 { |
692 static uint8_t last_customview = CVIEW_END; | |
693 | |
692 char text[512]; | 694 char text[512]; |
693 uint16_t textpointer = 0; | 695 uint16_t textpointer = 0; |
694 | 696 |
695 SSettings* pSettings; | 697 SSettings* pSettings; |
696 pSettings = settingsGetPointer(); | 698 pSettings = settingsGetPointer(); |
755 } | 757 } |
756 else | 758 else |
757 { | 759 { |
758 heading = (uint16_t)stateUsed->lifeData.compass_heading; | 760 heading = (uint16_t)stateUsed->lifeData.compass_heading; |
759 } | 761 } |
762 if(last_customview != tX_selection_customview) /* check if current selection is disabled and should be skipped */ | |
763 { | |
764 if(t3_customview_disabled(tX_selection_customview)) | |
765 { | |
766 tX_selection_customview = t3_change_customview(ACTION_BUTTON_ENTER); | |
767 } | |
768 last_customview = tX_selection_customview; | |
769 } | |
760 | 770 |
761 switch(tX_selection_customview) | 771 switch(tX_selection_customview) |
762 { | 772 { |
763 case CVIEW_T3_ApnoeSurfaceInfo: | 773 case CVIEW_T3_ApnoeSurfaceInfo: |
764 snprintf(text,TEXTSIZE,"\032\f%c",TXT_MaxDepth); | 774 snprintf(text,TEXTSIZE,"\032\f%c",TXT_MaxDepth); |
1411 } | 1421 } |
1412 i++; | 1422 i++; |
1413 } | 1423 } |
1414 | 1424 |
1415 if (((view == CVIEW_sensors) || (view == CVIEW_sensors_mV)) && | 1425 if (((view == CVIEW_sensors) || (view == CVIEW_sensors_mV)) && |
1416 ((stateUsed->diveSettings.ppo2sensors_deactivated == 0x07) || (stateUsed->diveSettings.ccrOption == 0))) | 1426 ((stateUsed->diveSettings.ppo2sensors_deactivated == 0x07) || (stateUsed->diveSettings.ccrOption == 0) || stateUsed->warnings.fallback)) |
1417 { | 1427 { |
1418 cv_disabled = 1; | 1428 cv_disabled = 1; |
1419 } | 1429 } |
1420 | 1430 |
1421 return cv_disabled; | 1431 return cv_disabled; |
1422 } | 1432 } |
1423 | 1433 |
1424 void t3_change_customview(uint8_t action) | 1434 uint8_t t3_change_customview(uint8_t action) |
1425 { | 1435 { |
1426 | 1436 |
1427 t3_basics_change_customview(&t3_selection_customview, t3_customviewsStandard, action); | 1437 t3_basics_change_customview(&t3_selection_customview, t3_customviewsStandard, action); |
1438 return t3_selection_customview; | |
1428 } | 1439 } |
1429 | 1440 |
1430 | 1441 |
1431 void t3_basics_change_customview(uint8_t *tX_selection_customview,const uint8_t *tX_customviews, uint8_t action) | 1442 void t3_basics_change_customview(uint8_t *tX_selection_customview,const uint8_t *tX_customviews, uint8_t action) |
1432 { | 1443 { |