From 0581b9583c984b4df818bec92ff1ebb28dc6af5d Mon Sep 17 00:00:00 2001 From: Doug Boulware Date: Mon, 22 Jan 2024 16:35:00 -0700 Subject: [PATCH] Default signal_analyzer to None and add optional switches to MockSignalAnalyzer. --- scos_actions/hardware/mocks/mock_sigan.py | 1 + scos_actions/hardware/sensor.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scos_actions/hardware/mocks/mock_sigan.py b/scos_actions/hardware/mocks/mock_sigan.py index 1876851b..8367bf0d 100644 --- a/scos_actions/hardware/mocks/mock_sigan.py +++ b/scos_actions/hardware/mocks/mock_sigan.py @@ -30,6 +30,7 @@ def __init__( self, sensor_cal: Optional[Calibration] = None, sigan_cal: Optional[Calibration] = None, + switches: Optional[dict] = None, randomize_values: bool = False, ): super().__init__(sensor_cal, sigan_cal) diff --git a/scos_actions/hardware/sensor.py b/scos_actions/hardware/sensor.py index 74cbf479..c4120a33 100644 --- a/scos_actions/hardware/sensor.py +++ b/scos_actions/hardware/sensor.py @@ -1,6 +1,6 @@ +import datetime import hashlib import json -import datetime from typing import Dict from its_preselector.preselector import Preselector @@ -14,7 +14,7 @@ class Sensor: def __init__( self, - signal_analyzer: SignalAnalyzerInterface = MockSignalAnalyzer, + signal_analyzer: SignalAnalyzerInterface = None, gps: GPSInterface = None, preselector: Preselector = None, switches: Dict[str, WebRelay] = {},