From 9a540e97c557e58a8b7b933c6f41fde21e8fa315 Mon Sep 17 00:00:00 2001 From: Spacefish Date: Thu, 10 Dec 2020 16:36:44 +0100 Subject: [PATCH 1/3] taken over thermal module from thermal-update --- thermal/ThermalModule.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/thermal/ThermalModule.h b/thermal/ThermalModule.h index d1e4fccb..0abe51c7 100644 --- a/thermal/ThermalModule.h +++ b/thermal/ThermalModule.h @@ -5,8 +5,6 @@ #include "tcsDefinitions.h" #include "RedundantHeater.h" -//#include "../datapoolglob/GlobalDataSet.h" -//#include "../datapoolglob/GlobalPoolVariable.h" #include "../datapoollocal/LocalPoolDataSetBase.h" #include "../datapoollocal/LocalPoolVariable.h" #include "../devicehandlers/HealthDevice.h" @@ -78,7 +76,6 @@ protected: Parameters parameters; lp_var_t moduleTemperature; - //gp_float_t moduleTemperature; RedundantHeater *heater = nullptr; From 5bad1142059af8a946fe57c0cad31284fd8496ea Mon Sep 17 00:00:00 2001 From: Spacefish Date: Thu, 10 Dec 2020 16:39:31 +0100 Subject: [PATCH 2/3] thermal module set heating repaired --- thermal/ThermalModule.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/thermal/ThermalModule.cpp b/thermal/ThermalModule.cpp index 2bc1741f..457a6743 100644 --- a/thermal/ThermalModule.cpp +++ b/thermal/ThermalModule.cpp @@ -256,15 +256,16 @@ bool ThermalModule::calculateModuleHeaterRequestAndSetModuleStatus( } void ThermalModule::setHeating(bool on) { -// GlobDataSet mySet; -// gp_int8_t writableTargetState(targetState.getDataPoolId(), -// &mySet, PoolVariableIF::VAR_WRITE); -// if (on) { -// writableTargetState = STATE_REQUEST_HEATING; -// } else { -// writableTargetState = STATE_REQUEST_PASSIVE; -// } -// mySet.commit(PoolVariableIF::VALID); + ReturnValue_t result = targetState.read(); + if(result == HasReturnvaluesIF::RETURN_OK) { + if(on) { + targetState.value = STATE_REQUEST_HEATING; + } + else { + targetState.value = STATE_REQUEST_PASSIVE; + } + } + targetState.setValid(true); } void ThermalModule::updateTargetTemperatures(ThermalComponentIF* component, From b2d01a31c224cf609ed2cc83e5e482604881a64d Mon Sep 17 00:00:00 2001 From: Spacefish Date: Thu, 10 Dec 2020 16:58:18 +0100 Subject: [PATCH 3/3] removed some commented stuff --- power/Fuse.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/power/Fuse.h b/power/Fuse.h index cc1d534f..b892611b 100644 --- a/power/Fuse.h +++ b/power/Fuse.h @@ -85,10 +85,7 @@ private: }; PowerMonitor powerMonitor; StaticLocalDataSet<3> set; - //LocalPoolDataSetBase* set = nullptr; - //PIDReader voltage; - //PIDReader current; - //PIDReader state; + lp_var_t voltage; lp_var_t current; lp_var_t state;