forked from M-Labs/thermostat
Compare commits
3 Commits
d744666162
...
0381ef481e
Author | SHA1 | Date | |
---|---|---|---|
0381ef481e | |||
fcb5cf1d4e | |||
d517087e10 |
@ -94,9 +94,7 @@ formatted as line-delimited JSON.
|
||||
|
||||
| Syntax | Function |
|
||||
|------------------------------------------- |-------------------------------------------------------------------------------|
|
||||
| `report` | Show current input |
|
||||
| `report mode` | Show current report mode |
|
||||
| `report mode <off/on>` | Set report mode |
|
||||
| `report` | Show latest report of channel parameters (see *Reports* section) |
|
||||
| `pwm` | Show current PWM settings |
|
||||
| `pwm <0/1> max_i_pos <amp>` | Set maximum positive output current, clamped to [0, 2] |
|
||||
| `pwm <0/1> max_i_neg <amp>` | Set maximum negative output current, clamped to [0, 2] |
|
||||
|
@ -694,6 +694,15 @@ mod test {
|
||||
}));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_pwm_polarity() {
|
||||
let command = Command::parse(b"pwm 0 polarity reversed");
|
||||
assert_eq!(command, Ok(Command::PwmPolarity {
|
||||
channel: 0,
|
||||
polarity: Polarity::Reversed,
|
||||
}));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_pwm_pid() {
|
||||
let command = Command::parse(b"pwm 0 pid");
|
||||
|
Loading…
Reference in New Issue
Block a user