diff Discovery/Src/data_central.c @ 160:e3ca52b8e7fa

Merge with FlipDisplay
author heinrichsweikamp
date Thu, 07 Mar 2019 15:06:43 +0100
parents e1d66bc78f9a
children 2bb1db22b5f5
line wrap: on
line diff
--- a/Discovery/Src/data_central.c	Sat Oct 06 15:02:11 2018 +0200
+++ b/Discovery/Src/data_central.c	Thu Mar 07 15:06:43 2019 +0100
@@ -529,7 +529,6 @@
 
 void setActualGasAir(SLifeData *lifeData)
 {
-	SSettings* pSettings = settingsGetPointer();
 	uint8_t nitrogen;
 	nitrogen = 79;
 	lifeData->actualGas.GasIdInSettings = 0;
@@ -784,13 +783,16 @@
 
 void resetEvents(void)
 {
-  SDiveState * pStateUsed;
+    SDiveState * pStateUsed;
 	if(stateUsed == stateRealGetPointer())
+	{
 		pStateUsed = stateRealGetPointerWrite();
+	}
 	else
+	{
 		pStateUsed = stateSimGetPointerWrite();
-
-		memset(&pStateUsed->events,0, sizeof(SEvents));
+	}
+	memset(&pStateUsed->events,0, sizeof(SEvents));
 }
 
 
@@ -964,21 +966,3 @@
 	else
 		return false;
 }
-
-uint8_t stateUsed_scooterRemainingBattCapacity(void)
-{
-	const uint8_t useCapacityValue = 1; // 2 is the new one, 1 = scooterRestkapazitaetWhBased is the official used
-	
-	switch(useCapacityValue)
-	{
-		case 0:
-		default:
-			return stateUsed->lifeData.scooterRestkapazitaet;
-
-		case 1:
-			return stateUsed->lifeData.scooterRestkapazitaetWhBased;
-			
-		case 2:
-			return stateUsed->lifeData.scooterRestkapazitaetVoltageBased;
-	}		
-}