changeset 451:c2e02b87774f minor_improvments

Allocate received bar value to active gas (was static allocated to gas[1])
author ideenmodellierer
date Tue, 24 Mar 2020 21:49:52 +0100
parents b2f8a39c11ea
children b90ddf57f7f1
files Discovery/Src/data_exchange_main.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Discovery/Src/data_exchange_main.c	Tue Mar 24 21:48:27 2020 +0100
+++ b/Discovery/Src/data_exchange_main.c	Tue Mar 24 21:49:52 2020 +0100
@@ -779,9 +779,9 @@
 		}
 	}
 #else
-   	if(stateRealGetPointer()->lifeData.bottle_bar_age_MilliSeconds[1] < 6000)  /* max age after ten minutes */
+   	if(stateRealGetPointer()->lifeData.bottle_bar_age_MilliSeconds[stateRealGetPointer()->lifeData.actualGas.GasIdInSettings] < 6000)  /* max age after ten minutes */
    	{
-   		stateRealGetPointerWrite()->lifeData.bottle_bar_age_MilliSeconds[1]++;
+   		stateRealGetPointerWrite()->lifeData.bottle_bar_age_MilliSeconds[stateRealGetPointer()->lifeData.actualGas.GasIdInSettings]++;
    	}
 #endif
 	if(!DataEX_check_header_and_footer_ok())