Skip to content

Commit

Permalink
Handle EncoderReset HardwareRequests
Browse files Browse the repository at this point in the history
  • Loading branch information
kknives committed Jan 20, 2023
1 parent e64b220 commit f92f5ea
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ impl Config {
.encoders
.get(encoder)
.map(|port| Handler::Pad(*port)),
HardwareRequest::PadReset => Some(Handler::Pad(0)),
HardwareRequest::EncoderReset => Some(Handler::Pad(0)),
HardwareRequest::SwitchRead {switch: _} | HardwareRequest::LedWrite {led: _, state: _} => Some(Handler::System),
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/pad.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ impl PadState {
PadResponse::EncoderValue(encoder_values[pad_rq.id as usize]),
))
}
HardwareRequest::PadReset => {
HardwareRequest::EncoderReset => {
let op = Operation::Reset;
let mut buf = [0u8; 64];
let coded = to_slice(&op, &mut buf)?;
Expand Down
2 changes: 1 addition & 1 deletion src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub enum HardwareRequest {
EncoderRead { encoder: String },
SwitchRead { switch: String },
LedWrite { led: String, state: u8 },
PadReset,
EncoderReset,
}
#[derive(Serialize, Deserialize, Debug)]
pub enum HardwareResponse {
Expand Down

0 comments on commit f92f5ea

Please # to comment.