Added pressure : kilopascal

This commit is contained in:
Zachary Sunforge
2024-11-12 12:37:32 -08:00
parent dae7ae8a98
commit 74dd1cc246
5 changed files with 10 additions and 3 deletions

View File

@ -11,7 +11,7 @@ members = [
] ]
[workspace.package] [workspace.package]
version = "0.3.8" version = "0.3.10"
edition = "2021" edition = "2021"
repository = "https://git.bfpower.io/BFPOWER/physical" repository = "https://git.bfpower.io/BFPOWER/physical"
readme = "README.md" readme = "README.md"

View File

@ -1,7 +1,7 @@
# Before upgrading check that everything is available on all tier1 targets here: # Before upgrading check that everything is available on all tier1 targets here:
# https://rust-lang.github.io/rustup-components-history # https://rust-lang.github.io/rustup-components-history
[toolchain] [toolchain]
channel = "1.81" channel = "1.82"
components = [ "rust-src", "rustfmt", "llvm-tools" ] components = [ "rust-src", "rustfmt", "llvm-tools" ]
targets = [ targets = [
"thumbv7em-none-eabi", "thumbv7em-none-eabi",

View File

@ -1,5 +1,5 @@
use crate::quantity::{Quantity, Value}; use crate::quantity::{Quantity, Value};
use generate_quantity::quantity_type; use generate_quantity::quantity_type;
//----- Watter per Square Meter ---------------------------------- //----- Watts per Square Meter ----------------------------------
quantity_type! {WattsPerSquareMeter, "W/m²"} quantity_type! {WattsPerSquareMeter, "W/m²"}

View File

@ -3,6 +3,7 @@ mod resistance;
mod temperature; mod temperature;
mod voltage; mod voltage;
mod volume_rate; mod volume_rate;
mod pressure;
#[cfg(feature = "defmt")] #[cfg(feature = "defmt")]
pub use defmt_impl::*; pub use defmt_impl::*;
@ -12,6 +13,7 @@ pub use resistance::*;
pub use temperature::*; pub use temperature::*;
pub use voltage::*; pub use voltage::*;
pub use volume_rate::*; pub use volume_rate::*;
pub use pressure::*;
use core::fmt::Display; use core::fmt::Display;
use core::marker::PhantomData; use core::marker::PhantomData;

5
src/quantity/pressure.rs Normal file
View File

@ -0,0 +1,5 @@
use crate::quantity::{Quantity, Value};
use generate_quantity::quantity_type;
//----- Kilopascal ----------------------------------
quantity_type! {KiloPascal, "kPa"}