don't drop connection on spurious lapse
also reduced logging (systemd is a killer)
This commit is contained in:
parent
852b95dcc0
commit
bd683d9b74
1 changed files with 22 additions and 19 deletions
|
|
@ -2,7 +2,6 @@ use std::time::Duration;
|
|||
|
||||
use anyhow::Context;
|
||||
use common::{Command, SensorData};
|
||||
use futures::Stream;
|
||||
use gilrs::{Axis, Event, Gilrs};
|
||||
use tokio::{io::{AsyncReadExt, AsyncWriteExt, BufWriter}, net::{tcp::OwnedReadHalf, TcpStream}, task::JoinHandle, time::{sleep, Instant}};
|
||||
|
||||
|
|
@ -39,10 +38,7 @@ async fn main() -> anyhow::Result<()> {
|
|||
|
||||
let gamepad = gamepads.gamepad(gamepad);
|
||||
|
||||
|
||||
|
||||
let values = gamepad.state();
|
||||
dbg!(values);
|
||||
|
||||
let mut ly= values.axis_data(ly).map(|d| d.value()).unwrap_or(0.0);
|
||||
let mut rx= values.axis_data(rx).map(|d| d.value()).unwrap_or(0.0);
|
||||
|
|
|
|||
Loading…
Reference in a new issue