diff --git a/src/devices/ph_control.py b/src/devices/ph_control.py index 27c27bd..1da9477 100644 --- a/src/devices/ph_control.py +++ b/src/devices/ph_control.py @@ -19,7 +19,7 @@ def __init__(self, titrator): The constructor function for the PH Control class """ self.titrator = titrator - self.use_pid = bool(True) + self.use_pid = True self._base_target_ph = 8.125 self._current_target_ph = 8.5 self._ph_function_type = PHControl.FLAT_TYPE # Default to FLAT_TYPE diff --git a/src/devices/thermal_control.py b/src/devices/thermal_control.py index a2ba594..cc2bc77 100644 --- a/src/devices/thermal_control.py +++ b/src/devices/thermal_control.py @@ -19,7 +19,7 @@ def __init__(self, titrator): The constructor function for the ThermalControl class """ self.titrator = titrator - self._heat = bool(True) + self._heat = True self._base_thermal_target = 78 self._current_thermal_target = 67 self._thermal_function_type = ThermalControl.FLAT_TYPE diff --git a/src/ui_state/ui_state.py b/src/ui_state/ui_state.py index 0892e35..f5ee3fe 100644 --- a/src/ui_state/ui_state.py +++ b/src/ui_state/ui_state.py @@ -61,7 +61,6 @@ def start(self): """ Optional function that is called upon entering a new state """ - pass def _set_next_state(self, state, update): """ diff --git a/src/ui_state/view_menu/view_ph.py b/src/ui_state/view_menu/view_ph.py index 8ce1a78..c5c9c2b 100644 --- a/src/ui_state/view_menu/view_ph.py +++ b/src/ui_state/view_menu/view_ph.py @@ -29,7 +29,7 @@ def loop(self): """ Rotate display between header/values and pH function/type variables every 3 seconds. """ - elapsed = int(((time.monotonic() - self._start_time) / 3.0)) % 2 + elapsed = int((time.monotonic() - self._start_time) / 3.0) % 2 if elapsed == 0: self.load_header(line=1) self.load_values(line=2) diff --git a/src/ui_state/view_menu/view_pid_constants.py b/src/ui_state/view_menu/view_pid_constants.py index 9ac57c5..4c88e1b 100644 --- a/src/ui_state/view_menu/view_pid_constants.py +++ b/src/ui_state/view_menu/view_pid_constants.py @@ -29,7 +29,7 @@ def loop(self): """ Rotate display between Kp/Ki and Kd/PID every 3 seconds. """ - elapsed = int(((time.monotonic() - self._start_time) / 3.0)) % 2 + elapsed = int((time.monotonic() - self._start_time) / 3.0) % 2 if elapsed == 0: self.load_kp() self.load_ki()