comparison Discovery/Src/t7.c @ 775:46c6d2380d4e

Add a shortcuts to change the setpoint to the loop to the 'normal' display when diving. It is only shown when diving in CCR mode and on the loop. Uses the configured setpoint with the highest / lowest switch depth as the high / low setpoints respectively. (mikeller)
author heinrichsweikamp
date Thu, 11 May 2023 12:13:03 +0200
parents 2c243233c999
children 45b8f3c2acce 6a8cf91e5b22
comparison
equal deleted inserted replaced
774:6169309d6eb9 775:46c6d2380d4e
44 #include "timer.h" 44 #include "timer.h"
45 #include "unit.h" 45 #include "unit.h"
46 #include "motion.h" 46 #include "motion.h"
47 #include "configuration.h" 47 #include "configuration.h"
48 #include "base.h" 48 #include "base.h"
49 #include "tMenuEditSetpoint.h"
49 50
50 /* Private function prototypes -----------------------------------------------*/ 51 /* Private function prototypes -----------------------------------------------*/
51 52
52 void t7_refresh_surface(void); 53 void t7_refresh_surface(void);
53 void t7_refresh_surface_debugmode(void); 54 void t7_refresh_surface_debugmode(void);
2790 textPointer = snprintf(TextR1, TEXTSIZE, "\a\001 %c%c %01.2f/", TXT_2BYTE, TXT2BYTE_LoopShort, stateUsed->diveSettings.setpoint[actualBetterSetpointId()].setpoint_cbar / 100.0); 2791 textPointer = snprintf(TextR1, TEXTSIZE, "\a\001 %c%c %01.2f/", TXT_2BYTE, TXT2BYTE_LoopShort, stateUsed->diveSettings.setpoint[actualBetterSetpointId()].setpoint_cbar / 100.0);
2791 textPointer += tHome_gas_writer(stateUsed->diveSettings.gas[stateUsed->lifeData.lastDiluent_GasIdInSettings].oxygen_percentage, stateUsed->diveSettings.gas[stateUsed->lifeData.lastDiluent_GasIdInSettings].helium_percentage, &TextR1[textPointer]); 2792 textPointer += tHome_gas_writer(stateUsed->diveSettings.gas[stateUsed->lifeData.lastDiluent_GasIdInSettings].oxygen_percentage, stateUsed->diveSettings.gas[stateUsed->lifeData.lastDiluent_GasIdInSettings].helium_percentage, &TextR1[textPointer]);
2792 TextR1[textPointer++] = ' '; 2793 TextR1[textPointer++] = ' ';
2793 TextR1[textPointer++] = '?'; 2794 TextR1[textPointer++] = '?';
2794 } 2795 }
2796
2797 GFX_write_string_color(&FontT48, &t7c2, TextR1, 0, CLUT_WarningYellow);
2798 } else if (get_globalState() == StDSETPOINT) {
2799 snprintf(TextR1, TEXTSIZE, "\a\001 %c%c %01.2f? ", TXT_2BYTE, TXT2BYTE_SetpointShort, getSwitchToSetpointCbar() / 100.0);
2795 2800
2796 GFX_write_string_color(&FontT48, &t7c2, TextR1, 0, CLUT_WarningYellow); 2801 GFX_write_string_color(&FontT48, &t7c2, TextR1, 0, CLUT_WarningYellow);
2797 } 2802 }
2798 else if(get_globalState() == StDSIM1) 2803 else if(get_globalState() == StDSIM1)
2799 { 2804 {