diff --git a/crates/dies-basestation-client/src/basestation_client.rs b/crates/dies-basestation-client/src/basestation_client.rs index 27c88fe3..c70dff19 100644 --- a/crates/dies-basestation-client/src/basestation_client.rs +++ b/crates/dies-basestation-client/src/basestation_client.rs @@ -84,10 +84,7 @@ pub struct BasestationClient { impl BasestationClient { /// Create a new `BasestationClient`. pub fn new(config: BasestationClientConfig) -> Result { - let BasestationClientConfig { - port_name, - robot_id_map, - } = config; + let BasestationClientConfig { port_name, .. } = config; // Launch a blocking thread for writing to the serial port let (cmd_tx, mut cmd_rx) = @@ -175,6 +172,6 @@ impl BasestationClient { /// Receive a message from the serial port. pub async fn recv(&mut self) -> Result { - Err(anyhow::anyhow!("Not implemented")) + self.info_rx.recv().await.map_err(|e| e.into()) } } diff --git a/crates/dies-cli/src/tui_utils.rs b/crates/dies-cli/src/tui_utils.rs index 4869ff4b..5c4dac91 100644 --- a/crates/dies-cli/src/tui_utils.rs +++ b/crates/dies-cli/src/tui_utils.rs @@ -1,4 +1,4 @@ -use anyhow::{bail, Context, Result}; +use anyhow::{bail, Result}; use clap::{Parser, ValueEnum}; use dies_basestation_client::{list_serial_ports, BasestationClientConfig}; use dies_ssl_client::VisionClientConfig; diff --git a/crates/dies-simulator/src/lib.rs b/crates/dies-simulator/src/lib.rs index 92c84852..03fc5bf4 100644 --- a/crates/dies-simulator/src/lib.rs +++ b/crates/dies-simulator/src/lib.rs @@ -1,6 +1,4 @@ -use dies_core::{ - Angle, BallData, FieldGeometry, KickerCmd, PlayerCmd, PlayerData, PlayerId, Vector2, WorldData, -}; +use dies_core::{Angle, FieldGeometry, KickerCmd, PlayerCmd, PlayerId, Vector2}; use dies_protos::{ ssl_vision_detection::{SSL_DetectionBall, SSL_DetectionFrame, SSL_DetectionRobot}, ssl_vision_geometry::{