thermostat, gui: Set max v range according to datasheet

This commit is contained in:
linuswck 2024-10-16 16:21:11 +08:00
parent 0437c6e76e
commit 7e0ec09d07
3 changed files with 4 additions and 4 deletions

View File

@ -312,8 +312,8 @@ class Device:
'max': 3.0 # Max Value Settable 'max': 3.0 # Max Value Settable
}, },
'max_v': { # Max Voltage Across Tec Terminals (V) 'max_v': { # Max Voltage Across Tec Terminals (V)
'value': 4.990857, # Value Set 'value': 4.00000000, # Value Set
'max': 5.0 # Max Value Settable 'max': 4.3 # Max Value Settable
}, },
'max_i_pos': { # Max Cooling Current Across Tec Terminals (A) 'max_i_pos': { # Max Cooling Current Across Tec Terminals (A)
'value': 0.99628574, # Value Set 'value': 0.99628574, # Value Set

View File

@ -454,7 +454,7 @@ class MainWindow(QtWidgets.QMainWindow):
'unit': 'mA', 'lock': False, 'target': 'thermostat', 'action': 'set_tec_max_cooling_i', "compactHeight": False}, '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), {'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}, '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}, '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'}, {'name': 'Default Power On', 'type': 'bool', 'value': False, 'lock': False, 'target': 'thermostat', 'action': 'set_default_pwr_on'},

View File

@ -70,7 +70,7 @@ impl TecSettings {
pub const MAX_V_MAX: ElectricPotential = ElectricPotential { pub const MAX_V_MAX: ElectricPotential = ElectricPotential {
dimension: PhantomData, dimension: PhantomData,
units: PhantomData, units: PhantomData,
value: 5.0, value: 4.3,
}; };
const MAX_V_DUTY_MAX: f64 = const MAX_V_DUTY_MAX: f64 =
TecSettings::MAX_V_MAX.value as f64 / TecSettings::MAX_V_DUTY_TO_VOLTAGE_RATE.value as f64; TecSettings::MAX_V_MAX.value as f64 / TecSettings::MAX_V_DUTY_TO_VOLTAGE_RATE.value as f64;