From 8d278e89d992ea5f3b92992f882cfc14437b037a Mon Sep 17 00:00:00 2001 From: Tom Lonergan Date: Sun, 16 Feb 2025 23:25:33 +0000 Subject: [PATCH 1/3] config parsing using my new crate !!!! --- Cargo.lock | 132 ++++++++++++++++++++++++++++++++++++++++- config/pods.yaml | 90 ++++++++++++++-------------- lib/core/Cargo.toml | 1 + lib/core/src/config.rs | 22 +++++++ lib/core/src/lib.rs | 1 + 5 files changed, 200 insertions(+), 46 deletions(-) create mode 100644 lib/core/src/config.rs diff --git a/Cargo.lock b/Cargo.lock index c902218b..aa120c56 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,24 @@ # It is not intended for manual editing. version = 4 +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + [[package]] name = "anyhow" version = "1.0.95" @@ -17,6 +35,12 @@ dependencies = [ "num-traits", ] +[[package]] +name = "arraydeque" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d902e3d592a523def97af8f317b08ce16b7ab854c1985a0c671e6f15cebc236" + [[package]] name = "autocfg" version = "1.4.0" @@ -41,6 +65,29 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "config_to_rs" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d000e31f467114d73e7ec23047353aecbe383cc3147b9ace1760f08a811c356" +dependencies = [ + "convert_case", + "hashlink", + "proc-macro2", + "quote", + "saphyr", + "syn", +] + +[[package]] +name = "convert_case" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb402b8d4c85569410425650ce3eddc7d698ed96d39a73f941b08fb63082f1e7" +dependencies = [ + "unicode-segmentation", +] + [[package]] name = "critical-section" version = "1.2.0" @@ -232,6 +279,15 @@ dependencies = [ "no-std-net", ] +[[package]] +name = "encoding_rs" +version = "0.8.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +dependencies = [ + "cfg-if", +] + [[package]] name = "equivalent" version = "1.0.1" @@ -277,12 +333,31 @@ dependencies = [ "byteorder", ] +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", + "allocator-api2", +] + [[package]] name = "hashbrown" version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" +[[package]] +name = "hashlink" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" +dependencies = [ + "hashbrown 0.14.5", +] + [[package]] name = "heapless" version = "0.8.0" @@ -337,6 +412,7 @@ dependencies = [ name = "hyped_core" version = "0.1.0" dependencies = [ + "config_to_rs", "defmt", "embassy-net", "embedded-io-async", @@ -417,7 +493,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652" dependencies = [ "equivalent", - "hashbrown", + "hashbrown 0.15.2", ] [[package]] @@ -533,6 +609,12 @@ dependencies = [ "libm", ] +[[package]] +name = "once_cell" +version = "1.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e" + [[package]] name = "paste" version = "1.0.15" @@ -616,6 +698,28 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +[[package]] +name = "saphyr" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d31513a748cdf8fb8d1b64dcc14fdd997fa02f2431671c7ce34efbea5e7eeea" +dependencies = [ + "arraydeque", + "encoding_rs", + "hashlink", + "saphyr-parser", +] + +[[package]] +name = "saphyr-parser" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "123f0a6da68f3072c7c761450276d1d444cb391c8be182a757cd26cf684cb77f" +dependencies = [ + "arraydeque", + "hashlink", +] + [[package]] name = "serde" version = "1.0.217" @@ -726,6 +830,12 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" +[[package]] +name = "unicode-segmentation" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" + [[package]] name = "version_check" version = "0.9.5" @@ -737,3 +847,23 @@ name = "void" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" + +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] diff --git a/config/pods.yaml b/config/pods.yaml index a41ccf5a..2dc4eb6d 100644 --- a/config/pods.yaml +++ b/config/pods.yaml @@ -5,7 +5,7 @@ pods: measurements: accelerometer_1: label: 'Accelerometer 1' - type: 'acceleration' + measurement_type: 'acceleration' unit: 'm/s²' format: 'float' limits: @@ -14,7 +14,7 @@ pods: high: 150 accelerometer_2: label: 'Accelerometer 2' - type: 'acceleration' + measurement_type: 'acceleration' unit: 'm/s²' format: 'float' limits: @@ -23,7 +23,7 @@ pods: high: 150 accelerometer_3: label: 'Accelerometer 3' - type: 'acceleration' + measurement_type: 'acceleration' unit: 'm/s²' format: 'float' limits: @@ -32,7 +32,7 @@ pods: high: 150 accelerometer_4: label: 'Accelerometer 4' - type: 'acceleration' + measurement_type: 'acceleration' unit: 'm/s²' format: 'float' limits: @@ -41,7 +41,7 @@ pods: high: 150 accelerometer_avg: label: 'Accelerometer Average' - type: 'acceleration' + measurement_type: 'acceleration' unit: 'm/s²' format: 'float' limits: @@ -50,7 +50,7 @@ pods: high: 150 displacement: label: 'Displacement' - type: 'displacement' + measurement_type: 'displacement' unit: 'm' format: 'float' limits: @@ -59,7 +59,7 @@ pods: high: 100 velocity: label: 'Velocity' - type: 'velocity' + measurement_type: 'velocity' unit: 'm/s' format: 'float' limits: @@ -68,7 +68,7 @@ pods: high: 50 acceleration: label: 'Acceleration' - type: 'acceleration' + measurement_type: 'acceleration' unit: 'm/s²' format: 'float' limits: @@ -77,7 +77,7 @@ pods: high: 5 pressure_back_pull: label: 'Pressure – Back Pull' - type: 'pressure' + measurement_type: 'pressure' unit: 'bar' format: 'float' limits: @@ -89,7 +89,7 @@ pods: high: 5.2 pressure_front_pull: label: 'Pressure – Front Pull' - type: 'pressure' + measurement_type: 'pressure' unit: 'bar' format: 'float' limits: @@ -101,7 +101,7 @@ pods: high: 5.2 pressure_front_push: label: 'Pressure – Front Push' - type: 'pressure' + measurement_type: 'pressure' unit: 'bar' format: 'float' limits: @@ -113,7 +113,7 @@ pods: high: 5.2 pressure_back_push: label: 'Pressure – Back Push' - type: 'pressure' + measurement_type: 'pressure' unit: 'bar' format: 'float' limits: @@ -125,7 +125,7 @@ pods: high: 5.2 pressure_brakes_reservoir: label: 'Pressure – Brakes Reservoir' - type: 'pressure' + measurement_type: 'pressure' unit: 'bar' format: 'float' limits: @@ -137,7 +137,7 @@ pods: high: 6.9 pressure_active_suspension_reservoir: label: 'Pressure – Active Suspension Reservoir' - type: 'pressure' + measurement_type: 'pressure' unit: 'bar' format: 'float' limits: @@ -149,7 +149,7 @@ pods: high: 6.9 pressure_front_brake: label: 'Pressure – Front Brake' - type: 'pressure' + measurement_type: 'pressure' unit: 'bar' format: 'float' limits: @@ -161,7 +161,7 @@ pods: high: 4 pressure_back_brake: label: 'Pressure – Back Brake' - type: 'pressure' + measurement_type: 'pressure' unit: 'bar' format: 'float' limits: @@ -173,7 +173,7 @@ pods: high: 4 thermistor_1: label: 'Thermistor 1' - type: 'temperature' + measurement_type: 'temperature' unit: '°C' format: 'float' limits: @@ -182,7 +182,7 @@ pods: high: 100 thermistor_2: label: 'Thermistor 2' - type: 'temperature' + measurement_type: 'temperature' unit: '°C' format: 'float' limits: @@ -191,7 +191,7 @@ pods: high: 100 thermistor_3: label: 'Thermistor 3' - type: 'temperature' + measurement_type: 'temperature' unit: '°C' format: 'float' limits: @@ -200,7 +200,7 @@ pods: high: 100 thermistor_4: label: 'Thermistor 4' - type: 'temperature' + measurement_type: 'temperature' unit: '°C' format: 'float' limits: @@ -209,7 +209,7 @@ pods: high: 100 thermistor_5: label: 'Thermistor 5' - type: 'temperature' + measurement_type: 'temperature' unit: '°C' format: 'float' limits: @@ -218,7 +218,7 @@ pods: high: 100 thermistor_6: label: 'Thermistor 6' - type: 'temperature' + measurement_type: 'temperature' unit: '°C' format: 'float' limits: @@ -227,7 +227,7 @@ pods: high: 100 thermistor_7: label: 'Thermistor 7' - type: 'temperature' + measurement_type: 'temperature' unit: '°C' format: 'float' limits: @@ -236,7 +236,7 @@ pods: high: 100 thermistor_8: label: 'Thermistor 8' - type: 'temperature' + measurement_type: 'temperature' unit: '°C' format: 'float' limits: @@ -245,7 +245,7 @@ pods: high: 100 thermistor_9: label: 'Thermistor 9' - type: 'temperature' + measurement_type: 'temperature' unit: '°C' format: 'float' limits: @@ -254,7 +254,7 @@ pods: high: 100 thermistor_10: label: 'Thermistor 10' - type: 'temperature' + measurement_type: 'temperature' unit: '°C' format: 'float' limits: @@ -263,7 +263,7 @@ pods: high: 100 thermistor_11: label: 'Thermistor 11' - type: 'temperature' + measurement_type: 'temperature' unit: '°C' format: 'float' limits: @@ -272,7 +272,7 @@ pods: high: 100 thermistor_12: label: 'Thermistor 12' - type: 'temperature' + measurement_type: 'temperature' unit: '°C' format: 'float' limits: @@ -281,7 +281,7 @@ pods: high: 100 hall_effect_1: label: 'Hall Effect 1' - type: 'magnetism' + measurement_type: 'magnetism' unit: 'mT' format: 'float' limits: @@ -290,7 +290,7 @@ pods: high: 100 hall_effect_2: label: 'Hall Effect 2' - type: 'magnetism' + measurement_type: 'magnetism' unit: 'mT' format: 'float' limits: @@ -299,7 +299,7 @@ pods: high: 100 keyence_1: label: 'Keyence 1' - type: 'keyence' + measurement_type: 'keyence' unit: 'number of stripes' format: 'integer' limits: @@ -311,7 +311,7 @@ pods: high: 10 keyence_2: label: 'Keyence 2' - type: 'keyence' + measurement_type: 'keyence' unit: 'number of stripes' format: 'integer' limits: @@ -323,7 +323,7 @@ pods: high: 10 power_line_resistance: label: 'Power Line Resistance' - type: 'resistance' + measurement_type: 'resistance' unit: 'kΩ' format: 'integer' limits: @@ -332,7 +332,7 @@ pods: high: 100 levitation_height_1: label: 'Levitation Height 1' - type: 'levitation' + measurement_type: 'levitation' unit: 'mm' format: 'float' limits: @@ -341,7 +341,7 @@ pods: high: 100 levitation_height_2: label: 'Levitation Height 2' - type: 'levitation' + measurement_type: 'levitation' unit: 'mm' format: 'float' limits: @@ -350,7 +350,7 @@ pods: high: 100 levitation_height_3: label: 'Levitation Height 3' - type: 'levitation' + measurement_type: 'levitation' unit: 'mm' format: 'float' limits: @@ -359,7 +359,7 @@ pods: high: 100 levitation_height_4: label: 'Levitation Height 4' - type: 'levitation' + measurement_type: 'levitation' unit: 'mm' format: 'float' limits: @@ -368,7 +368,7 @@ pods: high: 100 levitation_height_lateral_1: label: 'Levitation Height Lateral 1' - type: 'levitation' + measurement_type: 'levitation' unit: 'mm' format: 'float' limits: @@ -377,7 +377,7 @@ pods: high: 100 levitation_height_lateral_2: label: 'Levitation Height Lateral 2' - type: 'levitation' + measurement_type: 'levitation' unit: 'mm' format: 'float' limits: @@ -387,7 +387,7 @@ pods: statuses: brake_clamp_status: label: 'Brake Clamp Status' - type: 'binary-status' + measurement_type: 'binary-status' format: 'enum' values: - value: 1 @@ -396,7 +396,7 @@ pods: label: 'UNCLAMPED' pod_raised_status: label: 'Pod Raised Status' - type: 'binary-status' + measurement_type: 'binary-status' format: 'enum' values: - value: 1 @@ -405,7 +405,7 @@ pods: label: 'LOWERED' battery_status: label: 'Battery Status' - type: 'binary-status' + measurement_type: 'binary-status' format: 'enum' values: - value: 1 @@ -414,7 +414,7 @@ pods: label: 'UNHEALTHY' motor_controller_status: label: 'Motor Controller Status' - type: 'binary-status' + measurement_type: 'binary-status' format: 'enum' values: - value: 1 @@ -423,10 +423,10 @@ pods: label: 'UNHEALTHY' high_power_status: label: 'High Power Status' - type: 'binary-status' + measurement_type: 'binary-status' format: 'enum' values: - value: 1 label: 'ACTIVE' - value: 0 - label: 'OFF' \ No newline at end of file + label: 'OFF' diff --git a/lib/core/Cargo.toml b/lib/core/Cargo.toml index 4194e589..0a18c6d1 100644 --- a/lib/core/Cargo.toml +++ b/lib/core/Cargo.toml @@ -11,6 +11,7 @@ embedded-io-async = { version = "0.6.1" } rand_core = "0.6.3" serde = { version = "1.0", default-features = false, features = ["derive"] } embassy-net = { version = "0.4.0", default-features = false, features = ["defmt", "tcp", "proto-ipv4", "medium-ip"], git = "https://github.com/embassy-rs/embassy", rev = "1c466b81e6af6b34b1f706318cc0870a459550b7"} +config_to_rs = "0.1.0" [features] std = [] diff --git a/lib/core/src/config.rs b/lib/core/src/config.rs new file mode 100644 index 00000000..f7c1feba --- /dev/null +++ b/lib/core/src/config.rs @@ -0,0 +1,22 @@ +use config_to_rs::config_to_rs; + +/// Configuration for the pods +/// The configuration is loaded from the `config/pods.yaml` file, and can be read using standard +/// Rust syntax. +/// +/// E.g. to get the pod name, +/// ```rust +/// let pod_name = CONFIG.pods.poddington.label; +/// +/// assert_eq!(pod_name, "Poddington"); +/// ```` +#[config_to_rs(yaml, "config/pods.yaml")] +pub struct Config; + +mod test { + #[test] + fn test_config() { + let pod_name = super::CONFIG.pods.poddington.label; + assert_eq!(pod_name, "Poddington"); + } +} diff --git a/lib/core/src/lib.rs b/lib/core/src/lib.rs index 899f1920..9767e91b 100644 --- a/lib/core/src/lib.rs +++ b/lib/core/src/lib.rs @@ -1,6 +1,7 @@ #![cfg_attr(not(feature = "std"), no_std)] pub mod can_sendable; +pub mod config; pub mod format_string; pub mod log_types; pub mod mqtt; From b893dcd77327313f4dd84e89f7bcf83c28860966 Mon Sep 17 00:00:00 2001 From: Tom Lonergan Date: Tue, 18 Feb 2025 14:06:19 +0000 Subject: [PATCH 2/3] use newer version of config_to_rs and env var for config path --- Cargo.lock | 4 +- boards/stm32f767zi/Cargo.lock | 134 +++++++++++++++++++++++++++++++- boards/stm32l432kc/Cargo.lock | 139 +++++++++++++++++++++++++++++++++- boards/stm32l476rg/Cargo.lock | 136 +++++++++++++++++++++++++++++++++ lib/core/Cargo.toml | 2 +- lib/core/build.rs | 11 +++ lib/core/src/config.rs | 2 +- 7 files changed, 421 insertions(+), 7 deletions(-) create mode 100644 lib/core/build.rs diff --git a/Cargo.lock b/Cargo.lock index aa120c56..43d05c50 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -67,9 +67,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "config_to_rs" -version = "0.1.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d000e31f467114d73e7ec23047353aecbe383cc3147b9ace1760f08a811c356" +checksum = "0fe59efedb5aea134ace7c79553989a92d26cfa8274a53062756d3270c1e8dba" dependencies = [ "convert_case", "hashlink", diff --git a/boards/stm32f767zi/Cargo.lock b/boards/stm32f767zi/Cargo.lock index f9bdff12..d5c6bcec 100644 --- a/boards/stm32f767zi/Cargo.lock +++ b/boards/stm32f767zi/Cargo.lock @@ -1,6 +1,30 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 + +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + +[[package]] +name = "arraydeque" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d902e3d592a523def97af8f317b08ce16b7ab854c1985a0c671e6f15cebc236" [[package]] name = "as-slice" @@ -65,6 +89,29 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "config_to_rs" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fe59efedb5aea134ace7c79553989a92d26cfa8274a53062756d3270c1e8dba" +dependencies = [ + "convert_case", + "hashlink", + "proc-macro2", + "quote", + "saphyr", + "syn", +] + +[[package]] +name = "convert_case" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb402b8d4c85569410425650ce3eddc7d698ed96d39a73f941b08fb63082f1e7" +dependencies = [ + "unicode-segmentation", +] + [[package]] name = "cortex-m" version = "0.7.7" @@ -506,6 +553,15 @@ dependencies = [ "embedded-storage", ] +[[package]] +name = "encoding_rs" +version = "0.8.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +dependencies = [ + "cfg-if", +] + [[package]] name = "fnv" version = "1.0.7" @@ -588,6 +644,25 @@ dependencies = [ "byteorder", ] +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", + "allocator-api2", +] + +[[package]] +name = "hashlink" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" +dependencies = [ + "hashbrown", +] + [[package]] name = "heapless" version = "0.5.6" @@ -667,6 +742,7 @@ dependencies = [ name = "hyped_core" version = "0.1.0" dependencies = [ + "config_to_rs", "defmt", "embassy-net", "embedded-io-async", @@ -680,7 +756,7 @@ dependencies = [ name = "hyped_gpio" version = "0.1.0" dependencies = [ - "heapless", + "heapless 0.8.0", "hyped_core", ] @@ -768,6 +844,12 @@ dependencies = [ "autocfg", ] +[[package]] +name = "once_cell" +version = "1.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e" + [[package]] name = "panic-probe" version = "0.3.2" @@ -864,6 +946,28 @@ dependencies = [ "semver", ] +[[package]] +name = "saphyr" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d31513a748cdf8fb8d1b64dcc14fdd997fa02f2431671c7ce34efbea5e7eeea" +dependencies = [ + "arraydeque", + "encoding_rs", + "hashlink", + "saphyr-parser", +] + +[[package]] +name = "saphyr-parser" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "123f0a6da68f3072c7c761450276d1d444cb391c8be182a757cd26cf684cb77f" +dependencies = [ + "arraydeque", + "hashlink", +] + [[package]] name = "sdio-host" version = "0.5.0" @@ -1017,6 +1121,12 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" +[[package]] +name = "unicode-segmentation" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" + [[package]] name = "vcell" version = "0.1.3" @@ -1043,3 +1153,23 @@ checksum = "de437e2a6208b014ab52972a27e59b33fa2920d3e00fe05026167a1c509d19cc" dependencies = [ "vcell", ] + +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] diff --git a/boards/stm32l432kc/Cargo.lock b/boards/stm32l432kc/Cargo.lock index 5cff0fcf..ed244a71 100644 --- a/boards/stm32l432kc/Cargo.lock +++ b/boards/stm32l432kc/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "advanced-pid" @@ -8,6 +8,30 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f362a7a18d309d27ab34dbea24aa0635c313162ebb6053f94939aa155d56c5b" +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + +[[package]] +name = "arraydeque" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d902e3d592a523def97af8f317b08ce16b7ab854c1985a0c671e6f15cebc236" + [[package]] name = "autocfg" version = "1.4.0" @@ -59,6 +83,29 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "config_to_rs" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fe59efedb5aea134ace7c79553989a92d26cfa8274a53062756d3270c1e8dba" +dependencies = [ + "convert_case", + "hashlink", + "proc-macro2", + "quote", + "saphyr", + "syn", +] + +[[package]] +name = "convert_case" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb402b8d4c85569410425650ce3eddc7d698ed96d39a73f941b08fb63082f1e7" +dependencies = [ + "unicode-segmentation", +] + [[package]] name = "cortex-m" version = "0.7.7" @@ -486,6 +533,15 @@ dependencies = [ "embedded-storage", ] +[[package]] +name = "encoding_rs" +version = "0.8.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +dependencies = [ + "cfg-if", +] + [[package]] name = "fnv" version = "1.0.7" @@ -531,6 +587,25 @@ dependencies = [ "byteorder", ] +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", + "allocator-api2", +] + +[[package]] +name = "hashlink" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" +dependencies = [ + "hashbrown", +] + [[package]] name = "heapless" version = "0.8.0" @@ -571,6 +646,7 @@ dependencies = [ name = "hyped_core" version = "0.1.0" dependencies = [ + "config_to_rs", "defmt", "embassy-net", "embedded-io-async", @@ -585,6 +661,7 @@ name = "hyped_gpio" version = "0.1.0" dependencies = [ "heapless", + "hyped_core", ] [[package]] @@ -655,6 +732,12 @@ dependencies = [ "autocfg", ] +[[package]] +name = "once_cell" +version = "1.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e" + [[package]] name = "panic-probe" version = "0.3.2" @@ -751,6 +834,28 @@ dependencies = [ "semver", ] +[[package]] +name = "saphyr" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d31513a748cdf8fb8d1b64dcc14fdd997fa02f2431671c7ce34efbea5e7eeea" +dependencies = [ + "arraydeque", + "encoding_rs", + "hashlink", + "saphyr-parser", +] + +[[package]] +name = "saphyr-parser" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "123f0a6da68f3072c7c761450276d1d444cb391c8be182a757cd26cf684cb77f" +dependencies = [ + "arraydeque", + "hashlink", +] + [[package]] name = "sdio-host" version = "0.5.0" @@ -888,12 +993,24 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" +[[package]] +name = "unicode-segmentation" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" + [[package]] name = "vcell" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77439c1b53d2303b20d9459b1ade71a83c716e3f9c34f3228c00e6f185d6c002" +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + [[package]] name = "void" version = "1.0.2" @@ -908,3 +1025,23 @@ checksum = "de437e2a6208b014ab52972a27e59b33fa2920d3e00fe05026167a1c509d19cc" dependencies = [ "vcell", ] + +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] diff --git a/boards/stm32l476rg/Cargo.lock b/boards/stm32l476rg/Cargo.lock index bd3a0411..2f683c00 100644 --- a/boards/stm32l476rg/Cargo.lock +++ b/boards/stm32l476rg/Cargo.lock @@ -2,6 +2,30 @@ # It is not intended for manual editing. version = 4 +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + +[[package]] +name = "arraydeque" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d902e3d592a523def97af8f317b08ce16b7ab854c1985a0c671e6f15cebc236" + [[package]] name = "autocfg" version = "1.4.0" @@ -53,6 +77,29 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "config_to_rs" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fe59efedb5aea134ace7c79553989a92d26cfa8274a53062756d3270c1e8dba" +dependencies = [ + "convert_case", + "hashlink", + "proc-macro2", + "quote", + "saphyr", + "syn", +] + +[[package]] +name = "convert_case" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb402b8d4c85569410425650ce3eddc7d698ed96d39a73f941b08fb63082f1e7" +dependencies = [ + "unicode-segmentation", +] + [[package]] name = "cortex-m" version = "0.7.7" @@ -494,6 +541,15 @@ dependencies = [ "embedded-storage", ] +[[package]] +name = "encoding_rs" +version = "0.8.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +dependencies = [ + "cfg-if", +] + [[package]] name = "fnv" version = "1.0.7" @@ -539,6 +595,25 @@ dependencies = [ "byteorder", ] +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", + "allocator-api2", +] + +[[package]] +name = "hashlink" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" +dependencies = [ + "hashbrown", +] + [[package]] name = "heapless" version = "0.8.0" @@ -615,6 +690,7 @@ dependencies = [ name = "hyped_core" version = "0.1.0" dependencies = [ + "config_to_rs", "defmt", "embassy-net", "embedded-io-async", @@ -716,6 +792,12 @@ dependencies = [ "autocfg", ] +[[package]] +name = "once_cell" +version = "1.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e" + [[package]] name = "panic-probe" version = "0.3.2" @@ -812,6 +894,28 @@ dependencies = [ "semver", ] +[[package]] +name = "saphyr" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d31513a748cdf8fb8d1b64dcc14fdd997fa02f2431671c7ce34efbea5e7eeea" +dependencies = [ + "arraydeque", + "encoding_rs", + "hashlink", + "saphyr-parser", +] + +[[package]] +name = "saphyr-parser" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "123f0a6da68f3072c7c761450276d1d444cb391c8be182a757cd26cf684cb77f" +dependencies = [ + "arraydeque", + "hashlink", +] + [[package]] name = "sdio-host" version = "0.5.0" @@ -949,12 +1053,24 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" +[[package]] +name = "unicode-segmentation" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" + [[package]] name = "vcell" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77439c1b53d2303b20d9459b1ade71a83c716e3f9c34f3228c00e6f185d6c002" +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + [[package]] name = "void" version = "1.0.2" @@ -969,3 +1085,23 @@ checksum = "de437e2a6208b014ab52972a27e59b33fa2920d3e00fe05026167a1c509d19cc" dependencies = [ "vcell", ] + +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] diff --git a/lib/core/Cargo.toml b/lib/core/Cargo.toml index 0a18c6d1..9fcae362 100644 --- a/lib/core/Cargo.toml +++ b/lib/core/Cargo.toml @@ -11,7 +11,7 @@ embedded-io-async = { version = "0.6.1" } rand_core = "0.6.3" serde = { version = "1.0", default-features = false, features = ["derive"] } embassy-net = { version = "0.4.0", default-features = false, features = ["defmt", "tcp", "proto-ipv4", "medium-ip"], git = "https://github.com/embassy-rs/embassy", rev = "1c466b81e6af6b34b1f706318cc0870a459550b7"} -config_to_rs = "0.1.0" +config_to_rs = "0.2.1" [features] std = [] diff --git a/lib/core/build.rs b/lib/core/build.rs new file mode 100644 index 00000000..f4826ff8 --- /dev/null +++ b/lib/core/build.rs @@ -0,0 +1,11 @@ +const CONFIG_PATH: &str = "../../config/pods.yaml"; + +fn main() { + let current_dir = std::env::current_dir().unwrap(); + let config_path = current_dir.join(CONFIG_PATH); + let config_path = config_path.to_str().unwrap(); + println!("cargo:rerun-if-changed=."); + println!("cargo:rerun-if-changed={}", config_path); + + println!("cargo:rustc-env=CONFIG_PATH={}", config_path); +} diff --git a/lib/core/src/config.rs b/lib/core/src/config.rs index f7c1feba..d2bc15d9 100644 --- a/lib/core/src/config.rs +++ b/lib/core/src/config.rs @@ -10,7 +10,7 @@ use config_to_rs::config_to_rs; /// /// assert_eq!(pod_name, "Poddington"); /// ```` -#[config_to_rs(yaml, "config/pods.yaml")] +#[config_to_rs(yaml)] pub struct Config; mod test { From 7472e5ad9dc38832857b0e786832e63b9b280e5a Mon Sep 17 00:00:00 2001 From: Tom Lonergan Date: Tue, 18 Feb 2025 15:56:35 +0000 Subject: [PATCH 3/3] rename measurement_type --- config/pods.yaml | 88 ++++++++++++++++++++++++------------------------ 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/config/pods.yaml b/config/pods.yaml index 2dc4eb6d..1e55135f 100644 --- a/config/pods.yaml +++ b/config/pods.yaml @@ -5,7 +5,7 @@ pods: measurements: accelerometer_1: label: 'Accelerometer 1' - measurement_type: 'acceleration' + kind: 'acceleration' unit: 'm/s²' format: 'float' limits: @@ -14,7 +14,7 @@ pods: high: 150 accelerometer_2: label: 'Accelerometer 2' - measurement_type: 'acceleration' + kind: 'acceleration' unit: 'm/s²' format: 'float' limits: @@ -23,7 +23,7 @@ pods: high: 150 accelerometer_3: label: 'Accelerometer 3' - measurement_type: 'acceleration' + kind: 'acceleration' unit: 'm/s²' format: 'float' limits: @@ -32,7 +32,7 @@ pods: high: 150 accelerometer_4: label: 'Accelerometer 4' - measurement_type: 'acceleration' + kind: 'acceleration' unit: 'm/s²' format: 'float' limits: @@ -41,7 +41,7 @@ pods: high: 150 accelerometer_avg: label: 'Accelerometer Average' - measurement_type: 'acceleration' + kind: 'acceleration' unit: 'm/s²' format: 'float' limits: @@ -50,7 +50,7 @@ pods: high: 150 displacement: label: 'Displacement' - measurement_type: 'displacement' + kind: 'displacement' unit: 'm' format: 'float' limits: @@ -59,7 +59,7 @@ pods: high: 100 velocity: label: 'Velocity' - measurement_type: 'velocity' + kind: 'velocity' unit: 'm/s' format: 'float' limits: @@ -68,7 +68,7 @@ pods: high: 50 acceleration: label: 'Acceleration' - measurement_type: 'acceleration' + kind: 'acceleration' unit: 'm/s²' format: 'float' limits: @@ -77,7 +77,7 @@ pods: high: 5 pressure_back_pull: label: 'Pressure – Back Pull' - measurement_type: 'pressure' + kind: 'pressure' unit: 'bar' format: 'float' limits: @@ -89,7 +89,7 @@ pods: high: 5.2 pressure_front_pull: label: 'Pressure – Front Pull' - measurement_type: 'pressure' + kind: 'pressure' unit: 'bar' format: 'float' limits: @@ -101,7 +101,7 @@ pods: high: 5.2 pressure_front_push: label: 'Pressure – Front Push' - measurement_type: 'pressure' + kind: 'pressure' unit: 'bar' format: 'float' limits: @@ -113,7 +113,7 @@ pods: high: 5.2 pressure_back_push: label: 'Pressure – Back Push' - measurement_type: 'pressure' + kind: 'pressure' unit: 'bar' format: 'float' limits: @@ -125,7 +125,7 @@ pods: high: 5.2 pressure_brakes_reservoir: label: 'Pressure – Brakes Reservoir' - measurement_type: 'pressure' + kind: 'pressure' unit: 'bar' format: 'float' limits: @@ -137,7 +137,7 @@ pods: high: 6.9 pressure_active_suspension_reservoir: label: 'Pressure – Active Suspension Reservoir' - measurement_type: 'pressure' + kind: 'pressure' unit: 'bar' format: 'float' limits: @@ -149,7 +149,7 @@ pods: high: 6.9 pressure_front_brake: label: 'Pressure – Front Brake' - measurement_type: 'pressure' + kind: 'pressure' unit: 'bar' format: 'float' limits: @@ -161,7 +161,7 @@ pods: high: 4 pressure_back_brake: label: 'Pressure – Back Brake' - measurement_type: 'pressure' + kind: 'pressure' unit: 'bar' format: 'float' limits: @@ -173,7 +173,7 @@ pods: high: 4 thermistor_1: label: 'Thermistor 1' - measurement_type: 'temperature' + kind: 'temperature' unit: '°C' format: 'float' limits: @@ -182,7 +182,7 @@ pods: high: 100 thermistor_2: label: 'Thermistor 2' - measurement_type: 'temperature' + kind: 'temperature' unit: '°C' format: 'float' limits: @@ -191,7 +191,7 @@ pods: high: 100 thermistor_3: label: 'Thermistor 3' - measurement_type: 'temperature' + kind: 'temperature' unit: '°C' format: 'float' limits: @@ -200,7 +200,7 @@ pods: high: 100 thermistor_4: label: 'Thermistor 4' - measurement_type: 'temperature' + kind: 'temperature' unit: '°C' format: 'float' limits: @@ -209,7 +209,7 @@ pods: high: 100 thermistor_5: label: 'Thermistor 5' - measurement_type: 'temperature' + kind: 'temperature' unit: '°C' format: 'float' limits: @@ -218,7 +218,7 @@ pods: high: 100 thermistor_6: label: 'Thermistor 6' - measurement_type: 'temperature' + kind: 'temperature' unit: '°C' format: 'float' limits: @@ -227,7 +227,7 @@ pods: high: 100 thermistor_7: label: 'Thermistor 7' - measurement_type: 'temperature' + kind: 'temperature' unit: '°C' format: 'float' limits: @@ -236,7 +236,7 @@ pods: high: 100 thermistor_8: label: 'Thermistor 8' - measurement_type: 'temperature' + kind: 'temperature' unit: '°C' format: 'float' limits: @@ -245,7 +245,7 @@ pods: high: 100 thermistor_9: label: 'Thermistor 9' - measurement_type: 'temperature' + kind: 'temperature' unit: '°C' format: 'float' limits: @@ -254,7 +254,7 @@ pods: high: 100 thermistor_10: label: 'Thermistor 10' - measurement_type: 'temperature' + kind: 'temperature' unit: '°C' format: 'float' limits: @@ -263,7 +263,7 @@ pods: high: 100 thermistor_11: label: 'Thermistor 11' - measurement_type: 'temperature' + kind: 'temperature' unit: '°C' format: 'float' limits: @@ -272,7 +272,7 @@ pods: high: 100 thermistor_12: label: 'Thermistor 12' - measurement_type: 'temperature' + kind: 'temperature' unit: '°C' format: 'float' limits: @@ -281,7 +281,7 @@ pods: high: 100 hall_effect_1: label: 'Hall Effect 1' - measurement_type: 'magnetism' + kind: 'magnetism' unit: 'mT' format: 'float' limits: @@ -290,7 +290,7 @@ pods: high: 100 hall_effect_2: label: 'Hall Effect 2' - measurement_type: 'magnetism' + kind: 'magnetism' unit: 'mT' format: 'float' limits: @@ -299,7 +299,7 @@ pods: high: 100 keyence_1: label: 'Keyence 1' - measurement_type: 'keyence' + kind: 'keyence' unit: 'number of stripes' format: 'integer' limits: @@ -311,7 +311,7 @@ pods: high: 10 keyence_2: label: 'Keyence 2' - measurement_type: 'keyence' + kind: 'keyence' unit: 'number of stripes' format: 'integer' limits: @@ -323,7 +323,7 @@ pods: high: 10 power_line_resistance: label: 'Power Line Resistance' - measurement_type: 'resistance' + kind: 'resistance' unit: 'kΩ' format: 'integer' limits: @@ -332,7 +332,7 @@ pods: high: 100 levitation_height_1: label: 'Levitation Height 1' - measurement_type: 'levitation' + kind: 'levitation' unit: 'mm' format: 'float' limits: @@ -341,7 +341,7 @@ pods: high: 100 levitation_height_2: label: 'Levitation Height 2' - measurement_type: 'levitation' + kind: 'levitation' unit: 'mm' format: 'float' limits: @@ -350,7 +350,7 @@ pods: high: 100 levitation_height_3: label: 'Levitation Height 3' - measurement_type: 'levitation' + kind: 'levitation' unit: 'mm' format: 'float' limits: @@ -359,7 +359,7 @@ pods: high: 100 levitation_height_4: label: 'Levitation Height 4' - measurement_type: 'levitation' + kind: 'levitation' unit: 'mm' format: 'float' limits: @@ -368,7 +368,7 @@ pods: high: 100 levitation_height_lateral_1: label: 'Levitation Height Lateral 1' - measurement_type: 'levitation' + kind: 'levitation' unit: 'mm' format: 'float' limits: @@ -377,7 +377,7 @@ pods: high: 100 levitation_height_lateral_2: label: 'Levitation Height Lateral 2' - measurement_type: 'levitation' + kind: 'levitation' unit: 'mm' format: 'float' limits: @@ -387,7 +387,7 @@ pods: statuses: brake_clamp_status: label: 'Brake Clamp Status' - measurement_type: 'binary-status' + kind: 'binary-status' format: 'enum' values: - value: 1 @@ -396,7 +396,7 @@ pods: label: 'UNCLAMPED' pod_raised_status: label: 'Pod Raised Status' - measurement_type: 'binary-status' + kind: 'binary-status' format: 'enum' values: - value: 1 @@ -405,7 +405,7 @@ pods: label: 'LOWERED' battery_status: label: 'Battery Status' - measurement_type: 'binary-status' + kind: 'binary-status' format: 'enum' values: - value: 1 @@ -414,7 +414,7 @@ pods: label: 'UNHEALTHY' motor_controller_status: label: 'Motor Controller Status' - measurement_type: 'binary-status' + kind: 'binary-status' format: 'enum' values: - value: 1 @@ -423,7 +423,7 @@ pods: label: 'UNHEALTHY' high_power_status: label: 'High Power Status' - measurement_type: 'binary-status' + kind: 'binary-status' format: 'enum' values: - value: 1