diff --git a/CHANGELOG.md b/CHANGELOG.md index be50302..ebdb989 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Response returns `dcs.common.v0.Target[]` for consistent object union across services. - Lua implementation unwraps grpcui oneof wrapper (`volume.shape`) and supports both wrapped and flattened shapes. +### Fixed +- Fixed output of `AtmosphereService.GetWind` to match Mission Editor settings. + ## [0.8.1] 2024-11-05 ### Added diff --git a/src/authentication.rs b/src/authentication.rs index 5c37db9..66299b4 100644 --- a/src/authentication.rs +++ b/src/authentication.rs @@ -26,11 +26,12 @@ impl RequestInterceptor for AuthInterceptor { } } - if client.is_some() { - log::debug!("Authenticated client: {}", client.unwrap()); - Ok(req) - } else { - Err(Status::unauthenticated("Unauthenticated")) + match client { + Some(client_name) => { + log::debug!("Authenticated client: {}", client_name); + Ok(req) + } + _ => Err(Status::unauthenticated("Unauthenticated")), } } _ => Err(Status::unauthenticated("Unauthenticated")), diff --git a/src/rpc/atmosphere.rs b/src/rpc/atmosphere.rs index d50433c..23406ad 100644 --- a/src/rpc/atmosphere.rs +++ b/src/rpc/atmosphere.rs @@ -39,7 +39,7 @@ impl AtmosphereService for MissionRpc { } fn get_wind_heading_and_strength(v: &common::v0::Vector) -> (f32, f32) { - let mut heading = v.x.atan2(v.z).to_degrees(); + let mut heading = v.z.atan2(v.x).to_degrees(); if heading < 0.0 { heading += 360.0; } diff --git a/src/rpc/custom.rs b/src/rpc/custom.rs index 336c3a6..1acfe7a 100644 --- a/src/rpc/custom.rs +++ b/src/rpc/custom.rs @@ -52,6 +52,7 @@ impl CustomService for MissionRpc { Ok(Response::new(custom::v0::EvalResponse { json })) } + #[allow(clippy::result_large_err)] async fn get_magnetic_declination( &self, request: Request,