Compare commits

...

3 Commits

Author SHA1 Message Date
c8af8cb61f PyThermostat GUI: Fix max_v to only have unit "V"
Since most users do not need to limit load voltage with accuracy of less
than 1mV.
2025-03-26 22:19:45 +08:00
23ce99d6d8 Set max_v maximum: 4 V -> 4.3 V
Align with the MAX1968's hardware capabilities, as it can achieve a
maximum voltage of 4.3 V across output pins.
2025-03-26 22:17:17 +08:00
d594c93166 Rename GUI to Control Panel
Change the command name to thermostat_control_panel, and the Nix Flake
app name to simply control_panel.
2025-03-26 13:23:19 +08:00
6 changed files with 11 additions and 11 deletions

View File

@ -71,11 +71,11 @@ openocd -f interface/stlink.cfg -f target/stm32f4x.cfg -c "program target/thumbv
A GUI has been developed for easy configuration and plotting of key parameters.
The Python GUI program is located at pythermostat/pythermostat/thermostat_qt.py, and is developed based on the Python libraries PyQt and PyQtGraph. The GUI can be configured and
The Python GUI program is located at pythermostat/pythermostat/control_panel.py, and is developed based on the Python libraries PyQt and PyQtGraph. The GUI can be configured and
launched automatically by running:
```
nix run .#thermostat_gui
nix run .#control_panel
```
## Command Line Usage
@ -109,7 +109,7 @@ formatted as line-delimited JSON.
| `output` | Show current output settings |
| `output <0/1> max_i_pos <amp>` | Set maximum positive output current, clamped to [0, 2] |
| `output <0/1> max_i_neg <amp>` | Set maximum negative output current, clamped to [0, 2] |
| `output <0/1> max_v <volt>` | Set maximum output voltage, clamped to [0, 4] |
| `output <0/1> max_v <volt>` | Set maximum output voltage, clamped to [0, 4.3] |
| `output <0/1> i_set <amp>` | Disengage PID, set fixed output current, clamped to [-2, 2] |
| `output <0/1> polarity <normal/reversed>` | Set output current polarity, with 'normal' being the front panel polarity |
| `output <0/1> pid` | Let output current to be controlled by the PID |

View File

@ -81,7 +81,7 @@
dontWrapQtApps = true;
postFixup = ''
wrapQtApp "$out/bin/thermostat_qt"
wrapQtApp "$out/bin/thermostat_control_panel"
'';
};
@ -106,9 +106,9 @@
default = thermostat;
};
apps.x86_64-linux.thermostat_gui = {
apps.x86_64-linux.control_panel = {
type = "app";
program = "${self.packages.x86_64-linux.pythermostat}/bin/thermostat_qt";
program = "${pythermostat}/bin/thermostat_control_panel";
};
hydraJobs = {

View File

@ -20,7 +20,7 @@ dependencies = [
[project.gui-scripts]
thermostat_plot = "pythermostat.plot:main"
thermostat_qt = "pythermostat.thermostat_qt:main"
thermostat_control_panel = "pythermostat.control_panel:main"
[project.scripts]
thermostat_autotune = "pythermostat.autotune:main"

View File

@ -1,4 +1,4 @@
"""GUI for the Sinara 8451 Thermostat"""
"""GUI Control Panel for the Sinara 8451 Thermostat"""
import asyncio
import logging

View File

@ -115,11 +115,11 @@
"type": "float",
"value": 0,
"step": 0.1,
"decimals": 3,
"limits": [
0,
5
4.3
],
"siPrefix": true,
"suffix": "V",
"compactHeight": false,
"thermostat:set_param": {

View File

@ -55,7 +55,7 @@ pub const MAX_TEC_I: ElectricCurrent = ElectricCurrent {
pub const MAX_TEC_V: ElectricPotential = ElectricPotential {
dimension: PhantomData,
units: PhantomData,
value: 4.0,
value: 4.3,
};
// DAC chip outputs 0-5v, which is then passed through a resistor dividor to provide 0-3v range
const DAC_OUT_V_MAX: ElectricPotential = ElectricPotential {