diff --git a/src-tauri/src/modes/adsb/mod.rs b/src-tauri/src/modes/adsb/mod.rs index edc1cad..9a0cd98 100644 --- a/src-tauri/src/modes/adsb/mod.rs +++ b/src-tauri/src/modes/adsb/mod.rs @@ -7,7 +7,7 @@ use airborne_vel::*; use aircraft_ident::*; use log::debug; -use super::{AdsbState, AircraftState}; +use super::AircraftState; pub async fn decode_adsb_msg(me: &[u8], aircraft: &mut AircraftState) { let type_code = me[0] >> 3; diff --git a/src-tauri/src/modes/arla/types.rs b/src-tauri/src/modes/arla/types.rs index ea7649e..6996a57 100644 --- a/src-tauri/src/modes/arla/types.rs +++ b/src-tauri/src/modes/arla/types.rs @@ -162,6 +162,12 @@ pub struct RegistrationObject { #[derive(Deserialize, Debug)] #[serde(untagged)] pub enum ApiAircraftRegistrationLookup { - KnownRegistration { registration: RegistrationObject }, - LookupError { error: String, message: String }, + KnownRegistration { + registration: RegistrationObject, + }, + LookupError { + #[allow(dead_code)] + error: String, + message: String, + }, } diff --git a/src-tauri/src/radio_services/soapysdr_adsb.rs b/src-tauri/src/radio_services/soapysdr_adsb.rs index 773e99a..ada9231 100644 --- a/src-tauri/src/radio_services/soapysdr_adsb.rs +++ b/src-tauri/src/radio_services/soapysdr_adsb.rs @@ -6,7 +6,7 @@ use std::{ time::Duration, }; -use blocks::{chunks, Rechunker}; +use blocks::Rechunker; use log::error; use radiorust::{blocks::io::rf, prelude::*}; use soapysdr::Direction; diff --git a/src-tauri/src/radio_services/soapysdr_radio.rs b/src-tauri/src/radio_services/soapysdr_radio.rs index 600b88b..0d7d5cb 100644 --- a/src-tauri/src/radio_services/soapysdr_radio.rs +++ b/src-tauri/src/radio_services/soapysdr_radio.rs @@ -14,7 +14,7 @@ use radiorust::{ use soapysdr::Direction; use souvlaki::{MediaControlEvent, MediaControls, MediaMetadata, MediaPlayback, PlatformConfig}; use tauri::{async_runtime, AppHandle, Emitter, Listener, Manager}; -use tokio::{self, sync, time}; +use tokio::{self, time}; use crate::radiorust_blocks::{ am_demod::AmDemod, @@ -115,7 +115,7 @@ impl RtlSdrState { }; let mut controls = MediaControls::new(config).unwrap(); - controls.set_playback(MediaPlayback::Playing { progress: None }); + let _ = controls.set_playback(MediaPlayback::Playing { progress: None }); let resource_dir = app.path().resource_dir().unwrap(); let icon_url = format!( @@ -128,7 +128,7 @@ impl RtlSdrState { } else { "AM Radio" }); - controls.set_metadata(MediaMetadata { + let _ = controls.set_metadata(MediaMetadata { title: radio_type_name, cover_url: Some(icon_url.as_str()), ..Default::default() @@ -164,12 +164,13 @@ impl RtlSdrState { } let mut locked_controls = controls_clone.lock().unwrap(); if *is_paused_locked { - locked_controls + let _ = locked_controls .set_playback(MediaPlayback::Paused { progress: None }); } else { - locked_controls.set_playback(MediaPlayback::Playing { - progress: None, - }); + let _ = + locked_controls.set_playback(MediaPlayback::Playing { + progress: None, + }); } }) .unwrap(); @@ -279,12 +280,14 @@ impl RtlSdrState { // add rbds decoder to output FM stream let rdbs_decoder = RbdsDecode::::new(app.clone(), move |radiotext: String| { - controls_clone2.lock().unwrap().set_metadata(MediaMetadata { - title: Some(&radiotext), - artist: radio_type_name, - cover_url: Some(icon_url.as_str()), - ..Default::default() - }); + let _ = controls_clone2.lock().unwrap().set_metadata( + MediaMetadata { + title: Some(&radiotext), + artist: radio_type_name, + cover_url: Some(icon_url.as_str()), + ..Default::default() + }, + ); }); rdbs_decoder.feed_from(&rbds_lowpass_filter); } else if stream_settings.stream_type == StreamType::AM { diff --git a/src-tauri/src/radiorust_blocks/adsb_decode.rs b/src-tauri/src/radiorust_blocks/adsb_decode.rs index bd46e8e..eacbe61 100644 --- a/src-tauri/src/radiorust_blocks/adsb_decode.rs +++ b/src-tauri/src/radiorust_blocks/adsb_decode.rs @@ -9,11 +9,7 @@ use radiorust::{ prelude::{ChunkBufPool, Complex}, signal::Signal, }; -use tauri::{ - async_runtime::{self, block_on}, - ipc::Channel, - AppHandle, Emitter, -}; +use tauri::{ipc::Channel, AppHandle}; use tokio::{spawn, sync::Mutex, time::Instant}; use types::ModeSState; @@ -109,7 +105,7 @@ where .collect(); // send update of data (whether new or not) - let mut modes_channel_mut = modes_channel_clone.lock().await; + let modes_channel_mut = modes_channel_clone.lock().await; modes_channel_mut.send(modes_state_mut.clone()).unwrap(); let duration = start.elapsed(); @@ -159,7 +155,7 @@ where #[cfg(debug_assertions)] async fn decode_test_modes( - app: AppHandle, + _app: AppHandle, modes_channel: &mut Channel, modes_state: &mut ModeSState, ) { diff --git a/src-tauri/src/radiorust_blocks/pauseable.rs b/src-tauri/src/radiorust_blocks/pauseable.rs index 8044310..bbdec1e 100644 --- a/src-tauri/src/radiorust_blocks/pauseable.rs +++ b/src-tauri/src/radiorust_blocks/pauseable.rs @@ -1,12 +1,10 @@ use std::sync::{Arc, Mutex}; -use biquad::{self, Biquad, Coefficients, DirectForm1, ToHertz, Type, Q_BUTTERWORTH_F64}; - use radiorust::{ flow::{new_receiver, new_sender, ReceiverConnector, SenderConnector}, impl_block_trait, numbers::Float, - prelude::{Chunk, ChunkBufPool, Complex}, + prelude::{ChunkBufPool, Complex}, signal::Signal, }; use tokio::spawn; @@ -74,8 +72,4 @@ where sender_connector, } } - - fn calc_magnitude(c: Complex) -> f64 { - (c.re.powi(2) + c.im.powi(2)).sqrt().into() - } }