Commit 6721116e authored by Olivier Kaufmann's avatar Olivier Kaufmann
Browse files

Fixes cpu_temp

Showing with 4 additions and 3 deletions
+4 -3
......@@ -24,13 +24,14 @@ class ControllerAbstract(ABC):
self.exec_logger.warning(f'CPU temperature reading is not available for {self.board_name}')
cpu_temp = np.nan
else:
cpu_temp = self._get_cpu_temp()
cpu_temp = self._cpu_temp
if cpu_temp > self.max_cpu_temp:
self.soh_logger.warning(f'CPU temperature of {self.board_name} is over the limit!')
return cpu_temp
@abstractmethod
def _get_cpu_temp(self):
@property
def _cpu_temp(self):
pass
class MuxAbstract(ABC):
......
......@@ -17,5 +17,5 @@ class Controller(ControllerAbstract):
self.max_cpu_temp = 85. # °C
@property
def _get_cpu_temp(self):
def _cpu_temp(self):
return CPUTemperature().temperature
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment