forked from M-Labs/ionpak-thermostat
main: improve command resonses
This commit is contained in:
parent
ef17e1c4ff
commit
9486946d06
|
@ -301,7 +301,7 @@ fn main() -> ! {
|
||||||
let p = pid.get_parameters();
|
let p = pid.get_parameters();
|
||||||
macro_rules! out {
|
macro_rules! out {
|
||||||
($p: tt) => {
|
($p: tt) => {
|
||||||
let _ = writeln!(socket, "* {}={:.4}", stringify!($p), p.$p);
|
let _ = writeln!(socket, "- {}={:.4}", stringify!($p), p.$p);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
out!(kp);
|
out!(kp);
|
||||||
|
@ -383,6 +383,10 @@ fn main() -> ! {
|
||||||
1 => tec1.set(pin, width, total),
|
1 => tec1.set(pin, width, total),
|
||||||
_ => unreachable!(),
|
_ => unreachable!(),
|
||||||
}
|
}
|
||||||
|
let _ = writeln!(
|
||||||
|
socket, "channel {}: PWM {} reconfigured to {}/{}",
|
||||||
|
channel, pin, width, total
|
||||||
|
);
|
||||||
}
|
}
|
||||||
Command::Pid { channel, parameter, value } => {
|
Command::Pid { channel, parameter, value } => {
|
||||||
let pid = &mut states[channel].pid;
|
let pid = &mut states[channel].pid;
|
||||||
|
|
Loading…
Reference in New Issue