From e560d8f1ebb9933900785565c37be44daf45cb5d Mon Sep 17 00:00:00 2001 From: linuswck Date: Wed, 16 Oct 2024 16:21:11 +0800 Subject: [PATCH] thermostat, gui: Set max v range according to datasheet --- pykirdy/driver/kirdy.py | 4 ++-- pykirdy/kirdy_qt.py | 2 +- src/thermostat/thermostat.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pykirdy/driver/kirdy.py b/pykirdy/driver/kirdy.py index 007e48b..cf2d59e 100644 --- a/pykirdy/driver/kirdy.py +++ b/pykirdy/driver/kirdy.py @@ -312,8 +312,8 @@ class Device: 'max': 3.0 # Max Value Settable }, 'max_v': { # Max Voltage Across Tec Terminals (V) - 'value': 4.990857, # Value Set - 'max': 5.0 # Max Value Settable + 'value': 4.00000000, # Value Set + 'max': 4.3 # Max Value Settable }, 'max_i_pos': { # Max Cooling Current Across Tec Terminals (A) 'value': 0.99628574, # Value Set diff --git a/pykirdy/kirdy_qt.py b/pykirdy/kirdy_qt.py index 7c32408..92272a8 100644 --- a/pykirdy/kirdy_qt.py +++ b/pykirdy/kirdy_qt.py @@ -454,7 +454,7 @@ class MainWindow(QtWidgets.QMainWindow): 'unit': 'mA', 'lock': False, 'target': 'thermostat', 'action': 'set_tec_max_cooling_i', "compactHeight": False}, {'name': 'Max Heating Current', 'type': 'float', 'value': 0, 'step': 1, 'decimals': 6, 'limits': (0, 3000), 'unit': 'mA', 'lock': False, 'target': 'thermostat', 'action': 'set_tec_max_heating_i', "compactHeight": False}, - {'name': 'Max Voltage Difference', 'type': 'float', 'value': 0, 'step': 0.1, 'limits': (0, 4), + {'name': 'Max Voltage Difference', 'type': 'float', 'value': 0, 'step': 0.1, 'limits': (0, 4.3), 'unit': 'V', 'lock': False, 'target': 'thermostat', 'action': 'set_tec_max_v', "compactHeight": False}, ]}, {'name': 'Default Power On', 'type': 'bool', 'value': False, 'lock': False, 'target': 'thermostat', 'action': 'set_default_pwr_on'}, diff --git a/src/thermostat/thermostat.rs b/src/thermostat/thermostat.rs index 5df8068..d9f3cd4 100644 --- a/src/thermostat/thermostat.rs +++ b/src/thermostat/thermostat.rs @@ -70,7 +70,7 @@ impl TecSettings { pub const MAX_V_MAX: ElectricPotential = ElectricPotential { dimension: PhantomData, units: PhantomData, - value: 5.0, + value: 4.3, }; const MAX_V_DUTY_MAX: f64 = TecSettings::MAX_V_MAX.value as f64 / TecSettings::MAX_V_DUTY_TO_VOLTAGE_RATE.value as f64;