diff Discovery/Src/base.c @ 662:1b995079c045 Betatest

PSCR Mode
author heinrichs weikamp
date Tue, 14 Dec 2021 15:36:10 +0100
parents 7b5a063f080f
children 7a352b449055
line wrap: on
line diff
--- a/Discovery/Src/base.c	Mon Nov 01 12:39:34 2021 +0100
+++ b/Discovery/Src/base.c	Tue Dec 14 15:36:10 2021 +0100
@@ -507,6 +507,7 @@
         {
 	        DoDisplayRefresh = 0;
 
+	        updateSetpointStateUsed();
             if(stateUsed == stateSimGetPointer())
             {
                 simulation_UpdateLifeData(1);
@@ -588,8 +589,6 @@
     case BaseHome:
     case BaseMenu:
     case BaseInfo:
-        updateSetpointStateUsed();
-
         DateEx_copy_to_dataOut();
         DataEX_copy_to_LifeData(&modeChange);
 //foto session :-)  stateRealGetPointerWrite()->lifeData.battery_charge = 99;
@@ -769,17 +768,20 @@
 					}
 				} else if ((status.page == PageDive) && (status.line != 0))
 				{
-					if (pSettings->extraDisplay == EXTRADISPLAY_BIGFONT)
+					if(get_globalState() == StDMENU)
 					{
-						pSettings->design = 3;
-						if(pSettings->MotionDetection == MOTION_DETECT_SECTOR)
+						if (pSettings->extraDisplay == EXTRADISPLAY_BIGFONT)
 						{
-							DefineSectorCount(CUSTOMER_DEFINED_VIEWS);
-							MapCVToSector();
+							pSettings->design = 3;
+							if(pSettings->MotionDetection == MOTION_DETECT_SECTOR)
+							{
+								DefineSectorCount(CUSTOMER_DEFINED_VIEWS);
+								MapCVToSector();
+							}
 						}
+						else if (pSettings->extraDisplay	== EXTRADISPLAY_DECOGAME)
+							pSettings->design = 4;
 					}
-					else if (pSettings->extraDisplay	== EXTRADISPLAY_DECOGAME)
-						pSettings->design = 4;
 					set_globalState(StD);
 				}
 				else
@@ -1733,7 +1735,7 @@
 					}
 				}
 				// stuff before and new @161121 CCR-sensor limit 10 minutes
-				if((settingsGetPointer()->dive_mode == DIVEMODE_CCR) && (settingsGetPointer()->CCR_Mode == CCRMODE_Sensors))
+				if(isLoopMode(settingsGetPointer()->dive_mode) && (settingsGetPointer()->CCR_Mode == CCRMODE_Sensors))
 				{
 					timeout_limit_Surface_in_seconds = settingsGetPointer()->timeoutSurfacemodeWithSensors;
 				}