diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b09ea3bf..a11a1ec3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,52 +1,52 @@ -# Contributing - -Thanks for being interested in contributing to this project! This document describes -what you need to know to get started with the code. - - -## Installing the dependencies - -First, install the `Rust` programming language by following the instructions at -[rustup.rs](https://rustup.rs). - -Next, install `libclang`, which is used by the -[`ovr_overlay`](https://crates.io/crates/ovr_overlay) bindings for OpenVR. For windows, -use [this] link. For Linux, simply `sudo apt-get install -y libclang-dev`. - -[this]: https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.5/LLVM-14.0.5-win64.exe - -You will also need SteamVR installed. - -### Steam Deck - -If you are building on the steam deck, be sure that you have all the necessary libraries -for native development installed. To get them, follow [these] instructions. - -[these]: https://www.reddit.com/r/SteamDeck/comments/t92ozw/for_compiling_c_code/ - - -## Building - -`cargo` is the build tool for rust. You can `cargo run` to run the code, `cargo check` -to check if your code compiles, and `cargo test` to run tests. You can also do -`--release` to generate an optimized release mode version. This will take longer to -compile but will run significantly faster. - - -## Documentation - -Documentation is autogenerated by cargo and can be viewed in a web browser with -`cargo doc --all --open --no-deps --document-private-items`. You can run -`cargo doc --help` to learn more about what those flags do. The documentation is also -automatically published to github pages for every commit on the `main` branch [here]. - -[here]: https://slimevr.github.io/SlimeVR-Overlay/skeletal_model - - -## Code Style - -All code is autoformatted by `cargo fmt`. We suggest turning on autoformatting on save -in your IDE, otherwise you can just run `cargo fmt` on the command line. Also, all files -should end in a newline and have extra whitespace trimmed. - -Its also a good idea to run `cargo clippy` to fix the style lints it generates. +# Contributing + +Thanks for being interested in contributing to this project! This document describes +what you need to know to get started with the code. + + +## Installing the dependencies + +First, install the `Rust` programming language by following the instructions at +[rustup.rs](https://rustup.rs). + +Next, install `libclang`, which is used by the +[`ovr_overlay`](https://crates.io/crates/ovr_overlay) bindings for OpenVR. For windows, +use [this] link. For Linux, simply `sudo apt-get install -y libclang-dev`. + +[this]: https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.5/LLVM-14.0.5-win64.exe + +You will also need SteamVR installed. + +### Steam Deck + +If you are building on the steam deck, be sure that you have all the necessary libraries +for native development installed. To get them, follow [these] instructions. + +[these]: https://www.reddit.com/r/SteamDeck/comments/t92ozw/for_compiling_c_code/ + + +## Building + +`cargo` is the build tool for rust. You can `cargo run` to run the code, `cargo check` +to check if your code compiles, and `cargo test` to run tests. You can also do +`--release` to generate an optimized release mode version. This will take longer to +compile but will run significantly faster. + + +## Documentation + +Documentation is autogenerated by cargo and can be viewed in a web browser with +`cargo doc --all --open --no-deps --document-private-items`. You can run +`cargo doc --help` to learn more about what those flags do. The documentation is also +automatically published to github pages for every commit on the `main` branch [here]. + +[here]: https://slimevr.github.io/SlimeVR-Overlay/skeletal_model + + +## Code Style + +All code is autoformatted by `cargo fmt`. We suggest turning on autoformatting on save +in your IDE, otherwise you can just run `cargo fmt` on the command line. Also, all files +should end in a newline and have extra whitespace trimmed. + +Its also a good idea to run `cargo clippy` to fix the style lints it generates. diff --git a/autoupdater/README.md b/autoupdater/README.md index 58550403..002c6f3a 100644 --- a/autoupdater/README.md +++ b/autoupdater/README.md @@ -1,16 +1,16 @@ -# Autoupdater - -The SlimeVR autoupdater manages updating all the software for SlimeVR on a user's -computer. It does not handle updates of firmware. - -It reads a `version.yaml` file from a github release to determine the versions of the -software to download, then fetches them and installs them. - -Long term, we may use this to replace most or all of the business logic of the current -[SlimeVR Web Installer](https://github.com/SlimeVR/SlimeVR-Installer). - -## Project Status -This is abandoned due to lack of interested developers. - -When being actively developed, the Yaml description and serialization was complete -already. +# Autoupdater + +The SlimeVR autoupdater manages updating all the software for SlimeVR on a user's +computer. It does not handle updates of firmware. + +It reads a `version.yaml` file from a github release to determine the versions of the +software to download, then fetches them and installs them. + +Long term, we may use this to replace most or all of the business logic of the current +[SlimeVR Web Installer](https://github.com/SlimeVR/SlimeVR-Installer). + +## Project Status +This is abandoned due to lack of interested developers. + +When being actively developed, the Yaml description and serialization was complete +already. diff --git a/firmware/src/imu/drivers/bmi160/math.rs b/firmware/src/imu/drivers/bmi160/math.rs index 5ab509a2..ba033688 100644 --- a/firmware/src/imu/drivers/bmi160/math.rs +++ b/firmware/src/imu/drivers/bmi160/math.rs @@ -167,12 +167,12 @@ impl AccelFsr { /// least significant bits per accel pub const fn lsb_per_accel(self) -> f32 { - self.lsb_per_g() * ACCEL_PER_G + self.lsb_per_g() * G_PER_ACCEL } /// g per least significant bit pub const fn accel_per_lsb(self) -> f32 { - self.g_per_lsb() * G_PER_ACCEL + self.g_per_lsb() * ACCEL_PER_G } /// The bmi160 returns the data from the accel as an `i16`, we must use the Full diff --git a/firmware/src/imu/drivers/bmi160/mod.rs b/firmware/src/imu/drivers/bmi160/mod.rs index 7507af53..e700d63b 100644 --- a/firmware/src/imu/drivers/bmi160/mod.rs +++ b/firmware/src/imu/drivers/bmi160/mod.rs @@ -89,6 +89,8 @@ impl Imu for Bmi160 { async fn next_data(&mut self) -> Result { // Avoids permablocking async tasks, since we don't do any actual waiting. yield_now().await; + yield_now().await; //improves tps more + yield_now().await; //50-60 to 70-80 let data = self.driver.data(SensorSelector::new().gyro().accel())?; let gyro = data.gyro.unwrap(); diff --git a/firmware/src/imu/fusion/stubbed.rs b/firmware/src/imu/fusion/stubbed.rs index 112739f6..777be78f 100644 --- a/firmware/src/imu/fusion/stubbed.rs +++ b/firmware/src/imu/fusion/stubbed.rs @@ -8,6 +8,7 @@ use crate::imu::{FusedData, Quat, UnfusedData}; /// A fake fuser that just rotates around the x axis. pub struct Stubbed(Instant); impl Stubbed { + #[allow(dead_code)] pub fn new() -> Self { Self(Instant::now()) }