Skip to content

Commit

Permalink
Fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
keesverruijt committed Sep 2, 2024
1 parent 3c96272 commit fd67dec
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/navico/report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ use tokio::sync::mpsc::Sender;
use tokio::time::{ sleep, sleep_until, Instant };
use tokio_graceful_shutdown::SubsystemHandle;

use crate::radar::{ DopplerMode, Legend, RadarError, RadarInfo };
use crate::settings::{ ControlState, ControlType, Controls };
use crate::radar::{ DopplerMode, RadarError, RadarInfo };
use crate::settings::{ ControlState, ControlType };
use crate::util::{ c_string, c_wide_string, create_multicast };

use super::command::{ self, Command };
Expand Down
4 changes: 0 additions & 4 deletions src/radar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,6 @@ impl RadarInfo {
self.legend = default_legend(doppler, self.pixel_values);
}

pub fn set_controls(&mut self, controls: Controls) {
self.controls = Some(controls);
}

///
/// forward_output is activated in all starts of radars when cli args.output
/// is true:
Expand Down
11 changes: 3 additions & 8 deletions src/web.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
use anyhow::anyhow;
use axum::{
extract::{ ConnectInfo, Host, Request, State },
extract::{ ConnectInfo, Host, State },
http::{ StatusCode, Uri },
response::{ IntoResponse, Response },
routing::get,
Json,
Router,
};
use log::{ debug, info, trace };
use log::debug;
use miette::Result;
use serde::{ Deserialize, Serialize };
use std::{
Expand Down Expand Up @@ -36,11 +36,6 @@ pub struct Web {
shutdown_tx: tokio::sync::broadcast::Sender<()>,
}

#[derive(Deserialize)]
struct WebSocketHandlerParameters {
key: String,
}

impl Web {
pub fn new(port: u16, radars: Arc<RwLock<Radars>>) -> Self {
let (shutdown_tx, _) = tokio::sync::broadcast::channel(1);
Expand All @@ -52,7 +47,7 @@ impl Web {
}
}

pub async fn run(mut self, subsys: SubsystemHandle) -> Result<(), WebError> {
pub async fn run(self, subsys: SubsystemHandle) -> Result<(), WebError> {
let listener = TcpListener::bind(
SocketAddr::new(IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)), self.port)
).await.unwrap();
Expand Down

0 comments on commit fd67dec

Please sign in to comment.