gamebridge: Twitch Control #2
|
@ -150,7 +150,7 @@ fn main() -> Result<()> {
|
||||||
lo = lo | LoButtons::C_RIGHT;
|
lo = lo | LoButtons::C_RIGHT;
|
||||||
}
|
}
|
||||||
|
|
||||||
println!(
|
debug!(
|
||||||
"[ rust] {:02x}{:02x} {:02x}{:02x}",
|
"[ rust] {:02x}{:02x} {:02x}{:02x}",
|
||||||
hi.bits(),
|
hi.bits(),
|
||||||
lo.bits(),
|
lo.bits(),
|
||||||
|
|
|
@ -82,7 +82,8 @@ async fn run_loop(
|
||||||
let mut data = st.write().unwrap();
|
let mut data = st.write().unwrap();
|
||||||
const BUTTON_ADD_AMT: i64 = 64;
|
const BUTTON_ADD_AMT: i64 = 64;
|
||||||
|
|
||||||
match chatline.as_str() {
|
for cmd in chatline.to_string().split(" ").collect::<Vec<&str>>().iter() {
|
||||||
|
match *cmd {
|
||||||
"a" => data.a_button.add(BUTTON_ADD_AMT),
|
"a" => data.a_button.add(BUTTON_ADD_AMT),
|
||||||
"b" => data.b_button.add(BUTTON_ADD_AMT),
|
"b" => data.b_button.add(BUTTON_ADD_AMT),
|
||||||
"z" => data.z_button.add(BUTTON_ADD_AMT),
|
"z" => data.z_button.add(BUTTON_ADD_AMT),
|
||||||
|
@ -99,6 +100,7 @@ async fn run_loop(
|
||||||
"stop" => {data.stickx.update(0); data.sticky.update(0);},
|
"stop" => {data.stickx.update(0); data.sticky.update(0);},
|
||||||
_ => {},
|
_ => {},
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
eprintln!("[{}] {}: {}", msg.channel, msg.name, msg.data);
|
eprintln!("[{}] {}: {}", msg.channel, msg.name, msg.data);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue