diff Discovery/Src/tMenuEditGasOC.c @ 773:2c243233c999

Menu shortcut for bailout / return to circuit when diving in CCR mode (mikeller)
author heinrichsweikamp
date Wed, 10 May 2023 16:24:57 +0200
parents 39f48356049b
children b7d93ff6b3b2
line wrap: on
line diff
--- a/Discovery/Src/tMenuEditGasOC.c	Sat Apr 22 21:11:50 2023 -0500
+++ b/Discovery/Src/tMenuEditGasOC.c	Wed May 10 16:24:57 2023 +0200
@@ -145,12 +145,16 @@
 
 
 /* dive mode */
-void openEdit_DiveSelectBetterGas(void)
+void openEdit_DiveSelectBetterGas(bool doBailout)
 {
-    uint8_t gasId, ccr;
+    uint8_t gasId;
+    if (doBailout) {
+        gasId = actualBetterBailoutGasId();
+    } else {
+        gasId = actualBetterGasId();
+    }
 
-    gasId = actualBetterGasId();
-    ccr = 0;
+    uint8_t ccr = 0;
     if(gasId>5)
     {
         gasId -= 5;