Compare commits

..

2 Commits

Author SHA1 Message Date
8867744d67 Apply clippy suggestions 2024-10-14 12:33:42 +08:00
453360ff5e Apply cargo fmt 2024-10-14 11:52:15 +08:00
2 changed files with 2 additions and 12 deletions

View File

@ -95,6 +95,8 @@ formatted as line-delimited JSON.
| Syntax | Function | | Syntax | Function |
|------------------------------------------- |-------------------------------------------------------------------------------| |------------------------------------------- |-------------------------------------------------------------------------------|
| `report` | Show current input | | `report` | Show current input |
| `report mode` | Show current report mode |
| `report mode <off/on>` | Set report mode |
| `pwm` | Show current PWM settings | | `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_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] | | `pwm <0/1> max_i_neg <amp>` | Set maximum negative output current, clamped to [0, 2] |

View File

@ -676,18 +676,6 @@ 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] #[test]
fn parse_pwm_pid() { fn parse_pwm_pid() {
let command = Command::parse(b"pwm 0 pid"); let command = Command::parse(b"pwm 0 pid");