Add swap command #104
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "atse:swap_tec_polarity"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
For use with Zotino, since the Zotino header on the Thermostat has the current pins reversed.
@ -414,1 +414,4 @@
fn swap_tec_polarity (socket: &mut TcpSocket, channels: &mut Channels, channel: Option<usize>) -> Result<Handler, Error> {
for c in 0..CHANNELS {
if channel.is_none() || channel == Some(c) {
Isn't there a way to set it directly into channel_state?
@ -122,0 +122,4 @@
-i_set
} else {
i_set
}
Can't it be handled just at the DAC and current readout, instead of having to invert it all over the place?
@ -415,0 +415,4 @@
fn swap_tec_polarity (socket: &mut TcpSocket, channels: &mut Channels, channel: Option<usize>) -> Result<Handler, Error> {
for c in 0..CHANNELS {
if channel.is_none() || channel == Some(c) {
channels.channel_state(c).swap_tec_polarity = !channels.channel_state(c).swap_tec_polarity;
That's a terrible API. Simply add a way to set swapped to true/false (with the reference being the front panel polarity) instead of only something that toggles the property without any way to know what its value is.
Yeah... to tell the truth this was a bodged API intended to get temperature regulation on the Zotino DAC working quickly; This is sketchy for production.
I've been planning an output mode command that could switch between TEC and resistive heater modes, and think adding a Zotino mode to that would be a good fit, since all 3 modes are about the current direction to the load. That's most certainly better than just a swap command API-wise, so I think we should opt for that instead.
Closing this PR in favour of a mode switching command instead.
Please don't call it a Zotino mode. It's a terrible name that gives no indication about what it does and can be misleading in many ways (e.g. does it set PID parameters for Zotino?).
Pull request closed