From 20ada932e864a4ece003fc56360c09a2419aae03 Mon Sep 17 00:00:00 2001 From: Juell Sprott Date: Tue, 25 Mar 2025 16:15:37 +0100 Subject: [PATCH 1/5] make lolabackend public --- nidhogg/Cargo.toml | 2 +- nidhogg/src/backend/lola.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nidhogg/Cargo.toml b/nidhogg/Cargo.toml index a7572f5..5f34dea 100644 --- a/nidhogg/Cargo.toml +++ b/nidhogg/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nidhogg" -version = "0.4.0" +version = "0.4.1" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/nidhogg/src/backend/lola.rs b/nidhogg/src/backend/lola.rs index 212ade2..01ea6d1 100644 --- a/nidhogg/src/backend/lola.rs +++ b/nidhogg/src/backend/lola.rs @@ -149,7 +149,7 @@ impl ReadHardwareInfo for LolaBackend { impl LolaBackend { /// Read a [`LolaNaoState`] from the `LoLA` socket. - fn read_lola_nao_state<'a>( + pub fn read_lola_nao_state<'a>( &mut self, buf: &'a mut [u8; LOLA_BUFFER_SIZE], ) -> Result> { @@ -501,7 +501,7 @@ impl FromLoLA<[f32; 3]> for Vector3 { #[derive(Debug, Deserialize)] #[serde(rename_all = "PascalCase")] -struct LolaNaoState<'a> { +pub struct LolaNaoState<'a> { stiffness: [f32; 25], position: [f32; 25], temperature: [f32; 25], From 0785b1c1e4835778d6d248115f81b8cf7bd4a2fd Mon Sep 17 00:00:00 2001 From: Juell Sprott Date: Tue, 25 Mar 2025 16:25:04 +0100 Subject: [PATCH 2/5] revert versioning --- nidhogg/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nidhogg/Cargo.toml b/nidhogg/Cargo.toml index 5f34dea..a7572f5 100644 --- a/nidhogg/Cargo.toml +++ b/nidhogg/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nidhogg" -version = "0.4.1" +version = "0.4.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html From 3960e9d54a7a0c36471a4b6f2410290fe3f31e83 Mon Sep 17 00:00:00 2001 From: Juell Sprott <73904000+juellsprott@users.noreply.github.com> Date: Wed, 26 Mar 2025 14:51:10 +0100 Subject: [PATCH 3/5] Update Cargo.toml --- nidhogg/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nidhogg/Cargo.toml b/nidhogg/Cargo.toml index a7572f5..5f34dea 100644 --- a/nidhogg/Cargo.toml +++ b/nidhogg/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nidhogg" -version = "0.4.0" +version = "0.4.1" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html From e9da52a3b960d4effde31caae7ba44d8b4476003 Mon Sep 17 00:00:00 2001 From: Gijs de Jong Date: Thu, 27 Mar 2025 09:25:46 +0100 Subject: [PATCH 4/5] re-export `LolaNaoState` as well --- nidhogg/src/backend/lola.rs | 5 +++++ nidhogg/src/backend/mod.rs | 5 +---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/nidhogg/src/backend/lola.rs b/nidhogg/src/backend/lola.rs index 01ea6d1..36c9dea 100644 --- a/nidhogg/src/backend/lola.rs +++ b/nidhogg/src/backend/lola.rs @@ -149,6 +149,11 @@ impl ReadHardwareInfo for LolaBackend { impl LolaBackend { /// Read a [`LolaNaoState`] from the `LoLA` socket. + /// + /// # Note + /// + /// This reads from the underlying `LoLA` unix socket, which consumes the message + /// sent by `LoLA`. pub fn read_lola_nao_state<'a>( &mut self, buf: &'a mut [u8; LOLA_BUFFER_SIZE], diff --git a/nidhogg/src/backend/mod.rs b/nidhogg/src/backend/mod.rs index 79de7f1..2f28338 100644 --- a/nidhogg/src/backend/mod.rs +++ b/nidhogg/src/backend/mod.rs @@ -11,10 +11,7 @@ pub use coppelia::CoppeliaBackend; #[cfg(feature = "lola")] mod lola; -pub use lola::LolaControlMsg; - -#[cfg(feature = "lola")] -pub use lola::LolaBackend; +pub use lola::{LolaBackend, LolaControlMsg, LolaNaoState}; use std::any::type_name; use std::thread; From 528e3a115996e3197f77ca16b8287d65be321567 Mon Sep 17 00:00:00 2001 From: Harold <37922636+YukumoHunter@users.noreply.github.com> Date: Thu, 27 Mar 2025 09:28:11 +0100 Subject: [PATCH 5/5] bump version --- nidhogg/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nidhogg/Cargo.toml b/nidhogg/Cargo.toml index 5f34dea..cfb328a 100644 --- a/nidhogg/Cargo.toml +++ b/nidhogg/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nidhogg" -version = "0.4.1" +version = "0.5.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html