main: improve command resonses

master
Astro 2019-09-24 01:57:28 +02:00
parent ef17e1c4ff
commit 9486946d06
1 changed files with 5 additions and 1 deletions

View File

@ -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;