From 6bccbe623f4afd4e1323a023f5d339a1d3e2a7bc Mon Sep 17 00:00:00 2001 From: MAnn223 Date: Mon, 22 Jul 2024 10:26:03 -0700 Subject: [PATCH] remove extra ens --- src/ensembles.cpp | 54 ++--------------------------------------------- 1 file changed, 2 insertions(+), 52 deletions(-) diff --git a/src/ensembles.cpp b/src/ensembles.cpp index 5835a636..ce570c7f 100644 --- a/src/ensembles.cpp +++ b/src/ensembles.cpp @@ -24,9 +24,6 @@ static void SS_ensemble07Init(DeploymentSchedule_t* pDeployment); static void SS_ensemble08Func(DeploymentSchedule_t* pDeployment); static void SS_ensemble08Init(DeploymentSchedule_t* pDeployment); -static void SS_ensemble01Func(DeploymentSchedule_t* pDeployment); -static void SS_ensemble01Init(DeploymentSchedule_t* pDeployment); - static void SS_fwVerInit(DeploymentSchedule_t* pDeployment); static void SS_fwVerFunc(DeploymentSchedule_t* pDeployment); @@ -57,17 +54,12 @@ typedef struct Ensemble07_eventData_ uint32_t accumulateCount; }Ensemble07_eventData_t; -typedef struct Ensemble01_eventData_ -{ - double temperature; - int16_t water; - uint32_t accumulateCount; -}Ensemble01_eventData_t; + static Ensemble10_eventData_t ensemble10Data; static Ensemble07_eventData_t ensemble07Data; static Ensemble08_eventData_t ensemble08Data; -static Ensemble01_eventData_t ensemble01Data; + static void SS_ensemble10Init(DeploymentSchedule_t* pDeployment) { @@ -87,12 +79,6 @@ static void SS_ensemble08Init(DeploymentSchedule_t* pDeployment) pDeployment->state.pData = &ensemble08Data; } -static void SS_ensemble01Init(DeploymentSchedule_t* pDeployment) -{ - memset(&ensemble01Data, 0, sizeof(Ensemble01_eventData_t)); - pDeployment->state.pData = &ensemble01Data; -} - static void SS_ensemble10Func(DeploymentSchedule_t* pDeployment) { float temp; @@ -273,43 +259,7 @@ static void SS_ensemble08Func(DeploymentSchedule_t* pDeployment) } } -static void SS_ensemble01Func(DeploymentSchedule_t* pDeployment) -{ - float temp; - uint8_t water; - Ensemble01_eventData_t* pData = (Ensemble01_eventData_t*) pDeployment->state.pData; - #pragma pack(push, 1) - struct{ - EnsembleHeader_t header; - Ensemble08_data_t ensData; - }ens; - #pragma pack(pop) - - // obtain measurements - temp = pSystemDesc->pTempSensor->getTemp(); - // accumulate measurements - pData->temperature += temp; - pData->accumulateCount++; - - // Report accumulated measurements - if(pData->accumulateCount == pDeployment->measurementsToAccumulate) - { - water = pData->water / pDeployment->measurementsToAccumulate; - temp = pData->temperature / pDeployment->measurementsToAccumulate; - if(water == false) - { - temp -= 100; - } - - ens.header.elapsedTime_ds = Ens_getStartTime(pDeployment->state.deploymentStartTime); - ens.header.ensembleType = ENS_TEMP_TIME; - ens.ensData.rawTemp = N_TO_B_ENDIAN_2(temp / 0.0078125); - - pSystemDesc->pRecorder->putData(ens); - memset(pData, 0, sizeof(Ensemble01_eventData_t)); - } -} static void SS_fwVerInit(DeploymentSchedule_t* pDeployment) { (void) pDeployment;