From 52340ddc6d01b412703e7ad30bf1cb49728e70e7 Mon Sep 17 00:00:00 2001 From: Patryk Paluch Date: Wed, 23 Aug 2023 00:48:20 +0200 Subject: [PATCH 1/9] feat(flight-visualizer): add basic flight visualizer --- .gitignore | 1 + Cargo.lock | 2451 ++++++++++++++++++++++++- Cargo.toml | 2 + tools/dummy-lora-receiver/Cargo.toml | 9 + tools/dummy-lora-receiver/README.md | 16 + tools/dummy-lora-receiver/src/main.rs | 74 + tools/flight-visualizer/Cargo.toml | 11 + tools/flight-visualizer/README.md | 71 + tools/flight-visualizer/src/app.rs | 88 + tools/flight-visualizer/src/data.rs | 231 +++ tools/flight-visualizer/src/lib.rs | 3 + tools/flight-visualizer/src/main.rs | 10 + tools/flight-visualizer/src/ui.rs | 97 + 13 files changed, 2994 insertions(+), 70 deletions(-) create mode 100644 tools/dummy-lora-receiver/Cargo.toml create mode 100644 tools/dummy-lora-receiver/README.md create mode 100644 tools/dummy-lora-receiver/src/main.rs create mode 100644 tools/flight-visualizer/Cargo.toml create mode 100644 tools/flight-visualizer/README.md create mode 100644 tools/flight-visualizer/src/app.rs create mode 100644 tools/flight-visualizer/src/data.rs create mode 100644 tools/flight-visualizer/src/lib.rs create mode 100644 tools/flight-visualizer/src/main.rs create mode 100644 tools/flight-visualizer/src/ui.rs diff --git a/.gitignore b/.gitignore index f50678e..1a57ca8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /.vscode /target +/.idea gyffhks package-lock.json \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 54b05f3..68178b0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -23,6 +23,22 @@ dependencies = [ "mach", ] +[[package]] +name = "ab_glyph" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5110f1c78cf582855d895ecd0746b653db010cec6d9f5575293f27934d980a39" +dependencies = [ + "ab_glyph_rasterizer", + "owned_ttf_parser", +] + +[[package]] +name = "ab_glyph_rasterizer" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" + [[package]] name = "accelerometer" version = "0.12.0" @@ -32,6 +48,75 @@ dependencies = [ "micromath", ] +[[package]] +name = "accesskit" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76eb1adf08c5bcaa8490b9851fd53cca27fa9880076f178ea9d29f05196728a8" + +[[package]] +name = "accesskit_consumer" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04bb4d9e4772fe0d47df57d0d5dbe5d85dd05e2f37ae1ddb6b105e76be58fb00" +dependencies = [ + "accesskit", +] + +[[package]] +name = "accesskit_macos" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "134d0acf6acb667c89d3332999b1a5df4edbc8d6113910f392ebb73f2b03bb56" +dependencies = [ + "accesskit", + "accesskit_consumer", + "objc2", + "once_cell", +] + +[[package]] +name = "accesskit_unix" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e084cb5168790c0c112626175412dc5ad127083441a8248ae49ddf6725519e83" +dependencies = [ + "accesskit", + "accesskit_consumer", + "async-channel", + "atspi", + "futures-lite", + "serde", + "zbus", +] + +[[package]] +name = "accesskit_windows" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9eac0a7f2d7cd7a93b938af401d3d8e8b7094217989a7c25c55a953023436e31" +dependencies = [ + "accesskit", + "accesskit_consumer", + "arrayvec", + "once_cell", + "paste", + "windows", +] + +[[package]] +name = "accesskit_winit" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "825d23acee1bd6d25cbaa3ca6ed6e73faf24122a774ec33d52c5c86c6ab423c0" +dependencies = [ + "accesskit", + "accesskit_macos", + "accesskit_unix", + "accesskit_windows", + "winit", +] + [[package]] name = "addr2line" version = "0.19.0" @@ -47,6 +132,17 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "ahash" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", +] + [[package]] name = "aho-corasick" version = "1.0.2" @@ -65,6 +161,30 @@ dependencies = [ "as-slice", ] +[[package]] +name = "android-activity" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64529721f27c2314ced0890ce45e469574a73e5e6fdd6e9da1860eb29285f5e0" +dependencies = [ + "android-properties", + "bitflags 1.3.2", + "cc", + "jni-sys", + "libc", + "log", + "ndk", + "ndk-context", + "ndk-sys", + "num_enum 0.6.1", +] + +[[package]] +name = "android-properties" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" + [[package]] name = "anstream" version = "0.3.2" @@ -101,7 +221,7 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" dependencies = [ - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -111,7 +231,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" dependencies = [ "anstyle", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -123,6 +243,36 @@ dependencies = [ "num-traits", ] +[[package]] +name = "arboard" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6041616acea41d67c4a984709ddab1587fd0b10efe5cc563fee954d2f011854" +dependencies = [ + "clipboard-win", + "log", + "objc", + "objc-foundation", + "objc_id", + "once_cell", + "parking_lot", + "thiserror", + "winapi", + "x11rb", +] + +[[package]] +name = "arrayref" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + [[package]] name = "as-slice" version = "0.1.5" @@ -135,6 +285,128 @@ dependencies = [ "stable_deref_trait", ] +[[package]] +name = "async-broadcast" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c48ccdbf6ca6b121e0f586cbc0e73ae440e56c67c30fa0873b4e110d9c26d2b" +dependencies = [ + "event-listener", + "futures-core", +] + +[[package]] +name = "async-channel" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" +dependencies = [ + "concurrent-queue", + "event-listener", + "futures-core", +] + +[[package]] +name = "async-executor" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fa3dc5f2a8564f07759c008b9109dc0d39de92a88d5588b8a5036d286383afb" +dependencies = [ + "async-lock", + "async-task", + "concurrent-queue", + "fastrand", + "futures-lite", + "slab", +] + +[[package]] +name = "async-fs" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" +dependencies = [ + "async-lock", + "autocfg", + "blocking", + "futures-lite", +] + +[[package]] +name = "async-io" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" +dependencies = [ + "async-lock", + "autocfg", + "cfg-if", + "concurrent-queue", + "futures-lite", + "log", + "parking", + "polling", + "rustix", + "slab", + "socket2", + "waker-fn", +] + +[[package]] +name = "async-lock" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" +dependencies = [ + "event-listener", +] + +[[package]] +name = "async-process" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a9d28b1d97e08915212e2e45310d47854eafa69600756fc735fb788f75199c9" +dependencies = [ + "async-io", + "async-lock", + "autocfg", + "blocking", + "cfg-if", + "event-listener", + "futures-lite", + "rustix", + "signal-hook", + "windows-sys 0.48.0", +] + +[[package]] +name = "async-recursion" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.18", +] + +[[package]] +name = "async-task" +version = "4.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc7ab41815b3c653ccd2978ec3255c81349336702dfdf62ee6f7069b12a3aae" + +[[package]] +name = "async-trait" +version = "0.1.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b2d0f03b3640e3a630367e40c468cb7f309529c708ed1d88597047b0e7c6ef7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.18", +] + [[package]] name = "atomic-polyfill" version = "0.1.11" @@ -153,6 +425,45 @@ dependencies = [ "critical-section", ] +[[package]] +name = "atomic-waker" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1181e1e0d1fce796a03db1ae795d67167da795f9cf4a39c37589e85ef57f26d3" + +[[package]] +name = "atomic_refcell" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "112ef6b3f6cb3cb6fc5b6b494ef7a848492cff1ab0ef4de10b0f7d572861c905" + +[[package]] +name = "atspi" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "674e7a3376837b2e7d12d34d58ac47073c491dc3bf6f71a7adaf687d4d817faa" +dependencies = [ + "async-recursion", + "async-trait", + "atspi-macros", + "enumflags2", + "futures-lite", + "serde", + "tracing", + "zbus", + "zbus_names", +] + +[[package]] +name = "atspi-macros" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fb4870a32c0eaa17e35bca0e6b16020635157121fb7d45593d242c295bc768" +dependencies = [ + "quote", + "syn 1.0.109", +] + [[package]] name = "atty" version = "0.2.14" @@ -180,7 +491,7 @@ dependencies = [ "cc", "cfg-if", "libc", - "miniz_oxide", + "miniz_oxide 0.6.2", "object", "rustc-demangle", ] @@ -218,6 +529,55 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6776fc96284a0bb647b615056fc496d1fe1644a7ab01829818a6d91cae888b84" +[[package]] +name = "block" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array 0.14.7", +] + +[[package]] +name = "block-sys" +version = "0.1.0-beta.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa55741ee90902547802152aaf3f8e5248aab7e21468089560d4c8840561146" +dependencies = [ + "objc-sys", +] + +[[package]] +name = "block2" +version = "0.2.0-alpha.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dd9e63c1744f755c2f60332b88de39d341e5e86239014ad839bd71c106dec42" +dependencies = [ + "block-sys", + "objc2-encode", +] + +[[package]] +name = "blocking" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77231a1c8f801696fc0123ec6150ce92cffb8e164a02afb9c8ddee0e9b65ad65" +dependencies = [ + "async-channel", + "async-lock", + "async-task", + "atomic-waker", + "fastrand", + "futures-lite", + "log", +] + [[package]] name = "bme280" version = "0.4.4" @@ -227,12 +587,58 @@ dependencies = [ "embedded-hal 1.0.0-alpha.8", ] +[[package]] +name = "bumpalo" +version = "3.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" + +[[package]] +name = "bytemuck" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdde5c9cd29ebd706ce1b35600920a33550e402fc998a2e53ad3b42c3c47a192" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.18", +] + [[package]] name = "byteorder" version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +[[package]] +name = "bytes" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" + +[[package]] +name = "calloop" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52e0d00eb1ea24371a97d2da6201c6747a633dc6dc1988ef503403b4c59504a8" +dependencies = [ + "bitflags 1.3.2", + "log", + "nix 0.25.1", + "slotmap", + "thiserror", + "vec_map", +] + [[package]] name = "cansat-core" version = "0.1.0" @@ -256,7 +662,7 @@ dependencies = [ "defmt", "embedded-hal 1.0.0-alpha.8", "heapless", - "rand", + "rand 0.8.5", ] [[package]] @@ -321,6 +727,15 @@ name = "cc" version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +dependencies = [ + "jobserver", +] + +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" [[package]] name = "cfg-if" @@ -328,6 +743,21 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" + +[[package]] +name = "cgl" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ced0551234e87afee12411d535648dd89d2e7f34c78b753395567aff3d447ff" +dependencies = [ + "libc", +] + [[package]] name = "clap" version = "4.3.2" @@ -370,6 +800,48 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" +[[package]] +name = "clipboard-win" +version = "4.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7191c27c2357d9b7ef96baac1773290d4ca63b24205b82a3fd8a0637afcf0362" +dependencies = [ + "error-code", + "str-buf", + "winapi", +] + +[[package]] +name = "cocoa" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f425db7937052c684daec3bd6375c8abe2d146dca4b8b143d6db777c39138f3a" +dependencies = [ + "bitflags 1.3.2", + "block", + "cocoa-foundation", + "core-foundation", + "core-graphics", + "foreign-types", + "libc", + "objc", +] + +[[package]] +name = "cocoa-foundation" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "931d3837c286f56e3c58423ce4eba12d08db2374461a785c86f672b08b5650d6" +dependencies = [ + "bitflags 1.3.2", + "block", + "core-foundation", + "core-graphics-types", + "foreign-types", + "libc", + "objc", +] + [[package]] name = "color-eyre" version = "0.6.2" @@ -383,6 +855,12 @@ dependencies = [ "owo-colors", ] +[[package]] +name = "color_quant" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" + [[package]] name = "colorchoice" version = "1.0.0" @@ -400,6 +878,65 @@ dependencies = [ "winapi", ] +[[package]] +name = "combine" +version = "4.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" +dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "concurrent-queue" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "core-foundation" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" + +[[package]] +name = "core-graphics" +version = "0.22.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-graphics-types", + "foreign-types", + "libc", +] + +[[package]] +name = "core-graphics-types" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bb142d41022986c1d8ff29103a1411c8a3dfad3552f87a4f8dc50d61d4f4e33" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "libc", +] + [[package]] name = "cortex-m" version = "0.6.7" @@ -446,12 +983,49 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "cpufeatures" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +dependencies = [ + "cfg-if", +] + [[package]] name = "critical-section" version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6548a0ad5d2549e111e1f6a11a6c2e2d00ce6a3dafe22948d67c2b443f775e52" +[[package]] +name = "crossbeam-utils" +version = "0.8.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array 0.14.7", + "typenum", +] + [[package]] name = "csv-core" version = "0.1.10" @@ -503,6 +1077,17 @@ dependencies = [ "defmt", ] +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "derive_more" version = "0.99.17" @@ -514,6 +1099,135 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] + +[[package]] +name = "dispatch" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" + +[[package]] +name = "dlib" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" +dependencies = [ + "libloading 0.8.0", +] + +[[package]] +name = "downcast-rs" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" + +[[package]] +name = "dummy-lora-receiver" +version = "0.1.0" +dependencies = [ + "noise", +] + +[[package]] +name = "ecolor" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e479a7fa3f23d4e794f8b2f8b3568dd4e47886ad1b12c9c095e141cb591eb63" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "eframe" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf4596583a2c680c55b6feaa748f74890c4f9cb9c7cb69d6117110444cb65b2f" +dependencies = [ + "bytemuck", + "cocoa", + "egui", + "egui-winit", + "egui_glow", + "glow", + "glutin", + "glutin-winit", + "image", + "js-sys", + "log", + "objc", + "percent-encoding", + "raw-window-handle", + "thiserror", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winapi", + "winit", +] + +[[package]] +name = "egui" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3aef8ec3ae1b772f340170c65bf27d5b8c28f543a0116c844d2ac08d01123e7" +dependencies = [ + "accesskit", + "ahash", + "epaint", + "log", + "nohash-hasher", +] + +[[package]] +name = "egui-winit" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a49155fd4a0a4fb21224407a91de0030847972ef90fc64edb63621caea61cb2" +dependencies = [ + "accesskit_winit", + "arboard", + "egui", + "instant", + "log", + "raw-window-handle", + "smithay-clipboard", + "webbrowser", + "winit", +] + +[[package]] +name = "egui_glow" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f8c2752cdf1b0ef5fcda59a898cacabad974d4f5880e92a420b2c917022da64" +dependencies = [ + "bytemuck", + "egui", + "glow", + "log", + "memoffset 0.6.5", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "emath" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3857d743a6e0741cdd60b622a74c7a36ea75f5f8f11b793b41d905d2c9721a4b" +dependencies = [ + "bytemuck", +] + [[package]] name = "embedded-dma" version = "0.2.0" @@ -559,6 +1273,50 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "723dce4e9f25b6e6c5f35628e144794e5b459216ed7da97b7c4b66cdb3fa82ca" +[[package]] +name = "enumflags2" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c041f5090df68b32bcd905365fd51769c8b9d553fe87fde0b683534f10c01bd2" +dependencies = [ + "enumflags2_derive", + "serde", +] + +[[package]] +name = "enumflags2_derive" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.18", +] + +[[package]] +name = "epaint" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09333964d4d57f40a85338ba3ca5ed4716070ab184dcfed966b35491c5c64f3b" +dependencies = [ + "ab_glyph", + "ahash", + "atomic_refcell", + "bytemuck", + "ecolor", + "emath", + "log", + "nohash-hasher", + "parking_lot", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + [[package]] name = "errno" version = "0.3.1" @@ -567,7 +1325,7 @@ checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" dependencies = [ "errno-dragonfly", "libc", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -580,6 +1338,22 @@ dependencies = [ "libc", ] +[[package]] +name = "error-code" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64f18991e7bf11e7ffee451b5318b5c1a73c52d0d0ada6e5a3017c8c1ced6a21" +dependencies = [ + "libc", + "str-buf", +] + +[[package]] +name = "event-listener" +version = "2.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" + [[package]] name = "eyre" version = "0.6.8" @@ -590,6 +1364,67 @@ dependencies = [ "once_cell", ] +[[package]] +name = "fastrand" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" +dependencies = [ + "instant", +] + +[[package]] +name = "fdeflate" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d329bdeac514ee06249dabc27877490f17f5d371ec693360768b838e19f3ae10" +dependencies = [ + "simd-adler32", +] + +[[package]] +name = "flate2" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" +dependencies = [ + "crc32fast", + "miniz_oxide 0.7.1", +] + +[[package]] +name = "flight-visualizer" +version = "0.1.0" +dependencies = [ + "eframe", + "egui", + "glow", +] + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +dependencies = [ + "percent-encoding", +] + [[package]] name = "fugit" version = "0.3.7" @@ -616,6 +1451,33 @@ version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +[[package]] +name = "futures-io" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" + +[[package]] +name = "futures-lite" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" +dependencies = [ + "fastrand", + "futures-core", + "futures-io", + "memchr", + "parking", + "pin-project-lite", + "waker-fn", +] + +[[package]] +name = "futures-sink" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" + [[package]] name = "futures-task" version = "0.3.28" @@ -629,9 +1491,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" dependencies = [ "futures-core", + "futures-io", + "futures-sink", "futures-task", + "memchr", "pin-project-lite", "pin-utils", + "slab", ] [[package]] @@ -668,6 +1534,27 @@ dependencies = [ "version_check", ] +[[package]] +name = "gethostname" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1ebd34e35c46e00bb73e81363248d627782724609fe1b6396f553f68fe3862e" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", +] + [[package]] name = "getrandom" version = "0.2.10" @@ -676,7 +1563,7 @@ checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", ] [[package]] @@ -686,44 +1573,137 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" [[package]] -name = "hash32" -version = "0.2.1" +name = "gl_generator" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67" +checksum = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d" dependencies = [ - "byteorder", + "khronos_api", + "log", + "xml-rs", ] [[package]] -name = "hashbrown" +name = "glow" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +checksum = "ca0fe580e4b60a8ab24a868bc08e2f03cbcb20d3d676601fa909386713333728" +dependencies = [ + "js-sys", + "slotmap", + "wasm-bindgen", + "web-sys", +] [[package]] -name = "heapless" -version = "0.7.16" +name = "glutin" +version = "0.30.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db04bc24a18b9ea980628ecf00e6c0264f3c1426dac36c00cb49b6fbad8b0743" +checksum = "8fc93b03242719b8ad39fb26ed2b01737144ce7bd4bfc7adadcef806596760fe" dependencies = [ - "atomic-polyfill 0.1.11", - "defmt", - "hash32", - "rustc_version 0.4.0", - "serde", - "spin", - "stable_deref_trait", + "bitflags 1.3.2", + "cfg_aliases", + "cgl", + "core-foundation", + "dispatch", + "glutin_egl_sys", + "glutin_glx_sys", + "glutin_wgl_sys", + "libloading 0.7.4", + "objc2", + "once_cell", + "raw-window-handle", + "wayland-sys 0.30.1", + "windows-sys 0.45.0", + "x11-dl", ] [[package]] -name = "heapless-bytes" +name = "glutin-winit" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7285eba272c6af3e9f15fb9e1c1b6e7d35aa70580ffe0d47af017e97dfb6f48b" +checksum = "629a873fc04062830bfe8f97c03773bcd7b371e23bcc465d0a61448cd1588fa4" dependencies = [ - "heapless", - "serde", - "typenum", + "cfg_aliases", + "glutin", + "raw-window-handle", + "winit", +] + +[[package]] +name = "glutin_egl_sys" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af784eb26c5a68ec85391268e074f0aa618c096eadb5d6330b0911cf34fe57c5" +dependencies = [ + "gl_generator", + "windows-sys 0.45.0", +] + +[[package]] +name = "glutin_glx_sys" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b53cb5fe568964aa066a3ba91eac5ecbac869fb0842cd0dc9e412434f1a1494" +dependencies = [ + "gl_generator", + "x11-dl", +] + +[[package]] +name = "glutin_wgl_sys" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef89398e90033fc6bc65e9bd42fd29bbbfd483bda5b56dc5562f455550618165" +dependencies = [ + "gl_generator", +] + +[[package]] +name = "hash32" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67" +dependencies = [ + "byteorder", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" + +[[package]] +name = "heapless" +version = "0.7.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db04bc24a18b9ea980628ecf00e6c0264f3c1426dac36c00cb49b6fbad8b0743" +dependencies = [ + "atomic-polyfill 0.1.11", + "defmt", + "hash32", + "rustc_version 0.4.0", + "serde", + "spin", + "stable_deref_trait", +] + +[[package]] +name = "heapless-bytes" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7285eba272c6af3e9f15fb9e1c1b6e7d35aa70580ffe0d47af017e97dfb6f48b" +dependencies = [ + "heapless", + "serde", + "typenum", ] [[package]] @@ -747,6 +1727,45 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "home" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +dependencies = [ + "windows-sys 0.48.0", +] + +[[package]] +name = "idna" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "image" +version = "0.24.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f3dfdbdd72063086ff443e297b61695500514b1e41095b6fb9a5ab48a70a711" +dependencies = [ + "bytemuck", + "byteorder", + "color_quant", + "num-rational", + "num-traits", + "png", +] + [[package]] name = "indenter" version = "0.3.3" @@ -760,7 +1779,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +dependencies = [ + "equivalent", + "hashbrown 0.14.0", +] + +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", ] [[package]] @@ -771,7 +1812,7 @@ checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ "hermit-abi 0.3.1", "libc", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -783,7 +1824,7 @@ dependencies = [ "hermit-abi 0.3.1", "io-lifetimes", "rustix", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -792,6 +1833,52 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +[[package]] +name = "jni" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" +dependencies = [ + "cesu8", + "cfg-if", + "combine", + "jni-sys", + "log", + "thiserror", + "walkdir", + "windows-sys 0.45.0", +] + +[[package]] +name = "jni-sys" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" + +[[package]] +name = "jobserver" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "khronos_api" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" + [[package]] name = "lazy_static" version = "1.4.0" @@ -804,6 +1891,26 @@ version = "0.2.146" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b" +[[package]] +name = "libloading" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +dependencies = [ + "cfg-if", + "winapi", +] + +[[package]] +name = "libloading" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d580318f95776505201b28cf98eb1fa5e4be3b689633ba6a3e6cd880ff22d8cb" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + [[package]] name = "libm" version = "0.2.7" @@ -844,7 +1951,7 @@ checksum = "0f41b6bb1f0a9cf25c0f184469382e73112fa0071b206ef5b3c6b235c7353a84" dependencies = [ "accelerometer", "embedded-hal 0.2.7", - "num_enum", + "num_enum 0.5.11", ] [[package]] @@ -857,6 +1964,12 @@ dependencies = [ "scopeguard", ] +[[package]] +name = "log" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" + [[package]] name = "lora-cli" version = "0.1.0" @@ -887,12 +2000,48 @@ dependencies = [ "libc", ] +[[package]] +name = "malloc_buf" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" +dependencies = [ + "libc", +] + [[package]] name = "memchr" version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +[[package]] +name = "memmap2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" +dependencies = [ + "libc", +] + +[[package]] +name = "memoffset" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +dependencies = [ + "autocfg", +] + +[[package]] +name = "memoffset" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +dependencies = [ + "autocfg", +] + [[package]] name = "micromath" version = "1.1.1" @@ -917,6 +2066,28 @@ dependencies = [ "adler", ] +[[package]] +name = "miniz_oxide" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +dependencies = [ + "adler", + "simd-adler32", +] + +[[package]] +name = "mio" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" +dependencies = [ + "libc", + "log", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.48.0", +] + [[package]] name = "mpu6050" version = "0.1.6" @@ -960,6 +2131,60 @@ dependencies = [ "defmt", ] +[[package]] +name = "ndk" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" +dependencies = [ + "bitflags 1.3.2", + "jni-sys", + "ndk-sys", + "num_enum 0.5.11", + "raw-window-handle", + "thiserror", +] + +[[package]] +name = "ndk-context" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" + +[[package]] +name = "ndk-sys" +version = "0.4.1+23.1.7779620" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cf2aae958bd232cac5069850591667ad422d263686d75b52a065f9badeee5a3" +dependencies = [ + "jni-sys", +] + +[[package]] +name = "nix" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" +dependencies = [ + "bitflags 1.3.2", + "cfg-if", + "libc", + "memoffset 0.6.5", +] + +[[package]] +name = "nix" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f346ff70e7dbfd675fe90590b92d59ef2de15a8779ae305ebcbfd3f0caf59be4" +dependencies = [ + "autocfg", + "bitflags 1.3.2", + "cfg-if", + "libc", + "memoffset 0.6.5", +] + [[package]] name = "nix" version = "0.26.2" @@ -969,9 +2194,27 @@ dependencies = [ "bitflags 1.3.2", "cfg-if", "libc", + "memoffset 0.7.1", "static_assertions", ] +[[package]] +name = "nohash-hasher" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" + +[[package]] +name = "noise" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ba869e17168793186c10ca82c7079a4ffdeac4f1a7d9e755b9491c028180e40" +dependencies = [ + "num-traits", + "rand 0.7.3", + "rand_xorshift", +] + [[package]] name = "nom" version = "7.1.3" @@ -1027,7 +2270,16 @@ version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" dependencies = [ - "num_enum_derive", + "num_enum_derive 0.5.11", +] + +[[package]] +name = "num_enum" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" +dependencies = [ + "num_enum_derive 0.6.1", ] [[package]] @@ -1036,40 +2288,136 @@ version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" dependencies = [ + "proc-macro-crate", "proc-macro2", "quote", "syn 1.0.109", ] [[package]] -name = "object" -version = "0.30.4" +name = "num_enum_derive" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385" +checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" dependencies = [ - "memchr", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.18", ] [[package]] -name = "once_cell" -version = "1.18.0" +name = "objc" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" +dependencies = [ + "malloc_buf", +] [[package]] -name = "owo-colors" -version = "3.5.0" +name = "objc-foundation" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" +checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" +dependencies = [ + "block", + "objc", + "objc_id", +] [[package]] -name = "panic-probe" -version = "0.3.1" +name = "objc-sys" +version = "0.2.0-beta.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa6fa5645ef5a760cd340eaa92af9c1ce131c8c09e7f8926d8a24b59d26652b9" +checksum = "df3b9834c1e95694a05a828b59f55fa2afec6288359cda67146126b3f90a55d7" + +[[package]] +name = "objc2" +version = "0.3.0-beta.3.patch-leaks.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e01640f9f2cb1220bbe80325e179e532cb3379ebcd1bf2279d703c19fe3a468" dependencies = [ - "cortex-m 0.7.7", - "defmt", + "block2", + "objc-sys", + "objc2-encode", +] + +[[package]] +name = "objc2-encode" +version = "2.0.0-pre.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abfcac41015b00a120608fdaa6938c44cb983fee294351cc4bac7638b4e50512" +dependencies = [ + "objc-sys", +] + +[[package]] +name = "objc_id" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b" +dependencies = [ + "objc", +] + +[[package]] +name = "object" +version = "0.30.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" + +[[package]] +name = "orbclient" +version = "0.3.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8378ac0dfbd4e7895f2d2c1f1345cab3836910baf3a300b000d04250f0c8428f" +dependencies = [ + "redox_syscall", +] + +[[package]] +name = "ordered-stream" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aa2b01e1d916879f73a53d01d1d6cee68adbb31d6d9177a8cfce093cced1d50" +dependencies = [ + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "owned_ttf_parser" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "706de7e2214113d63a8238d1910463cfce781129a6f263d13fdb09ff64355ba4" +dependencies = [ + "ttf-parser", +] + +[[package]] +name = "owo-colors" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" + +[[package]] +name = "panic-probe" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa6fa5645ef5a760cd340eaa92af9c1ce131c8c09e7f8926d8a24b59d26652b9" +dependencies = [ + "cortex-m 0.7.7", + "defmt", ] [[package]] @@ -1081,12 +2429,47 @@ dependencies = [ "cortex-m 0.7.7", ] +[[package]] +name = "parking" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e" + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets 0.48.0", +] + [[package]] name = "paste" version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +[[package]] +name = "percent-encoding" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" + [[package]] name = "pin-project-lite" version = "0.2.9" @@ -1105,12 +2488,51 @@ version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +[[package]] +name = "png" +version = "0.17.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd75bf2d8dd3702b9707cdbc56a5b9ef42cec752eb8b3bafc01234558442aa64" +dependencies = [ + "bitflags 1.3.2", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide 0.7.1", +] + +[[package]] +name = "polling" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" +dependencies = [ + "autocfg", + "bitflags 1.3.2", + "cfg-if", + "concurrent-queue", + "libc", + "log", + "pin-project-lite", + "windows-sys 0.48.0", +] + [[package]] name = "ppv-lite86" version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit", +] + [[package]] name = "proc-macro-error" version = "1.0.4" @@ -1153,6 +2575,19 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", +] + [[package]] name = "rand" version = "0.8.5" @@ -1160,8 +2595,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha", - "rand_core", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", ] [[package]] @@ -1171,7 +2616,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", ] [[package]] @@ -1180,7 +2634,40 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom", + "getrandom 0.2.10", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_xorshift" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77d416b86801d23dde1aa643023b775c3a462efc0ed96443add11546cdf1dca8" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "raw-window-handle" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" + +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags 1.3.2", ] [[package]] @@ -1235,7 +2722,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a38200e4b59d03545fc0f1055cde51fce8cb3be632285ad9874fcf287f4ebc75" dependencies = [ - "indexmap", + "indexmap 1.9.3", "proc-macro-error", "proc-macro2", "quote", @@ -1301,7 +2788,7 @@ dependencies = [ "io-lifetimes", "libc", "linux-raw-sys", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -1310,12 +2797,40 @@ version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + [[package]] name = "scopeguard" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +[[package]] +name = "sctk-adwaita" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cda4e97be1fd174ccc2aae81c8b694e803fa99b34e8fd0f057a9d70698e3ed09" +dependencies = [ + "ab_glyph", + "log", + "memmap2", + "smithay-client-toolkit", + "tiny-skia", +] + [[package]] name = "semver" version = "0.9.0" @@ -1370,6 +2885,17 @@ dependencies = [ "syn 2.0.18", ] +[[package]] +name = "serde_repr" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f0a21fba416426ac927b1691996e82079f8b6156e920c85345f135b2e9ba2de" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.18", +] + [[package]] name = "serialport" version = "4.2.1" @@ -1382,12 +2908,23 @@ dependencies = [ "cfg-if", "libudev", "mach2", - "nix", + "nix 0.26.2", "regex", "scopeguard", "winapi", ] +[[package]] +name = "sha1" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + [[package]] name = "shared-bus" version = "0.2.4" @@ -1401,6 +2938,25 @@ dependencies = [ "nb 0.1.3", ] +[[package]] +name = "signal-hook" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" +dependencies = [ + "libc", + "signal-hook-registry", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +dependencies = [ + "libc", +] + [[package]] name = "simba" version = "0.7.3" @@ -1413,6 +2969,75 @@ dependencies = [ "paste", ] +[[package]] +name = "simd-adler32" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "slotmap" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1e08e261d0e8f5c43123b7adf3e4ca1690d655377ac93a03b2c9d3e98de1342" +dependencies = [ + "version_check", +] + +[[package]] +name = "smallvec" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" + +[[package]] +name = "smithay-client-toolkit" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f307c47d32d2715eb2e0ece5589057820e0e5e70d07c247d1063e844e107f454" +dependencies = [ + "bitflags 1.3.2", + "calloop", + "dlib", + "lazy_static", + "log", + "memmap2", + "nix 0.24.3", + "pkg-config", + "wayland-client", + "wayland-cursor", + "wayland-protocols", +] + +[[package]] +name = "smithay-clipboard" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a345c870a1fae0b1b779085e81b51e614767c239e93503588e54c5b17f4b0e8" +dependencies = [ + "smithay-client-toolkit", + "wayland-client", +] + +[[package]] +name = "socket2" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "spin" version = "0.9.8" @@ -1464,12 +3089,24 @@ dependencies = [ "fugit", "fugit-timer", "nb 1.1.0", - "rand_core", + "rand_core 0.6.4", "stm32f4", "time", "void", ] +[[package]] +name = "str-buf" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0" + +[[package]] +name = "strict-num" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" + [[package]] name = "strsim" version = "0.10.0" @@ -1498,6 +3135,20 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "tempfile" +version = "3.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6" +dependencies = [ + "autocfg", + "cfg-if", + "fastrand", + "redox_syscall", + "rustix", + "windows-sys 0.48.0", +] + [[package]] name = "thiserror" version = "1.0.40" @@ -1534,19 +3185,130 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] -name = "toml" -version = "0.5.11" +name = "tiny-skia" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +checksum = "df8493a203431061e901613751931f047d1971337153f96d0e5e363d6dbf6a67" dependencies = [ - "serde", + "arrayref", + "arrayvec", + "bytemuck", + "cfg-if", + "png", + "tiny-skia-path", ] [[package]] -name = "typenum" -version = "1.16.0" +name = "tiny-skia-path" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "adbfb5d3f3dd57a0e11d12f4f13d4ebbbc1b5c15b7ab0a156d030b21da5f677c" +dependencies = [ + "arrayref", + "bytemuck", + "strict-num", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_datetime" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" + +[[package]] +name = "toml_edit" +version = "0.19.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" +dependencies = [ + "indexmap 2.0.0", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tracing" +version = "0.1.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +dependencies = [ + "cfg-if", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.18", +] + +[[package]] +name = "tracing-core" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "ttf-parser" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a464a4b34948a5f67fddd2b823c62d9d92e44be75058b99939eae6c5b6960b33" + +[[package]] +name = "typenum" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" + +[[package]] +name = "uds_windows" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce65604324d3cce9b966701489fbd0cf318cb1f7bd9dd07ac9a4ee6fb791930d" +dependencies = [ + "tempfile", + "winapi", +] + +[[package]] +name = "unicode-bidi" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" @@ -1554,6 +3316,26 @@ version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "url" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + [[package]] name = "utf8parse" version = "0.2.1" @@ -1566,6 +3348,12 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77439c1b53d2303b20d9459b1ade71a83c716e3f9c34f3228c00e6f185d6c002" +[[package]] +name = "vec_map" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" + [[package]] name = "version_check" version = "0.9.4" @@ -1587,12 +3375,212 @@ dependencies = [ "vcell", ] +[[package]] +name = "waker-fn" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" + +[[package]] +name = "walkdir" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasm-bindgen" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.18", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.18", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" + +[[package]] +name = "wayland-client" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f3b068c05a039c9f755f881dc50f01732214f5685e379829759088967c46715" +dependencies = [ + "bitflags 1.3.2", + "downcast-rs", + "libc", + "nix 0.24.3", + "scoped-tls", + "wayland-commons", + "wayland-scanner", + "wayland-sys 0.29.5", +] + +[[package]] +name = "wayland-commons" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8691f134d584a33a6606d9d717b95c4fa20065605f798a3f350d78dced02a902" +dependencies = [ + "nix 0.24.3", + "once_cell", + "smallvec", + "wayland-sys 0.29.5", +] + +[[package]] +name = "wayland-cursor" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6865c6b66f13d6257bef1cd40cbfe8ef2f150fb8ebbdb1e8e873455931377661" +dependencies = [ + "nix 0.24.3", + "wayland-client", + "xcursor", +] + +[[package]] +name = "wayland-protocols" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b950621f9354b322ee817a23474e479b34be96c2e909c14f7bc0100e9a970bc6" +dependencies = [ + "bitflags 1.3.2", + "wayland-client", + "wayland-commons", + "wayland-scanner", +] + +[[package]] +name = "wayland-scanner" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f4303d8fa22ab852f789e75a967f0a2cdc430a607751c0499bada3e451cbd53" +dependencies = [ + "proc-macro2", + "quote", + "xml-rs", +] + +[[package]] +name = "wayland-sys" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be12ce1a3c39ec7dba25594b97b42cb3195d54953ddb9d3d95a7c3902bc6e9d4" +dependencies = [ + "dlib", + "lazy_static", + "pkg-config", +] + +[[package]] +name = "wayland-sys" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96b2a02ac608e07132978689a6f9bf4214949c85998c247abadd4f4129b1aa06" +dependencies = [ + "dlib", + "lazy_static", + "log", + "pkg-config", +] + +[[package]] +name = "web-sys" +version = "0.3.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webbrowser" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2c79b77f525a2d670cb40619d7d9c673d09e0666f72c591ebd7861f84a87e57" +dependencies = [ + "core-foundation", + "home", + "jni", + "log", + "ndk-context", + "objc", + "raw-window-handle", + "url", + "web-sys", +] + [[package]] name = "winapi" version = "0.3.9" @@ -1609,19 +3597,94 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi", +] + +[[package]] +name = "winapi-wsapoll" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c17110f57155602a80dca10be03852116403c9ff3cd25b079d666f2aa3df6e" +dependencies = [ + "winapi", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-targets 0.48.0", +] + +[[package]] +name = "windows-implement" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e2ee588991b9e7e6c8338edf3333fbe4da35dc72092643958ebb43f0ab2c49c" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "windows-interface" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6fb8df20c9bcaa8ad6ab513f7b40104840c8867d5751126e4df3b08388d0cc7" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + [[package]] name = "windows-sys" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets", + "windows-targets 0.48.0", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", ] [[package]] @@ -1630,57 +3693,201 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.48.0", + "windows_aarch64_msvc 0.48.0", + "windows_i686_gnu 0.48.0", + "windows_i686_msvc 0.48.0", + "windows_x86_64_gnu 0.48.0", + "windows_x86_64_gnullvm 0.48.0", + "windows_x86_64_msvc 0.48.0", ] +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + [[package]] name = "windows_aarch64_gnullvm" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + [[package]] name = "windows_aarch64_msvc" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + [[package]] name = "windows_i686_gnu" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + [[package]] name = "windows_i686_msvc" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + [[package]] name = "windows_x86_64_gnu" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + [[package]] name = "windows_x86_64_msvc" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +[[package]] +name = "winit" +version = "0.28.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "866db3f712fffba75d31bf0cdecf357c8aeafd158c5b7ab51dba2a2b2d47f196" +dependencies = [ + "android-activity", + "bitflags 1.3.2", + "cfg_aliases", + "core-foundation", + "core-graphics", + "dispatch", + "instant", + "libc", + "log", + "mio", + "ndk", + "objc2", + "once_cell", + "orbclient", + "percent-encoding", + "raw-window-handle", + "redox_syscall", + "sctk-adwaita", + "smithay-client-toolkit", + "wasm-bindgen", + "wayland-client", + "wayland-commons", + "wayland-protocols", + "wayland-scanner", + "web-sys", + "windows-sys 0.45.0", + "x11-dl", +] + +[[package]] +name = "winnow" +version = "0.5.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d09770118a7eb1ccaf4a594a221334119a44a814fcb0d31c5b85e83e97227a97" +dependencies = [ + "memchr", +] + +[[package]] +name = "x11-dl" +version = "2.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" +dependencies = [ + "libc", + "once_cell", + "pkg-config", +] + +[[package]] +name = "x11rb" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "592b4883219f345e712b3209c62654ebda0bb50887f330cbd018d0f654bfd507" +dependencies = [ + "gethostname", + "nix 0.24.3", + "winapi", + "winapi-wsapoll", + "x11rb-protocol", +] + +[[package]] +name = "x11rb-protocol" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56b245751c0ac9db0e006dc812031482784e434630205a93c73cfefcaabeac67" +dependencies = [ + "nix 0.24.3", +] + +[[package]] +name = "xcursor" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "463705a63313cd4301184381c5e8042f0a7e9b4bb63653f216311d4ae74690b7" +dependencies = [ + "nom", +] + +[[package]] +name = "xdg-home" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2769203cd13a0c6015d515be729c526d041e9cf2c0cc478d57faee85f40c6dcd" +dependencies = [ + "nix 0.26.2", + "winapi", +] + +[[package]] +name = "xml-rs" +version = "0.8.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47430998a7b5d499ccee752b41567bc3afc57e1327dc855b1a2aa44ce29b5fa1" + [[package]] name = "xtask" version = "0.1.0" @@ -1690,3 +3897,107 @@ dependencies = [ "colored", "eyre", ] + +[[package]] +name = "zbus" +version = "3.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31de390a2d872e4cd04edd71b425e29853f786dc99317ed72d73d6fcf5ebb948" +dependencies = [ + "async-broadcast", + "async-executor", + "async-fs", + "async-io", + "async-lock", + "async-process", + "async-recursion", + "async-task", + "async-trait", + "blocking", + "byteorder", + "derivative", + "enumflags2", + "event-listener", + "futures-core", + "futures-sink", + "futures-util", + "hex", + "nix 0.26.2", + "once_cell", + "ordered-stream", + "rand 0.8.5", + "serde", + "serde_repr", + "sha1", + "static_assertions", + "tracing", + "uds_windows", + "winapi", + "xdg-home", + "zbus_macros", + "zbus_names", + "zvariant", +] + +[[package]] +name = "zbus_macros" +version = "3.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d1794a946878c0e807f55a397187c11fc7a038ba5d868e7db4f3bd7760bc9d" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "regex", + "syn 1.0.109", + "zvariant_utils", +] + +[[package]] +name = "zbus_names" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb80bb776dbda6e23d705cf0123c3b95df99c4ebeaec6c2599d4a5419902b4a9" +dependencies = [ + "serde", + "static_assertions", + "zvariant", +] + +[[package]] +name = "zvariant" +version = "3.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44b291bee0d960c53170780af148dca5fa260a63cdd24f1962fa82e03e53338c" +dependencies = [ + "byteorder", + "enumflags2", + "libc", + "serde", + "static_assertions", + "zvariant_derive", +] + +[[package]] +name = "zvariant_derive" +version = "3.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "934d7a7dfc310d6ee06c87ffe88ef4eca7d3e37bb251dece2ef93da8f17d8ecd" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", + "zvariant_utils", +] + +[[package]] +name = "zvariant_utils" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7234f0d811589db492d16893e3f21e8e2fd282e6d01b0cddee310322062cc200" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] diff --git a/Cargo.toml b/Cargo.toml index 7981f78..4d89676 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,6 +6,8 @@ members = [ "crates/cansat-test-utils", "crates/cansat-lora", "tools/lora-cli", + "tools/flight-visualizer", + "tools/dummy-lora-receiver", "xtask" ] resolver = "2" \ No newline at end of file diff --git a/tools/dummy-lora-receiver/Cargo.toml b/tools/dummy-lora-receiver/Cargo.toml new file mode 100644 index 0000000..6f84dc7 --- /dev/null +++ b/tools/dummy-lora-receiver/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "dummy-lora-receiver" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +noise = "0.8.2" diff --git a/tools/dummy-lora-receiver/README.md b/tools/dummy-lora-receiver/README.md new file mode 100644 index 0000000..4d71a9f --- /dev/null +++ b/tools/dummy-lora-receiver/README.md @@ -0,0 +1,16 @@ +# Dummy Lora Receiver +Tool to generate dummy LoRa parsed data output. + +> It is just _lora-cli_ but without Lora! + +# Run +```shell +cargo run +``` + +# Build +```shell +cargo build +# or +cargo build --release +``` \ No newline at end of file diff --git a/tools/dummy-lora-receiver/src/main.rs b/tools/dummy-lora-receiver/src/main.rs new file mode 100644 index 0000000..06e2980 --- /dev/null +++ b/tools/dummy-lora-receiver/src/main.rs @@ -0,0 +1,74 @@ +use noise::{NoiseFn, Perlin}; + +const TEMPERATURE_SEED: f64 = 10000.0; +const PRESSURE_SEED: f64 = 1993.0; +const HEIGHT_SEED: f64 = 42357.0; +const DELAY: u64 = 1000; + +const TEMPERATURE_MIN: f64 = 27.0; +const TEMPERATURE_MAX: f64 = 28.0; + +const PRESSURE_MIN: f64 = 9900.0; +const PRESSURE_MAX: f64 = 10000.0; + +const HEIGHT_MIN_INC: f64 = 0.5; +const HEIGHT_MAX_INC: f64 = 2.0; + +fn main() { + let perlin = Perlin::new(now() as u32); + let mut height: f64 = 150.0; + + loop { + let time = now(); + let temperature = get_val( + &perlin, + time, + 0.0001, + TEMPERATURE_SEED, + TEMPERATURE_MIN, + TEMPERATURE_MAX, + ); + let pressure = get_val( + &perlin, + time, + 0.000001, + PRESSURE_SEED, + PRESSURE_MIN, + PRESSURE_MAX, + ); + let height_inc = get_val( + &perlin, + time, + 0.01, + HEIGHT_SEED, + HEIGHT_MIN_INC, + HEIGHT_MAX_INC, + ); + + height += height_inc; + println!(">|{}|{}|{}|dummy", temperature, pressure, height); + + std::thread::sleep(std::time::Duration::from_millis(DELAY)); + } +} + +fn get_val(perlin: &Perlin, time: u64, time_scale: f64, seed: f64, min: f64, max: f64) -> f64 { + let val = perlin.get([scale(time as f64, time_scale), seed]); + + map(val, -1.0, 1.0, min, max) +} + +fn map(value: f64, from_min: f64, from_max: f64, to_min: f64, to_max: f64) -> f64 { + (value - from_min) * (to_max - to_min) / (from_max - from_min) + to_min +} + +fn scale(value: f64, scale: f64) -> f64 { + value * scale +} + +fn now() -> u64 { + std::time::SystemTime::now() + .duration_since(std::time::UNIX_EPOCH) + .unwrap() + .as_millis() as u64 +} diff --git a/tools/flight-visualizer/Cargo.toml b/tools/flight-visualizer/Cargo.toml new file mode 100644 index 0000000..c9543e7 --- /dev/null +++ b/tools/flight-visualizer/Cargo.toml @@ -0,0 +1,11 @@ +[package] +name = "flight-visualizer" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +eframe = "0.22.0" +egui = "0.22.0" +glow = "0.12.3" diff --git a/tools/flight-visualizer/README.md b/tools/flight-visualizer/README.md new file mode 100644 index 0000000..c431eb8 --- /dev/null +++ b/tools/flight-visualizer/README.md @@ -0,0 +1,71 @@ +# Flight Visualizer +This is a tool to visualize the flight data from the flight controller. + +# Usage + +Flight visualizer uses stdin as input. It expects the data to be as csv with `|` as separator. It +reads only lines that start with `>|` and ignores all other lines. Value order: +1. temperature +2. pressure +3. height +4. nmea + +For example: +``` +>|28.2|10123|150|$GPGGA,,,,,,0,00,99.99,,,,,,*48',-0.25439453,0.88671875,0.34960938,-0.011324655,-0.00039969373,0.003996937,1.1204091,0.2633056 +>|28.5|10032|170|$GPGGA,,,,,,0,00,99.99,,,,,,*48',-0.25439453,0.88671875,0.34960938,-0.011324655,-0.00039969373,0.003996937,1.1204091,0.2633056 +>|27.3|10100|201|$GPGGA,,,,,,0,00,99.99,,,,,,*48',-0.25439453,0.88671875,0.34960938,-0.011324655,-0.00039969373,0.003996937,1.1204091,0.2633056 +``` +1. First dataset + 1. temperature: 28.2 + 2. pressure: 10123 + 3. height: 150 +2. Second dataset + 1. temperature: 28.5 + 2. pressure: 10032 + 3. height: 170 +3. Third dataset + 1. temperature: 27.3 + 2. pressure: 10100 + 3. height: 201 + + +# Run +Just run and provide valid format on stdin + +## With working lora transmitter +Build [lora-cli](../lora-cli) (see [README.md](../lora-cli/README.md)) and run: +```bash +## chose one that fits your needs + +# lora-cli in release mode +../../target/release/lora-cli | cargo run + +# or lora-cli in debug mode +../../target/release/lora-cli | cargo run +``` + +## Without working lora (generated data) +Build [dummy-lora](../dummy-lora-receiver) (see [README.md](../dummy-lora-receiver/README.md)) and run: +```bash +## chose one that fits your needs + +# dummy-lora-receiver in release mode +../../target/release/dummy-lora-receiver | cargo run + +# or dummy-lora-receiver in debug mode +../../target/release/dummy-lora-receiver | cargo run +``` + +# Code +Structure: +- [app.rs](src/app.rs) - window and stdin processing +- [ui.rs](src/ui.rs) - drawing ui +- [data.rs](src/data.rs) - data structures + +``` +stdin --string--> crate::app --create::data::Data--> crate::ui --> egui + ^ + eframe ---' +``` + diff --git a/tools/flight-visualizer/src/app.rs b/tools/flight-visualizer/src/app.rs new file mode 100644 index 0000000..8b3596a --- /dev/null +++ b/tools/flight-visualizer/src/app.rs @@ -0,0 +1,88 @@ +use crate::data::Data; +use crate::ui; +use eframe::Frame; +use egui::Context; +use std::sync::{Arc, Mutex}; +use std::time::Duration; + +pub struct FlightVisualizerApp { + data: Arc>, + input_processing_thread: Option>, +} + +impl Default for FlightVisualizerApp { + fn default() -> Self { + Self { + data: Arc::new(Mutex::new(Data::empty())), + input_processing_thread: None, + } + } +} + +impl FlightVisualizerApp { + pub fn new(_cc: &eframe::CreationContext<'_>) -> Self { + let mut slf: Self = Default::default(); + slf.spawn_input_consumer(); + + slf + } + + fn spawn_input_consumer(&mut self) { + let data = Arc::clone(&self.data); + let thread = std::thread::spawn(move || Self::consume_input(data)); + self.input_processing_thread = Some(thread); + } + + fn consume_input(data_arc: Arc>) { + for line in std::io::stdin().lines() { + match line { + Err(_) => break, + Ok(line) => Self::process_input_line(&data_arc, line), + } + } + } + + fn process_input_line(data_arc: &Arc>, line: String) { + if !line.starts_with(">|") { + println!("[STDIN][ IGNORED ]### {}", line); + return; + } + println!("[STDIN][PROCESSED]### {}", line); + + let line_split: Vec<&str> = line.split('|').collect(); + if line_split.len() < 3 { + println!("wrong data: {}", line); + return; + } + let temp: f64 = line_split[1].parse().unwrap(); + let pressure: f64 = line_split[2].parse().unwrap(); + let height: f64 = line_split[3].parse().unwrap(); + + let time = std::time::SystemTime::now() + .duration_since(std::time::UNIX_EPOCH) + .unwrap() + .as_secs_f64(); + + let mut data = data_arc.lock().unwrap(); + data.time = time; + data.bme.temperature.push([time, temp]); + data.bme.pressure.push([time, pressure]); + data.bme.height.push([time, height]); + } +} +impl eframe::App for FlightVisualizerApp { + fn update(&mut self, ctx: &Context, _frame: &mut Frame) { + ui::draw_ui(ctx, &self.data.lock().unwrap()); + ctx.request_repaint_after(Duration::from_millis(33)) + } +} + +// impl std::ops::Drop for FlightVisualizerApp { +// fn drop(&mut self) { +// if let Some(thread) = self.input_processing_thread.take() { +// // somehow break stdin().lines() loop +// println!("If program does not stop, please press Ctrl+D to exit"); +// thread.join().unwrap(); +// } +// } +// } diff --git a/tools/flight-visualizer/src/data.rs b/tools/flight-visualizer/src/data.rs new file mode 100644 index 0000000..fe8967e --- /dev/null +++ b/tools/flight-visualizer/src/data.rs @@ -0,0 +1,231 @@ +const MAX_DATA_POINTS: usize = 10; + +pub struct Data { + pub time: f64, + pub bme: BmeData, + pub orientation: Option, + pub acceleration: Option, + pub signal_strength: Option, +} + +pub struct BmeData { + pub temperature: OffsetVec<[f64; 2]>, + pub pressure: OffsetVec<[f64; 2]>, + pub height: OffsetVec<[f64; 2]>, +} + +pub struct SignalStrength { + pub rssi: i32, + pub snr: i32, +} + +pub struct Orientation { + pub x: f32, + pub y: f32, + pub z: f32, +} + +pub struct Acceleration { + pub x: f32, + pub y: f32, + pub z: f32, +} + +impl Data { + pub fn empty() -> Self { + Self { + time: 0f64, + bme: BmeData::empty(), + orientation: None, + acceleration: None, + signal_strength: None, + } + } +} + +impl BmeData { + pub fn empty() -> Self { + Self { + temperature: OffsetVec::new(MAX_DATA_POINTS), + pressure: OffsetVec::new(MAX_DATA_POINTS), + height: OffsetVec::new(MAX_DATA_POINTS), + } + } +} + +pub struct OffsetVec { + vec: Vec, + offset: usize, + max_size: usize, + elem_count: usize, +} + +impl OffsetVec +where + T: Clone + Copy, +{ + pub fn new(max_size: usize) -> Self { + OffsetVec { + vec: Vec::with_capacity(max_size), + offset: 0, + elem_count: 0, + max_size, + } + } + + pub fn push(&mut self, elem: T) { + if self.elem_count < self.max_size { + self.elem_count += 1; + self.vec.push(elem); + } else { + self.vec[self.offset] = elem; + } + self.offset = (self.offset + 1) % self.max_size; + } + + pub fn get(&self, index: usize) -> Option<&T> { + if index >= self.elem_count { + return None; + } + if self.elem_count < self.max_size { + return Some(&self.vec[index]); + } + let index = (self.offset + index) % self.max_size; + + Some(&self.vec[index]) + } + + pub fn to_vec(&self) -> Vec { + //TODO optimize + let mut vec: Vec = Vec::with_capacity(self.elem_count); + for i in 0..self.elem_count { + vec.push(*self.get(i).unwrap()); + } + + vec + } + + pub fn get_elem_count(&self) -> usize { + self.elem_count + } + + pub fn get_max_size(&self) -> usize { + self.max_size + } +} + +pub struct OffsetVecIter<'a, T> +where + T: Clone + Copy, +{ + vec: &'a OffsetVec, + elem_count: usize, + index: usize, +} + +impl<'a, T> IntoIterator for &'a OffsetVec +where + T: Clone + Copy, +{ + type Item = &'a T; + type IntoIter = OffsetVecIter<'a, T>; + + fn into_iter(self) -> Self::IntoIter { + OffsetVecIter { + vec: self, + elem_count: self.get_elem_count(), + index: 0, + } + } +} + +impl<'a, T> Iterator for OffsetVecIter<'a, T> +where + T: Clone + Copy, +{ + type Item = &'a T; + + fn next(&mut self) -> Option { + if self.index >= self.elem_count { + return None; + } + let val = self.vec.get(self.index); + self.index += 1; + + val + } +} + +#[cfg(test)] +mod test { + use super::*; + + #[test] + fn test_offset_vec() { + let mut vec = OffsetVec::new(3); + assert_eq!(vec.get_max_size(), 3); + + assert_eq!(vec.get_elem_count(), 0); + + vec.push(1); + vec.push(2); + vec.push(3); + assert_eq!(vec.get_elem_count(), 3); + assert_eq!(vec.get(0), Some(&1)); + assert_eq!(vec.get(1), Some(&2)); + assert_eq!(vec.get(2), Some(&3)); + + vec.push(4); + assert_eq!(vec.get_elem_count(), 3); + assert_eq!(vec.get(0), Some(&2)); + assert_eq!(vec.get(1), Some(&3)); + assert_eq!(vec.get(2), Some(&4)); + + vec.push(5); + assert_eq!(vec.get_elem_count(), 3); + assert_eq!(vec.get(0), Some(&3)); + assert_eq!(vec.get(1), Some(&4)); + assert_eq!(vec.get(2), Some(&5)); + } + + #[test] + fn test_offset_vec_iterator() { + let mut vec = OffsetVec::new(3); + + vec.push(1); + vec.push(2); + vec.push(3); + let mut iter = vec.into_iter(); + assert_eq!(iter.next(), Some(&1)); + assert_eq!(iter.next(), Some(&2)); + assert_eq!(iter.next(), Some(&3)); + assert_eq!(iter.next(), None); + + vec.push(4); + vec.push(5); + let mut iter = vec.into_iter(); + assert_eq!(iter.next(), Some(&3)); + assert_eq!(iter.next(), Some(&4)); + assert_eq!(iter.next(), Some(&5)); + assert_eq!(iter.next(), None); + } + + #[test] + fn test_offset_vec_to_vec() { + let mut vec = OffsetVec::new(3); + assert_eq!(vec.to_vec(), vec![]); + + vec.push(1); + assert_eq!(vec.to_vec(), vec![1]); + + vec.push(2); + assert_eq!(vec.to_vec(), vec![1, 2]); + + vec.push(3); + assert_eq!(vec.to_vec(), vec![1, 2, 3]); + + vec.push(4); + vec.push(5); + assert_eq!(vec.to_vec(), vec![3, 4, 5]); + } +} diff --git a/tools/flight-visualizer/src/lib.rs b/tools/flight-visualizer/src/lib.rs new file mode 100644 index 0000000..58dcd92 --- /dev/null +++ b/tools/flight-visualizer/src/lib.rs @@ -0,0 +1,3 @@ +pub mod app; +pub mod data; +pub mod ui; diff --git a/tools/flight-visualizer/src/main.rs b/tools/flight-visualizer/src/main.rs new file mode 100644 index 0000000..546bdc0 --- /dev/null +++ b/tools/flight-visualizer/src/main.rs @@ -0,0 +1,10 @@ +use flight_visualizer::app::FlightVisualizerApp; + +fn main() -> eframe::Result<()> { + let options = eframe::NativeOptions::default(); + eframe::run_native( + "Flight Visualizer", + options, + Box::new(|cc| Box::new(FlightVisualizerApp::new(cc))), + ) +} diff --git a/tools/flight-visualizer/src/ui.rs b/tools/flight-visualizer/src/ui.rs new file mode 100644 index 0000000..d9d7727 --- /dev/null +++ b/tools/flight-visualizer/src/ui.rs @@ -0,0 +1,97 @@ +use crate::data; +use eframe::egui; +use eframe::egui::Context; +use eframe::emath::Align; +use egui::plot::{Line, Plot, PlotPoints}; +use egui::{Layout, Ui}; + +pub fn draw_ui(ctx: &Context, data: &data::Data) { + egui::CentralPanel::default().show(ctx, |ui| { + ui.heading("Flight Visualizer"); + ui.separator(); + ui.heading("Data"); + ui.horizontal(|ui| { + ui.label("Time:"); + ui.label(format!("{}", data.time)); + }); + ui.separator(); + draw_ui_bme(ui, data); + + ui.heading("Controls"); + ui.separator(); + ui.heading("Settings"); + }); +} + +fn draw_ui_bme(ui: &mut Ui, data: &data::Data) { + ui.heading("BME"); + ui.separator(); + let component_width = ui.available_width() / 3.2; + ui.with_layout(Layout::left_to_right(Align::TOP), |ui| { + draw_ui_f64_graph( + ui, + "Temperature", + data.bme.temperature.to_vec(), + UiF64GraphSettings { + component_width, + max_y: 27.0, + min_y: 29.0, + }, + ); + ui.separator(); + draw_ui_f64_graph( + ui, + "Pressure", + data.bme.pressure.to_vec(), + UiF64GraphSettings { + component_width, + max_y: 9900.0, + min_y: 10000.0, + }, + ); + ui.separator(); + draw_ui_f64_graph( + ui, + "Height", + data.bme.height.to_vec(), + UiF64GraphSettings { + component_width, + max_y: f64::NAN, + min_y: f64::NAN, + }, + ); + }); +} + +fn draw_ui_f64_graph( + ui: &mut Ui, + name: &str, + value: Vec<[f64; 2]>, + graph_settings: UiF64GraphSettings, +) { + ui.vertical(|ui| { + ui.horizontal(|ui| { + ui.label(name); + let last_value = value.last().map(|v| v[1]).unwrap_or(f64::NAN); + ui.label(format!("{}", last_value)); + }); + + let mut plot = Plot::new(name).width(graph_settings.component_width); + + if !graph_settings.max_y.is_nan() && !graph_settings.min_y.is_nan() { + plot = plot + .include_y(graph_settings.min_y) + .include_y(graph_settings.max_y); + } + + plot.show(ui, |plot_ui| { + plot_ui.line(Line::new(PlotPoints::from(value)).name(name)) + }); + }); +} + +struct UiF64GraphSettings { + component_width: f32, + max_y: f64, + min_y: f64, +} From e7d58f212af4b3487548c64740cea0b8bdf6fb99 Mon Sep 17 00:00:00 2001 From: Patryk Paluch Date: Sun, 27 Aug 2023 03:39:12 +0200 Subject: [PATCH 2/9] feat(flight-visualizer): better ui --- Cargo.lock | 157 +++++++++++-- tools/flight-visualizer/Cargo.toml | 4 + tools/flight-visualizer/src/app.rs | 25 ++- tools/flight-visualizer/src/data.rs | 239 ++++---------------- tools/flight-visualizer/src/main.rs | 7 +- tools/flight-visualizer/src/ui.rs | 329 +++++++++++++++++++++++----- 6 files changed, 479 insertions(+), 282 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 68178b0..c6e46ef 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -387,7 +387,7 @@ checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.29", ] [[package]] @@ -404,7 +404,7 @@ checksum = "7b2d0f03b3640e3a630367e40c468cb7f309529c708ed1d88597047b0e7c6ef7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.29", ] [[package]] @@ -610,7 +610,7 @@ checksum = "fdde5c9cd29ebd706ce1b35600920a33550e402fc998a2e53ad3b42c3c47a192" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.29", ] [[package]] @@ -791,7 +791,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.29", ] [[package]] @@ -1077,6 +1077,12 @@ dependencies = [ "defmt", ] +[[package]] +name = "deranged" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" + [[package]] name = "derivative" version = "2.2.0" @@ -1088,6 +1094,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive-new" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3418329ca0ad70234b9735dc4ceed10af4df60eff9c8e7b06cb5e520d92c3535" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "derive_more" version = "0.99.17" @@ -1291,7 +1308,7 @@ checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.29", ] [[package]] @@ -1396,9 +1413,13 @@ dependencies = [ name = "flight-visualizer" version = "0.1.0" dependencies = [ + "derive-new", "eframe", "egui", "glow", + "nalgebra 0.32.3", + "once_cell", + "time", ] [[package]] @@ -2009,6 +2030,16 @@ dependencies = [ "libc", ] +[[package]] +name = "matrixmultiply" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "090126dc04f95dc0d1c1c91f61bdd474b3930ca064c1edc8a849da2c6cbe1e77" +dependencies = [ + "autocfg", + "rawpointer", +] + [[package]] name = "memchr" version = "2.5.0" @@ -2096,7 +2127,7 @@ checksum = "abd67852b244bcca82aa14dd89d50795c065fa598e435c0fe2724663f6e3b9f2" dependencies = [ "embedded-hal 0.2.7", "libm", - "nalgebra", + "nalgebra 0.31.4", ] [[package]] @@ -2109,10 +2140,37 @@ dependencies = [ "num-complex", "num-rational", "num-traits", - "simba", + "simba 0.7.3", "typenum", ] +[[package]] +name = "nalgebra" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "307ed9b18cc2423f29e83f84fd23a8e73628727990181f18641a8b5dc2ab1caa" +dependencies = [ + "approx", + "matrixmultiply", + "nalgebra-macros", + "num-complex", + "num-rational", + "num-traits", + "simba 0.8.1", + "typenum", +] + +[[package]] +name = "nalgebra-macros" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91761aed67d03ad966ef783ae962ef9bbaca728d2dd7ceb7939ec110fffad998" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "nb" version = "0.1.3" @@ -2303,7 +2361,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.29", ] [[package]] @@ -2559,9 +2617,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.59" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aeca18b86b413c660b781aa319e4e2648a3e6f9eadc9b47e9038e6fe9f3451b" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] @@ -2661,6 +2719,12 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" +[[package]] +name = "rawpointer" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" + [[package]] name = "redox_syscall" version = "0.3.5" @@ -2797,6 +2861,15 @@ version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +[[package]] +name = "safe_arch" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f398075ce1e6a179b46f51bd88d0598b92b00d3551f1a2d4ac49e771b56ac354" +dependencies = [ + "bytemuck", +] + [[package]] name = "same-file" version = "1.0.6" @@ -2854,9 +2927,9 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.163" +version = "1.0.186" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" +checksum = "9f5db24220c009de9bd45e69fb2938f4b6d2df856aa9304ce377b3180f83b7c1" dependencies = [ "serde_derive", ] @@ -2876,13 +2949,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.163" +version = "1.0.186" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" +checksum = "5ad697f7e0b65af4983a4ce8f56ed5b357e8d3c36651bf6a7e13639c17b8e670" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.29", ] [[package]] @@ -2893,7 +2966,7 @@ checksum = "6f0a21fba416426ac927b1691996e82079f8b6156e920c85345f135b2e9ba2de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.29", ] [[package]] @@ -2969,6 +3042,19 @@ dependencies = [ "paste", ] +[[package]] +name = "simba" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "061507c94fc6ab4ba1c9a0305018408e312e17c041eb63bef8aa726fa33aceae" +dependencies = [ + "approx", + "num-complex", + "num-traits", + "paste", + "wide", +] + [[package]] name = "simd-adler32" version = "0.3.7" @@ -3126,9 +3212,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.18" +version = "2.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e" +checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a" dependencies = [ "proc-macro2", "quote", @@ -3166,16 +3252,20 @@ checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.29", ] [[package]] name = "time" -version = "0.3.22" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea9e1b3cf1243ae005d9e74085d4d542f3125458f3a81af210d901dcd7411efd" +checksum = "0bb39ee79a6d8de55f48f2293a830e040392f1c5f16e336bdd1788cd0aadce07" dependencies = [ + "deranged", + "itoa", + "serde", "time-core", + "time-macros", ] [[package]] @@ -3184,6 +3274,15 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" +[[package]] +name = "time-macros" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "733d258752e9303d392b94b75230d07b0b9c489350c69b851fc6c065fde3e8f9" +dependencies = [ + "time-core", +] + [[package]] name = "tiny-skia" version = "0.8.4" @@ -3270,7 +3369,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.29", ] [[package]] @@ -3424,7 +3523,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.29", "wasm-bindgen-shared", ] @@ -3458,7 +3557,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.29", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3581,6 +3680,16 @@ dependencies = [ "web-sys", ] +[[package]] +name = "wide" +version = "0.7.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa469ffa65ef7e0ba0f164183697b89b854253fd31aeb92358b7b6155177d62f" +dependencies = [ + "bytemuck", + "safe_arch", +] + [[package]] name = "winapi" version = "0.3.9" diff --git a/tools/flight-visualizer/Cargo.toml b/tools/flight-visualizer/Cargo.toml index c9543e7..9c408cb 100644 --- a/tools/flight-visualizer/Cargo.toml +++ b/tools/flight-visualizer/Cargo.toml @@ -9,3 +9,7 @@ edition = "2021" eframe = "0.22.0" egui = "0.22.0" glow = "0.12.3" +time = { version = "0.3.27", features = ["formatting"] } +once_cell = "1.17.1" +derive-new = "0.5.9" +nalgebra = "0.32.3" diff --git a/tools/flight-visualizer/src/app.rs b/tools/flight-visualizer/src/app.rs index 8b3596a..7ceebbf 100644 --- a/tools/flight-visualizer/src/app.rs +++ b/tools/flight-visualizer/src/app.rs @@ -1,4 +1,4 @@ -use crate::data::Data; +use crate::data::{Acceleration, BmeData, Data, DataRecord, Orientation}; use crate::ui; use eframe::Frame; use egui::Context; @@ -7,14 +7,12 @@ use std::time::Duration; pub struct FlightVisualizerApp { data: Arc>, - input_processing_thread: Option>, } impl Default for FlightVisualizerApp { fn default() -> Self { Self { - data: Arc::new(Mutex::new(Data::empty())), - input_processing_thread: None, + data: Arc::new(Mutex::new(Data::new())), } } } @@ -29,8 +27,7 @@ impl FlightVisualizerApp { fn spawn_input_consumer(&mut self) { let data = Arc::clone(&self.data); - let thread = std::thread::spawn(move || Self::consume_input(data)); - self.input_processing_thread = Some(thread); + std::thread::spawn(move || Self::consume_input(data)); } fn consume_input(data_arc: Arc>) { @@ -64,16 +61,22 @@ impl FlightVisualizerApp { .as_secs_f64(); let mut data = data_arc.lock().unwrap(); - data.time = time; - data.bme.temperature.push([time, temp]); - data.bme.pressure.push([time, pressure]); - data.bme.height.push([time, height]); + data.push(DataRecord::new( + time, + BmeData::new(temp, pressure, height), + Orientation::new( + f64::sin(time / 8.0), + f64::sin(time / 15.0), + f64::sin(time / 2.0), + ), + Acceleration::new(0.0, 0.0, 0.0), + )); } } impl eframe::App for FlightVisualizerApp { fn update(&mut self, ctx: &Context, _frame: &mut Frame) { ui::draw_ui(ctx, &self.data.lock().unwrap()); - ctx.request_repaint_after(Duration::from_millis(33)) + ctx.request_repaint_after(Duration::from_millis(33)); } } diff --git a/tools/flight-visualizer/src/data.rs b/tools/flight-visualizer/src/data.rs index fe8967e..b6cc81e 100644 --- a/tools/flight-visualizer/src/data.rs +++ b/tools/flight-visualizer/src/data.rs @@ -1,231 +1,86 @@ +use derive_new::new; +use std::collections::VecDeque; + const MAX_DATA_POINTS: usize = 10; pub struct Data { - pub time: f64, - pub bme: BmeData, - pub orientation: Option, - pub acceleration: Option, - pub signal_strength: Option, + data_records: VecDeque, + signal_strength: SignalStrength, } -pub struct BmeData { - pub temperature: OffsetVec<[f64; 2]>, - pub pressure: OffsetVec<[f64; 2]>, - pub height: OffsetVec<[f64; 2]>, +#[derive(new)] +pub struct DataRecord { + pub time: f64, + pub bme: BmeData, + pub orientation: Orientation, + pub acceleration: Acceleration, } +#[derive(new, Debug)] pub struct SignalStrength { pub rssi: i32, pub snr: i32, } +#[derive(new, Debug)] +pub struct BmeData { + pub temperature: f64, + pub pressure: f64, + pub height: f64, +} + +#[derive(new, Debug)] pub struct Orientation { - pub x: f32, - pub y: f32, - pub z: f32, + pub x: f64, + pub y: f64, + pub z: f64, } +#[derive(new, Debug)] pub struct Acceleration { - pub x: f32, - pub y: f32, - pub z: f32, + pub x: f64, + pub y: f64, + pub z: f64, } impl Data { - pub fn empty() -> Self { - Self { - time: 0f64, - bme: BmeData::empty(), - orientation: None, - acceleration: None, - signal_strength: None, - } - } -} - -impl BmeData { - pub fn empty() -> Self { + pub fn new() -> Self { Self { - temperature: OffsetVec::new(MAX_DATA_POINTS), - pressure: OffsetVec::new(MAX_DATA_POINTS), - height: OffsetVec::new(MAX_DATA_POINTS), + data_records: VecDeque::new(), + signal_strength: SignalStrength::new(0, 0), } } -} - -pub struct OffsetVec { - vec: Vec, - offset: usize, - max_size: usize, - elem_count: usize, -} -impl OffsetVec -where - T: Clone + Copy, -{ - pub fn new(max_size: usize) -> Self { - OffsetVec { - vec: Vec::with_capacity(max_size), - offset: 0, - elem_count: 0, - max_size, + pub fn push(&mut self, data_record: DataRecord) { + self.data_records.push_back(data_record); + if self.data_records.len() > MAX_DATA_POINTS { + self.data_records.pop_front(); } } - pub fn push(&mut self, elem: T) { - if self.elem_count < self.max_size { - self.elem_count += 1; - self.vec.push(elem); - } else { - self.vec[self.offset] = elem; - } - self.offset = (self.offset + 1) % self.max_size; + pub fn get_last_data(&self) -> Option<&DataRecord> { + self.data_records.back() } - pub fn get(&self, index: usize) -> Option<&T> { - if index >= self.elem_count { - return None; - } - if self.elem_count < self.max_size { - return Some(&self.vec[index]); - } - let index = (self.offset + index) % self.max_size; - - Some(&self.vec[index]) + pub fn get_nth_element(&self, n: usize) -> Option<&DataRecord> { + self.data_records.get(n) } - pub fn to_vec(&self) -> Vec { - //TODO optimize - let mut vec: Vec = Vec::with_capacity(self.elem_count); - for i in 0..self.elem_count { - vec.push(*self.get(i).unwrap()); - } - - vec + pub fn get_data_iter(&self) -> impl Iterator { + self.data_records.iter() } - pub fn get_elem_count(&self) -> usize { - self.elem_count + pub fn set_signal_strength(&mut self, signal_strength: SignalStrength) { + self.signal_strength = signal_strength; } - pub fn get_max_size(&self) -> usize { - self.max_size + pub fn get_signal_strength(&self) -> &SignalStrength { + &self.signal_strength } } -pub struct OffsetVecIter<'a, T> -where - T: Clone + Copy, -{ - vec: &'a OffsetVec, - elem_count: usize, - index: usize, -} - -impl<'a, T> IntoIterator for &'a OffsetVec -where - T: Clone + Copy, -{ - type Item = &'a T; - type IntoIter = OffsetVecIter<'a, T>; - - fn into_iter(self) -> Self::IntoIter { - OffsetVecIter { - vec: self, - elem_count: self.get_elem_count(), - index: 0, - } - } -} - -impl<'a, T> Iterator for OffsetVecIter<'a, T> -where - T: Clone + Copy, -{ - type Item = &'a T; - - fn next(&mut self) -> Option { - if self.index >= self.elem_count { - return None; - } - let val = self.vec.get(self.index); - self.index += 1; - - val - } -} - -#[cfg(test)] -mod test { - use super::*; - - #[test] - fn test_offset_vec() { - let mut vec = OffsetVec::new(3); - assert_eq!(vec.get_max_size(), 3); - - assert_eq!(vec.get_elem_count(), 0); - - vec.push(1); - vec.push(2); - vec.push(3); - assert_eq!(vec.get_elem_count(), 3); - assert_eq!(vec.get(0), Some(&1)); - assert_eq!(vec.get(1), Some(&2)); - assert_eq!(vec.get(2), Some(&3)); - - vec.push(4); - assert_eq!(vec.get_elem_count(), 3); - assert_eq!(vec.get(0), Some(&2)); - assert_eq!(vec.get(1), Some(&3)); - assert_eq!(vec.get(2), Some(&4)); - - vec.push(5); - assert_eq!(vec.get_elem_count(), 3); - assert_eq!(vec.get(0), Some(&3)); - assert_eq!(vec.get(1), Some(&4)); - assert_eq!(vec.get(2), Some(&5)); - } - - #[test] - fn test_offset_vec_iterator() { - let mut vec = OffsetVec::new(3); - - vec.push(1); - vec.push(2); - vec.push(3); - let mut iter = vec.into_iter(); - assert_eq!(iter.next(), Some(&1)); - assert_eq!(iter.next(), Some(&2)); - assert_eq!(iter.next(), Some(&3)); - assert_eq!(iter.next(), None); - - vec.push(4); - vec.push(5); - let mut iter = vec.into_iter(); - assert_eq!(iter.next(), Some(&3)); - assert_eq!(iter.next(), Some(&4)); - assert_eq!(iter.next(), Some(&5)); - assert_eq!(iter.next(), None); - } - - #[test] - fn test_offset_vec_to_vec() { - let mut vec = OffsetVec::new(3); - assert_eq!(vec.to_vec(), vec![]); - - vec.push(1); - assert_eq!(vec.to_vec(), vec![1]); - - vec.push(2); - assert_eq!(vec.to_vec(), vec![1, 2]); - - vec.push(3); - assert_eq!(vec.to_vec(), vec![1, 2, 3]); - - vec.push(4); - vec.push(5); - assert_eq!(vec.to_vec(), vec![3, 4, 5]); +impl Default for Data { + fn default() -> Self { + Self::new() } } diff --git a/tools/flight-visualizer/src/main.rs b/tools/flight-visualizer/src/main.rs index 546bdc0..3e2bcf8 100644 --- a/tools/flight-visualizer/src/main.rs +++ b/tools/flight-visualizer/src/main.rs @@ -1,7 +1,12 @@ use flight_visualizer::app::FlightVisualizerApp; fn main() -> eframe::Result<()> { - let options = eframe::NativeOptions::default(); + let options = eframe::NativeOptions { + maximized: false, + initial_window_size: Some(egui::Vec2::new(1600.0, 900.0)), + ..eframe::NativeOptions::default() + }; + eframe::run_native( "Flight Visualizer", options, diff --git a/tools/flight-visualizer/src/ui.rs b/tools/flight-visualizer/src/ui.rs index d9d7727..19f5611 100644 --- a/tools/flight-visualizer/src/ui.rs +++ b/tools/flight-visualizer/src/ui.rs @@ -1,82 +1,255 @@ -use crate::data; +use crate::data::{Data, DataRecord}; use eframe::egui; use eframe::egui::Context; -use eframe::emath::Align; use egui::plot::{Line, Plot, PlotPoints}; -use egui::{Layout, Ui}; +use egui::{Color32, Pos2, Stroke, Ui, Vec2}; +use nalgebra::{Matrix3, Vector2, Vector3}; +use once_cell::sync::Lazy; +use time::format_description::FormatItem; +use time::OffsetDateTime; -pub fn draw_ui(ctx: &Context, data: &data::Data) { +type DataRecordFieldGetter = fn(&DataRecord) -> f64; + +pub fn draw_ui(ctx: &Context, data: &Data) { + // ctx.set_debug_on_hover(true); egui::CentralPanel::default().show(ctx, |ui| { - ui.heading("Flight Visualizer"); - ui.separator(); - ui.heading("Data"); + let available_height = ui.available_height(); ui.horizontal(|ui| { - ui.label("Time:"); - ui.label(format!("{}", data.time)); + ui.set_height(available_height); // why? + ui_left_panel(ui, data); + ui.separator(); + ui_right_panel(ui, data); }); - ui.separator(); - draw_ui_bme(ui, data); + }); +} + +fn ui_left_panel(ui: &mut Ui, data: &Data) { + let available_width = ui.available_width(); + ui.vertical(|ui| { + ui.set_width(available_width * 0.33); + ui.heading("Position Change"); + + let full_height = ui.available_height() * 0.95; + draw_graph( + ui, + "height", + data, + |d| d.bme.height, + UiGraphSettings::new_with_height(f64::NAN, f64::NAN, full_height * 0.5), + ); - ui.heading("Controls"); + draw_graph( + ui, + "dZ", + data, + |d| d.acceleration.z, + UiGraphSettings::new_with_height(0.0, 0.0, full_height * 0.25), + ); + + draw_graph( + ui, + "dXY", + data, + |d| d.acceleration.x + d.acceleration.y, + UiGraphSettings::new_with_height(0.0, 0.0, full_height * 0.25), + ); + }); +} + +fn ui_right_panel(ui: &mut Ui, data: &Data) { + ui.vertical(|ui| { + ui.set_width(ui.available_width()); + ui_right_top_info_panel(ui, data); + ui_3d_panel(ui, data); + ui_right_bottom_info_panel(ui, data); + }); +} + +fn ui_right_top_info_panel(ui: &mut Ui, data: &Data) { + let available_height = ui.available_height(); + ui.horizontal(|ui| { + ui.set_height(available_height * 0.25); + + ui_info_box(ui, data); + ui_orientation_box(ui, data); + }); +} + +fn ui_info_box(ui: &mut Ui, data: &Data) { + let available_width = ui.available_width(); + ui.vertical(|ui| { + ui.set_width(available_width * 0.5); + ui.label(format!("Signal strength: {:?}", data.get_signal_strength())); ui.separator(); - ui.heading("Settings"); + + let last_data = data.get_last_data(); + if last_data.is_none() { + ui.label("No data"); + return; + } + let last_data = last_data.unwrap(); + ui.label(format!("Time: {}", timestamp_formatter(last_data.time))); + ui.label(format!("Temperature: {}", last_data.bme.temperature)); + ui.label(format!("Pressure: {}", last_data.bme.pressure)); + ui.label(format!("Height: {}", last_data.bme.height)); + ui.label(format!("{:?}", last_data.orientation)); + ui.label(format!("{:?}", last_data.acceleration)); }); } -fn draw_ui_bme(ui: &mut Ui, data: &data::Data) { - ui.heading("BME"); - ui.separator(); - let component_width = ui.available_width() / 3.2; - ui.with_layout(Layout::left_to_right(Align::TOP), |ui| { - draw_ui_f64_graph( +fn ui_orientation_box(ui: &mut Ui, data: &Data) { + ui.vertical(|ui| { + let single_graph_height = ui.available_height() * 0.33; + draw_graph( ui, - "Temperature", - data.bme.temperature.to_vec(), - UiF64GraphSettings { - component_width, - max_y: 27.0, - min_y: 29.0, - }, + "x", + data, + |d| d.orientation.x, + UiGraphSettings::new_with_height(-1.0, 1.0, single_graph_height), ); - ui.separator(); - draw_ui_f64_graph( + + draw_graph( ui, - "Pressure", - data.bme.pressure.to_vec(), - UiF64GraphSettings { - component_width, - max_y: 9900.0, - min_y: 10000.0, - }, + "y", + data, + |d| d.orientation.y, + UiGraphSettings::new_with_height(-1.0, 1.0, single_graph_height), ); - ui.separator(); - draw_ui_f64_graph( + + draw_graph( ui, - "Height", - data.bme.height.to_vec(), - UiF64GraphSettings { - component_width, - max_y: f64::NAN, - min_y: f64::NAN, - }, + "z", + data, + |d| d.orientation.z, + UiGraphSettings::new_with_height(-1.0, 1.0, single_graph_height), ); }); } -fn draw_ui_f64_graph( +fn ui_3d_panel(ui: &mut Ui, data: &Data) { + let h = ui.available_height() * 0.75; + + let (mut response, painter) = + ui.allocate_painter(Vec2::new(ui.available_width(), h), egui::Sense::click()); + let rect = response.rect; + painter.rect_filled(rect, 0.0, Color32::from_rgb(0, 0, 0)); + + let last_data = data.get_last_data(); + if last_data.is_none() { + return; + } + let last_data = last_data.unwrap(); + + // model + // x,y,z + // z-up + let points = [ + Vector3::new(0.5, 0.5, 2.0), + Vector3::new(0.0, 0.0, 0.0), + Vector3::new(0.0, 1.0, 0.0), + Vector3::new(1.0, 1.0, 0.0), + Vector3::new(1.0, 0.0, 0.0), + ] + .map(|p| p - Vector3::new(0.5, 0.5, 0.5)); + + let rot_z = last_data.orientation.z; + let rot_x = last_data.orientation.x; + let rot_y = last_data.orientation.y; + + // transform points + let r1 = Matrix3::from([ + [rot_z.cos(), -rot_z.sin(), 0.0], + [rot_z.sin(), rot_z.cos(), 0.0], + [0.0, 0.0, 1.0], + ]); + let r2 = Matrix3::from([ + [1.0, 0.0, 0.0], + [0.0, rot_x.cos(), -rot_x.sin()], + [0.0, rot_x.sin(), rot_x.cos()], + ]); + let r3 = Matrix3::from([ + [rot_y.cos(), 0.0, rot_y.sin()], + [0.0, 1.0, 0.0], + [-rot_y.sin(), 0.0, rot_y.cos()], + ]); + + // transform 3d -> 2d + let r = r1 * r2 * r3; + let offset = Vector3::new(5.0, 0.0, 0.0); + let scale2d = 150.0; + let offset2d = Vector2::new(rect.min.x as f64 + 250.0, rect.min.y as f64 + 100.0); + let points = points.map(|p| r * p + offset); + let points2d = points.map(|p| (p.yz() / p.x) * scale2d + offset2d); + + // drawing + let stroke = Stroke::new(1.0, Color32::from_rgb(255, 0, 0)); + for point_a in &points2d { + for point_b in &points2d { + if point_a == point_b { + continue; + } + painter.line_segment( + [ + Pos2::new(point_a.x as f32, point_a.y as f32), + Pos2::new(point_b.x as f32, point_b.y as f32), + ], + stroke, + ); + } + } + + response.mark_changed(); +} + +fn ui_right_bottom_info_panel(ui: &mut Ui, data: &Data) { + let available_height = ui.available_height(); + ui.horizontal(|ui| { + ui.set_height(available_height); + let single_graph_width = ui.available_width() * 0.33; + draw_graph( + ui, + "temperature", + data, + |d| d.bme.temperature, + UiGraphSettings::new_with_width(f64::NAN, f64::NAN, single_graph_width), + ); + + draw_graph( + ui, + "pressure", + data, + |d| d.bme.pressure, + UiGraphSettings::new_with_width(f64::NAN, f64::NAN, single_graph_width), + ); + + draw_graph( + ui, + "height", + data, + |d| d.bme.height, + UiGraphSettings::new_with_width(f64::NAN, f64::NAN, single_graph_width), + ); + }); +} + +fn draw_graph( ui: &mut Ui, name: &str, - value: Vec<[f64; 2]>, - graph_settings: UiF64GraphSettings, + data: &Data, + field_getter: DataRecordFieldGetter, + graph_settings: UiGraphSettings, ) { ui.vertical(|ui| { + graph_settings.apply_component_width(ui); + graph_settings.apply_component_height(ui); + ui.horizontal(|ui| { ui.label(name); - let last_value = value.last().map(|v| v[1]).unwrap_or(f64::NAN); - ui.label(format!("{}", last_value)); + let value = data.get_last_data().map(field_getter).unwrap_or(f64::NAN); + ui.label(format!("{:.2}", value)); }); - let mut plot = Plot::new(name).width(graph_settings.component_width); + let mut plot = Plot::new(name).x_axis_formatter(|value, _| timestamp_formatter(value)); if !graph_settings.max_y.is_nan() && !graph_settings.min_y.is_nan() { plot = plot @@ -85,13 +258,61 @@ fn draw_ui_f64_graph( } plot.show(ui, |plot_ui| { - plot_ui.line(Line::new(PlotPoints::from(value)).name(name)) + let value_iter = data + .get_data_iter() + .map(|d| data_to_point(d, &field_getter)); + plot_ui.line(Line::new(PlotPoints::from_iter(value_iter)).name(name)) }); }); } -struct UiF64GraphSettings { - component_width: f32, - max_y: f64, +fn data_to_point(data: &DataRecord, field_getter: &DataRecordFieldGetter) -> [f64; 2] { + [data.time, field_getter(data)] +} + +fn timestamp_formatter(sec: f64) -> String { + static FORMAT: Lazy>> = + Lazy::new(|| time::format_description::parse("[hour]:[minute]:[second]").unwrap()); + let datetime = OffsetDateTime::from_unix_timestamp(sec as i64).unwrap(); + + datetime.format(&FORMAT).unwrap() +} + +struct UiGraphSettings { + component_width: Option, + component_height: Option, min_y: f64, + max_y: f64, +} + +impl UiGraphSettings { + pub fn new_with_width(min_y: f64, max_y: f64, component_width: f32) -> Self { + Self { + component_width: Some(component_width), + component_height: None, + min_y, + max_y, + } + } + + pub fn new_with_height(min_y: f64, max_y: f64, component_height: f32) -> Self { + Self { + component_width: None, + component_height: Some(component_height), + min_y, + max_y, + } + } + + pub fn apply_component_width(&self, ui: &mut Ui) { + if let Some(w) = self.component_width { + ui.set_width(w); + } + } + + pub fn apply_component_height(&self, ui: &mut Ui) { + if let Some(h) = self.component_height { + ui.set_height(h); + } + } } From e2f839718ba2ccbb7b1eb496468b7430a7eaae39 Mon Sep 17 00:00:00 2001 From: Patryk Paluch Date: Sun, 27 Aug 2023 03:49:14 +0200 Subject: [PATCH 3/9] chore: typo --- tools/flight-visualizer/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/flight-visualizer/README.md b/tools/flight-visualizer/README.md index c431eb8..4168d61 100644 --- a/tools/flight-visualizer/README.md +++ b/tools/flight-visualizer/README.md @@ -42,7 +42,7 @@ Build [lora-cli](../lora-cli) (see [README.md](../lora-cli/README.md)) and run: ../../target/release/lora-cli | cargo run # or lora-cli in debug mode -../../target/release/lora-cli | cargo run +../../target/debug/lora-cli | cargo run ``` ## Without working lora (generated data) @@ -54,7 +54,7 @@ Build [dummy-lora](../dummy-lora-receiver) (see [README.md](../dummy-lora-receiv ../../target/release/dummy-lora-receiver | cargo run # or dummy-lora-receiver in debug mode -../../target/release/dummy-lora-receiver | cargo run +../../target/debug/dummy-lora-receiver | cargo run ``` # Code From a068221f1715cde78815b79db5a88326daec9c9b Mon Sep 17 00:00:00 2001 From: Patryk Paluch Date: Tue, 29 Aug 2023 20:31:06 +0200 Subject: [PATCH 4/9] feat: better ui --- Cargo.lock | 586 ++++++++++++++++---------- tools/dummy-lora-receiver/Cargo.toml | 3 + tools/dummy-lora-receiver/src/main.rs | 65 ++- tools/flight-visualizer/Cargo.toml | 3 + tools/flight-visualizer/src/app.rs | 43 +- tools/flight-visualizer/src/data.rs | 139 +++++- tools/flight-visualizer/src/ui.rs | 41 +- 7 files changed, 598 insertions(+), 282 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c6e46ef..80a194c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -119,9 +119,9 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.19.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ "gimli", ] @@ -145,9 +145,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.0.2" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" +checksum = "0c378d78423fdad8089616f827526ee33c19f2fddbd5de1629152c9593ba4783" dependencies = [ "memchr", ] @@ -187,30 +187,29 @@ checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" [[package]] name = "anstream" -version = "0.3.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +checksum = "b1f58811cfac344940f1a400b6e6231ce35171f614f26439e80f8c1465c5cc0c" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", - "is-terminal", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d" +checksum = "15c4c2c83f81532e5845a733998b6971faca23490340a418e9b72a3ec9de12ea" [[package]] name = "anstyle-parse" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e765fd216e48e067936442276d1d57399e37bce53c264d6fefbe298080cb57ee" +checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" dependencies = [ "utf8parse", ] @@ -226,9 +225,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "1.0.1" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" +checksum = "58f54d10c6dfa51283a066ceab3ec1ab78d13fae00aa49243a45e4571fb79dfd" dependencies = [ "anstyle", "windows-sys 0.48.0", @@ -245,16 +244,15 @@ dependencies = [ [[package]] name = "arboard" -version = "3.2.0" +version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6041616acea41d67c4a984709ddab1587fd0b10efe5cc563fee954d2f011854" +checksum = "ac57f2b058a76363e357c056e4f74f1945bf734d37b8b3ef49066c4787dde0fc" dependencies = [ "clipboard-win", "log", "objc", "objc-foundation", "objc_id", - "once_cell", "parking_lot", "thiserror", "winapi", @@ -272,6 +270,9 @@ name = "arrayvec" version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +dependencies = [ + "serde", +] [[package]] name = "as-slice" @@ -315,7 +316,7 @@ dependencies = [ "async-lock", "async-task", "concurrent-queue", - "fastrand", + "fastrand 1.9.0", "futures-lite", "slab", ] @@ -346,7 +347,7 @@ dependencies = [ "log", "parking", "polling", - "rustix", + "rustix 0.37.23", "slab", "socket2", "waker-fn", @@ -374,7 +375,7 @@ dependencies = [ "cfg-if", "event-listener", "futures-lite", - "rustix", + "rustix 0.37.23", "signal-hook", "windows-sys 0.48.0", ] @@ -398,15 +399,24 @@ checksum = "ecc7ab41815b3c653ccd2978ec3255c81349336702dfdf62ee6f7069b12a3aae" [[package]] name = "async-trait" -version = "0.1.69" +version = "0.1.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b2d0f03b3640e3a630367e40c468cb7f309529c708ed1d88597047b0e7c6ef7" +checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", "syn 2.0.29", ] +[[package]] +name = "atoi" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" +dependencies = [ + "num-traits", +] + [[package]] name = "atomic-polyfill" version = "0.1.11" @@ -418,9 +428,9 @@ dependencies = [ [[package]] name = "atomic-polyfill" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c314e70d181aa6053b26e3f7fbf86d1dfff84f816a6175b967666b3506ef7289" +checksum = "8cf2bce30dfe09ef0bfaef228b9d414faaf7e563035494d7fe092dba54b300f4" dependencies = [ "critical-section", ] @@ -464,17 +474,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - [[package]] name = "autocfg" version = "1.1.0" @@ -483,15 +482,15 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.67" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ "addr2line", "cc", "cfg-if", "libc", - "miniz_oxide 0.6.2", + "miniz_oxide", "object", "rustc-demangle", ] @@ -525,9 +524,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.3.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6776fc96284a0bb647b615056fc496d1fe1644a7ab01829818a6d91cae888b84" +checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" [[package]] name = "block" @@ -573,7 +572,7 @@ dependencies = [ "async-lock", "async-task", "atomic-waker", - "fastrand", + "fastrand 1.9.0", "futures-lite", "log", ] @@ -654,6 +653,22 @@ dependencies = [ "serde", ] +[[package]] +name = "cansat-core" +version = "0.1.0" +source = "git+https://github.com/0xf4lc0n/cansat?branch=measurements_deserialize#e3bb9219af7ba6303136e53bd85ea28bab4a8ceb" +dependencies = [ + "accelerometer", + "derive_more", + "heapless", + "heapless-bytes", + "libm", + "mpu6050", + "nmea", + "ryu", + "serde", +] + [[package]] name = "cansat-gps" version = "0.1.0" @@ -682,7 +697,7 @@ version = "0.1.0" dependencies = [ "accelerometer", "bme280", - "cansat-core", + "cansat-core 0.1.0", "cansat-gps", "cansat-lora", "cortex-m 0.7.7", @@ -700,7 +715,7 @@ dependencies = [ "panic-reset", "rtic", "rtic-monotonics", - "serde-csv-core", + "serde-csv-core 0.1.1", "shared-bus", "stm32f4xx-hal", ] @@ -724,11 +739,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.79" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ "jobserver", + "libc", ] [[package]] @@ -758,11 +774,21 @@ dependencies = [ "libc", ] +[[package]] +name = "chrono" +version = "0.4.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f56b4c72906975ca04becb8a30e102dfecddd0c06181e3e95ddc444be28881f8" +dependencies = [ + "num-traits", + "serde", +] + [[package]] name = "clap" -version = "4.3.2" +version = "4.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "401a4694d2bf92537b6867d94de48c4842089645fdcdf6c71865b175d836e9c2" +checksum = "7c8d502cbaec4595d2e7d5f61e318f05417bd2b66fdc3809498f0d3fdf0bea27" dependencies = [ "clap_builder", "clap_derive", @@ -771,22 +797,21 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.3.1" +version = "4.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72394f3339a76daf211e57d4bcb374410f3965dcc606dd0e03738c7888766980" +checksum = "5891c7bc0edb3e1c2204fc5e94009affabeb1821c9e5fdc3959536c5c0bb984d" dependencies = [ "anstream", "anstyle", - "bitflags 1.3.2", "clap_lex", "strsim", ] [[package]] name = "clap_derive" -version = "4.3.2" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8cd2b2a819ad6eec39e8f1d6b53001af1e5469f8c177579cdaeb313115b825f" +checksum = "c9fd1a5729c4548118d7d70ff234a44868d00489a4b6597b0b020918a0e91a1a" dependencies = [ "heck", "proc-macro2", @@ -796,9 +821,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" +checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" [[package]] name = "clipboard-win" @@ -869,13 +894,13 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "colored" -version = "2.0.0" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3616f750b84d8f0de8a58bda93e08e2a81ad3f523089b05f1dffecab48c6cbd" +checksum = "2674ec482fbc38012cf31e6c42ba0177b431a0cb6f15fe40efa5aab1bda516f6" dependencies = [ - "atty", + "is-terminal", "lazy_static", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -1003,9 +1028,9 @@ dependencies = [ [[package]] name = "critical-section" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6548a0ad5d2549e111e1f6a11a6c2e2d00ce6a3dafe22948d67c2b443f775e52" +checksum = "7059fff8937831a9ae6f0fe4d658ffabf58f2ca96aa9dec1c889f936f705f216" [[package]] name = "crossbeam-utils" @@ -1035,11 +1060,46 @@ dependencies = [ "memchr", ] +[[package]] +name = "darling" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.29", +] + +[[package]] +name = "darling_macro" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.29", +] + [[package]] name = "defmt" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "956673bd3cb347512bf988d1e8d89ac9a82b64f6eec54d3c01c3529dac019882" +checksum = "a8a2d011b2fee29fb7d659b83c43fce9a2cb4df453e16d441a51448e448f3f98" dependencies = [ "bitflags 1.3.2", "defmt-macros", @@ -1047,15 +1107,15 @@ dependencies = [ [[package]] name = "defmt-macros" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4abc4821bd84d3d8f49945ddb24d029be9385ed9b77c99bf2f6296847a6a9f0" +checksum = "54f0216f6c5acb5ae1a47050a6645024e6edafc2ee32d421955eccfef12ef92e" dependencies = [ "defmt-parser", "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.29", ] [[package]] @@ -1151,7 +1211,10 @@ checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" name = "dummy-lora-receiver" version = "0.1.0" dependencies = [ + "cansat-core 0.1.0", + "csv-core", "noise", + "serde-csv-core 0.2.0", ] [[package]] @@ -1336,9 +1399,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" dependencies = [ "errno-dragonfly", "libc", @@ -1390,6 +1453,12 @@ dependencies = [ "instant", ] +[[package]] +name = "fastrand" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" + [[package]] name = "fdeflate" version = "0.3.0" @@ -1406,22 +1475,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" dependencies = [ "crc32fast", - "miniz_oxide 0.7.1", + "miniz_oxide", ] [[package]] name = "flight-visualizer" version = "0.1.0" dependencies = [ + "cansat-core 0.1.0 (git+https://github.com/0xf4lc0n/cansat?branch=measurements_deserialize)", + "csv-core", "derive-new", "eframe", "egui", "glow", "nalgebra 0.32.3", "once_cell", + "serde-csv-core 0.2.0", "time", ] +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + [[package]] name = "foreign-types" version = "0.3.2" @@ -1484,7 +1562,7 @@ version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" dependencies = [ - "fastrand", + "fastrand 1.9.0", "futures-core", "futures-io", "memchr", @@ -1589,9 +1667,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.27.2" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" [[package]] name = "gl_generator" @@ -1689,12 +1767,6 @@ dependencies = [ "byteorder", ] -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - [[package]] name = "hashbrown" version = "0.14.0" @@ -1735,18 +1807,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" [[package]] name = "hex" @@ -1763,6 +1826,12 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + [[package]] name = "idna" version = "0.4.0" @@ -1793,16 +1862,6 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - [[package]] name = "indexmap" version = "2.0.0" @@ -1810,7 +1869,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" dependencies = [ "equivalent", - "hashbrown 0.14.0", + "hashbrown", ] [[package]] @@ -1831,28 +1890,27 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.1", + "hermit-abi", "libc", "windows-sys 0.48.0", ] [[package]] name = "is-terminal" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "hermit-abi 0.3.1", - "io-lifetimes", - "rustix", + "hermit-abi", + "rustix 0.38.10", "windows-sys 0.48.0", ] [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "jni" @@ -1906,11 +1964,41 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +[[package]] +name = "lexical-parse-float" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683b3a5ebd0130b8fb52ba0bdc718cc56815b6a097e28ae5a6997d0ad17dc05f" +dependencies = [ + "lexical-parse-integer", + "lexical-util", + "static_assertions", +] + +[[package]] +name = "lexical-parse-integer" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d0994485ed0c312f6d965766754ea177d07f9c00c9b82a5ee62ed5b47945ee9" +dependencies = [ + "lexical-util", + "static_assertions", +] + +[[package]] +name = "lexical-util" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5255b9ff16ff898710eb9eb63cb39248ea8a5bb036bea8085b1a767ff6c4e3fc" +dependencies = [ + "static_assertions", +] + [[package]] name = "libc" -version = "0.2.146" +version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] name = "libloading" @@ -1964,6 +2052,12 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" +[[package]] +name = "linux-raw-sys" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" + [[package]] name = "lis3dh" version = "0.4.2" @@ -2042,9 +2136,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "f478948fd84d9f8e86967bf432640e46adfb5a4bd4f14ef7e864ab38220534ae" [[package]] name = "memmap2" @@ -2088,15 +2182,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" -[[package]] -name = "miniz_oxide" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" -dependencies = [ - "adler", -] - [[package]] name = "miniz_oxide" version = "0.7.1" @@ -2245,15 +2330,29 @@ dependencies = [ [[package]] name = "nix" -version = "0.26.2" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" dependencies = [ "bitflags 1.3.2", "cfg-if", "libc", "memoffset 0.7.1", - "static_assertions", +] + +[[package]] +name = "nmea" +version = "0.6.0" +source = "git+https://github.com/AeroRust/nmea#ae1aa8d7cfe7cdb35ef503059ae7c43f288f9ed8" +dependencies = [ + "arrayvec", + "cfg-if", + "chrono", + "heapless", + "nom", + "num-traits", + "serde", + "serde_with", ] [[package]] @@ -2320,6 +2419,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" dependencies = [ "autocfg", + "libm", ] [[package]] @@ -2421,9 +2521,9 @@ dependencies = [ [[package]] name = "object" -version = "0.30.4" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385" +checksum = "77ac5bbd07aea88c60a577a1ce218075ffd59208b2d7ca97adf9bfc5aeb21ebe" dependencies = [ "memchr", ] @@ -2513,7 +2613,7 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-targets 0.48.0", + "windows-targets 0.48.5", ] [[package]] @@ -2530,9 +2630,9 @@ checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -2556,7 +2656,7 @@ dependencies = [ "crc32fast", "fdeflate", "flate2", - "miniz_oxide 0.7.1", + "miniz_oxide", ] [[package]] @@ -2626,9 +2726,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.28" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -2736,9 +2836,21 @@ dependencies = [ [[package]] name = "regex" -version = "1.8.4" +version = "1.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12de2eff854e5fa4b1295edd650e227e9d8fb0c9e90b12e7f36d6a6811791a29" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0ab3ca65655bb1e41f2a8c8cd662eb4fb035e67c3f78da1d61dffe89d07300f" +checksum = "49530408a136e16e5b486e883fbb6ba058e8e4e8ae6621a77b048b314336e629" dependencies = [ "aho-corasick", "memchr", @@ -2747,17 +2859,17 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.7.2" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" +checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" [[package]] name = "rtic" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b34091be382fee127250626ffbceab8b56d4234732eb331155d267c53a54e75" +checksum = "857ce76a2517808a303bcb7e5b6d4a9c1d84e5de88b302aec2e53744633c0f4d" dependencies = [ - "atomic-polyfill 1.0.2", + "atomic-polyfill 1.0.3", "bare-metal 1.0.0", "cortex-m 0.7.7", "critical-section", @@ -2782,11 +2894,11 @@ checksum = "d9369355b04d06a3780ec0f51ea2d225624db777acbc60abd8ca4832da5c1a42" [[package]] name = "rtic-macros" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a38200e4b59d03545fc0f1055cde51fce8cb3be632285ad9874fcf287f4ebc75" +checksum = "8617533990b728e31bc65fcec8fec51fa1b4000fb33189ebeb05fb9d8625444d" dependencies = [ - "indexmap 1.9.3", + "indexmap", "proc-macro-error", "proc-macro2", "quote", @@ -2795,11 +2907,11 @@ dependencies = [ [[package]] name = "rtic-monotonics" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b7b43766f637098795e97a759006a09f79e710b3c8df9cb5070abdac59c158e" +checksum = "77e9f99e2119d5bdd927c45a31ef9e8d9888f02ede3e357bcbd7ab79c426e02d" dependencies = [ - "atomic-polyfill 1.0.2", + "atomic-polyfill 1.0.3", "cfg-if", "cortex-m 0.7.7", "fugit", @@ -2838,28 +2950,41 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.17", + "semver 1.0.18", ] [[package]] name = "rustix" -version = "0.37.19" +version = "0.37.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d" +checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" dependencies = [ "bitflags 1.3.2", "errno", "io-lifetimes", "libc", - "linux-raw-sys", + "linux-raw-sys 0.3.8", + "windows-sys 0.48.0", +] + +[[package]] +name = "rustix" +version = "0.38.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed6248e1caa625eb708e266e06159f135e8c26f2bb7ceb72dc4b2766d0340964" +dependencies = [ + "bitflags 2.4.0", + "errno", + "libc", + "linux-raw-sys 0.4.5", "windows-sys 0.48.0", ] [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "safe_arch" @@ -2887,9 +3012,9 @@ checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sctk-adwaita" @@ -2915,9 +3040,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" [[package]] name = "semver-parser" @@ -2927,9 +3052,9 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.186" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f5db24220c009de9bd45e69fb2938f4b6d2df856aa9304ce377b3180f83b7c1" +checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" dependencies = [ "serde_derive", ] @@ -2947,11 +3072,26 @@ dependencies = [ "serde", ] +[[package]] +name = "serde-csv-core" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "704f0db0f651c19b2424ed0399734f477cca2ffd961f00c51ee4d75d74d19c54" +dependencies = [ + "atoi", + "csv-core", + "heapless", + "itoa", + "lexical-parse-float", + "ryu", + "serde", +] + [[package]] name = "serde_derive" -version = "1.0.186" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ad697f7e0b65af4983a4ce8f56ed5b357e8d3c36651bf6a7e13639c17b8e670" +checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", @@ -2960,20 +3100,43 @@ dependencies = [ [[package]] name = "serde_repr" -version = "0.1.13" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0a21fba416426ac927b1691996e82079f8b6156e920c85345f135b2e9ba2de" +checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" dependencies = [ "proc-macro2", "quote", "syn 2.0.29", ] +[[package]] +name = "serde_with" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ca3b16a3d82c4088f343b7480a93550b3eabe1a358569c2dfe38bbcead07237" +dependencies = [ + "chrono", + "serde", + "serde_with_macros", +] + +[[package]] +name = "serde_with_macros" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e6be15c453eb305019bfa438b1593c731f36a289a7853f7707ee29e870b3b3c" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.29", +] + [[package]] name = "serialport" -version = "4.2.1" +version = "4.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "353dc2cbfc67c9a14a89a1292a9d8e819bd51066b083e08c1974ba08e3f48c62" +checksum = "c32634e2bd4311420caa504404a55fad2131292c485c97014cbed89a5899885f" dependencies = [ "CoreFoundation-sys", "IOKit-sys", @@ -2981,7 +3144,7 @@ dependencies = [ "cfg-if", "libudev", "mach2", - "nix 0.26.2", + "nix 0.26.4", "regex", "scopeguard", "winapi", @@ -3159,12 +3322,12 @@ dependencies = [ [[package]] name = "stm32f4xx-hal" -version = "0.16.0" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "431cd6045c6644beb39d421a37967e7f0708bce98ed6e38559137e09d5ae6d81" +checksum = "cc2877159274bc374744f10a4dd913b5175593ce02a94d70b8ba978e49db199b" dependencies = [ "bare-metal 1.0.0", - "bitflags 2.3.1", + "bitflags 2.4.0", "cortex-m 0.7.7", "cortex-m-rt", "defmt", @@ -3223,32 +3386,31 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.6.0" +version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6" +checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" dependencies = [ - "autocfg", "cfg-if", - "fastrand", + "fastrand 2.0.0", "redox_syscall", - "rustix", + "rustix 0.38.10", "windows-sys 0.48.0", ] [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "97a802ec30afc17eee47b2855fc72e0c4cd62be9b4efe6591edde0ec5bd68d8f" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "6bb623b56e39ab7dcd4b1b98bb6c8f8d907ed255b18de254088016b27a8ee19b" dependencies = [ "proc-macro2", "quote", @@ -3257,9 +3419,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bb39ee79a6d8de55f48f2293a830e040392f1c5f16e336bdd1788cd0aadce07" +checksum = "17f6bb557fd245c28e6411aa56b6403c689ad95061f50e4be16c274e70a17e48" dependencies = [ "deranged", "itoa", @@ -3276,9 +3438,9 @@ checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "733d258752e9303d392b94b75230d07b0b9c489350c69b851fc6c065fde3e8f9" +checksum = "1a942f44339478ef67935ab2bbaec2fb0322496cf3cbe84b261e06ac3814c572" dependencies = [ "time-core", ] @@ -3344,7 +3506,7 @@ version = "0.19.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" dependencies = [ - "indexmap 2.0.0", + "indexmap", "toml_datetime", "winnow", ] @@ -3411,9 +3573,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.9" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" [[package]] name = "unicode-normalization" @@ -3426,9 +3588,9 @@ dependencies = [ [[package]] name = "url" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" +checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" dependencies = [ "form_urlencoded", "idna", @@ -3738,7 +3900,7 @@ checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ "windows-implement", "windows-interface", - "windows-targets 0.48.0", + "windows-targets 0.48.5", ] [[package]] @@ -3778,7 +3940,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.0", + "windows-targets 0.48.5", ] [[package]] @@ -3798,17 +3960,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", ] [[package]] @@ -3819,9 +3981,9 @@ checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_msvc" @@ -3831,9 +3993,9 @@ checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_i686_gnu" @@ -3843,9 +4005,9 @@ checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_msvc" @@ -3855,9 +4017,9 @@ checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_x86_64_gnu" @@ -3867,9 +4029,9 @@ checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnullvm" @@ -3879,9 +4041,9 @@ checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_msvc" @@ -3891,9 +4053,9 @@ checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winit" @@ -3932,9 +4094,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.5.14" +version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d09770118a7eb1ccaf4a594a221334119a44a814fcb0d31c5b85e83e97227a97" +checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" dependencies = [ "memchr", ] @@ -3987,7 +4149,7 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2769203cd13a0c6015d515be729c526d041e9cf2c0cc478d57faee85f40c6dcd" dependencies = [ - "nix 0.26.2", + "nix 0.26.4", "winapi", ] @@ -4031,7 +4193,7 @@ dependencies = [ "futures-sink", "futures-util", "hex", - "nix 0.26.2", + "nix 0.26.4", "once_cell", "ordered-stream", "rand 0.8.5", diff --git a/tools/dummy-lora-receiver/Cargo.toml b/tools/dummy-lora-receiver/Cargo.toml index 6f84dc7..430264a 100644 --- a/tools/dummy-lora-receiver/Cargo.toml +++ b/tools/dummy-lora-receiver/Cargo.toml @@ -7,3 +7,6 @@ edition = "2021" [dependencies] noise = "0.8.2" +cansat-core = { path = "../../crates/cansat-core" } +csv-core = "0.1.10" +serde-csv-core = { version = "0.2.0" } \ No newline at end of file diff --git a/tools/dummy-lora-receiver/src/main.rs b/tools/dummy-lora-receiver/src/main.rs index 06e2980..2f70395 100644 --- a/tools/dummy-lora-receiver/src/main.rs +++ b/tools/dummy-lora-receiver/src/main.rs @@ -1,24 +1,29 @@ use noise::{NoiseFn, Perlin}; +use cansat_core::{Measurements}; +use cansat_core::quantity::{Distance, Pressure, Temperature}; -const TEMPERATURE_SEED: f64 = 10000.0; -const PRESSURE_SEED: f64 = 1993.0; -const HEIGHT_SEED: f64 = 42357.0; +const TEMPERATURE_SEED: f32 = 10000.0; +const PRESSURE_SEED: f32 = 1993.0; +const HEIGHT_SEED: f32 = 42357.0; const DELAY: u64 = 1000; -const TEMPERATURE_MIN: f64 = 27.0; -const TEMPERATURE_MAX: f64 = 28.0; +const TEMPERATURE_MIN: f32 = 27.0; +const TEMPERATURE_MAX: f32 = 28.0; -const PRESSURE_MIN: f64 = 9900.0; -const PRESSURE_MAX: f64 = 10000.0; +const PRESSURE_MIN: f32 = 9900.0; +const PRESSURE_MAX: f32 = 10000.0; -const HEIGHT_MIN_INC: f64 = 0.5; -const HEIGHT_MAX_INC: f64 = 2.0; +const HEIGHT_MIN_INC: f32 = 0.5; +const HEIGHT_MAX_INC: f32 = 2.0; fn main() { let perlin = Perlin::new(now() as u32); - let mut height: f64 = 150.0; + let mut height: f32 = 150.0; + + let mut inc = 0; loop { + inc += 1; let time = now(); let temperature = get_val( &perlin, @@ -46,29 +51,55 @@ fn main() { ); height += height_inc; - println!(">|{}|{}|{}|dummy", temperature, pressure, height); + let measurements = Measurements { + temperature: + if (inc % 3) == 0 { + None + } else { + Some(Temperature::from_celsius(temperature)) + }, + pressure: + if (inc % 4) != 0 { + None + } + else { + Some(Pressure::from_pascals(pressure)) + }, + altitude: Some(Distance::from_meters(height)), + nmea: None, + acceleration: None, + gyro: None, + rollpitch: None, + }; + + // println!(">|{}|{}|{}|dummy", temperature, pressure, height); + let mut writer = serde_csv_core::Writer::new(); + + let mut data = [0u8; 200]; + let len = writer.serialize_to_slice(&measurements, &mut data).unwrap(); + print!("{}", &data[..len].iter().map(|b| *b as char).collect::()); std::thread::sleep(std::time::Duration::from_millis(DELAY)); } } -fn get_val(perlin: &Perlin, time: u64, time_scale: f64, seed: f64, min: f64, max: f64) -> f64 { - let val = perlin.get([scale(time as f64, time_scale), seed]); +fn get_val(perlin: &Perlin, time: u32, time_scale: f32, seed: f32, min: f32, max: f32) -> f32 { + let val = perlin.get([scale(time as f32, time_scale) as f64, seed as f64]) as f32; map(val, -1.0, 1.0, min, max) } -fn map(value: f64, from_min: f64, from_max: f64, to_min: f64, to_max: f64) -> f64 { +fn map(value: f32, from_min: f32, from_max: f32, to_min: f32, to_max: f32) -> f32 { (value - from_min) * (to_max - to_min) / (from_max - from_min) + to_min } -fn scale(value: f64, scale: f64) -> f64 { +fn scale(value: f32, scale: f32) -> f32 { value * scale } -fn now() -> u64 { +fn now() -> u32 { std::time::SystemTime::now() .duration_since(std::time::UNIX_EPOCH) .unwrap() - .as_millis() as u64 + .as_millis() as u32 } diff --git a/tools/flight-visualizer/Cargo.toml b/tools/flight-visualizer/Cargo.toml index 9c408cb..41e0dfd 100644 --- a/tools/flight-visualizer/Cargo.toml +++ b/tools/flight-visualizer/Cargo.toml @@ -13,3 +13,6 @@ time = { version = "0.3.27", features = ["formatting"] } once_cell = "1.17.1" derive-new = "0.5.9" nalgebra = "0.32.3" +cansat-core = { git = "https://github.com/0xf4lc0n/cansat", branch = "measurements_deserialize" } +csv-core = "0.1.10" +serde-csv-core = { version = "0.2.0" } diff --git a/tools/flight-visualizer/src/app.rs b/tools/flight-visualizer/src/app.rs index 7ceebbf..c5a3d10 100644 --- a/tools/flight-visualizer/src/app.rs +++ b/tools/flight-visualizer/src/app.rs @@ -1,5 +1,6 @@ use crate::data::{Acceleration, BmeData, Data, DataRecord, Orientation}; use crate::ui; +use cansat_core::Measurements; use eframe::Frame; use egui::Context; use std::sync::{Arc, Mutex}; @@ -12,7 +13,7 @@ pub struct FlightVisualizerApp { impl Default for FlightVisualizerApp { fn default() -> Self { Self { - data: Arc::new(Mutex::new(Data::new())), + data: Arc::new(Mutex::new(Data::default())), } } } @@ -40,43 +41,47 @@ impl FlightVisualizerApp { } fn process_input_line(data_arc: &Arc>, line: String) { - if !line.starts_with(">|") { - println!("[STDIN][ IGNORED ]### {}", line); - return; - } - println!("[STDIN][PROCESSED]### {}", line); + println!("[STDIN][PROCESSING]### {}", line); - let line_split: Vec<&str> = line.split('|').collect(); - if line_split.len() < 3 { - println!("wrong data: {}", line); - return; + let mut reader = serde_csv_core::Reader::<200>::new(); + match reader.deserialize_from_slice::(line.as_bytes()) { + Ok((measurements, _)) => { + Self::process_measurements(data_arc, measurements); + } + Err(e) => { + println!("[STDIN][ ERROR ]### {}", e); + } } - let temp: f64 = line_split[1].parse().unwrap(); - let pressure: f64 = line_split[2].parse().unwrap(); - let height: f64 = line_split[3].parse().unwrap(); + } + fn process_measurements(data_arc: &Arc>, measurements: Measurements) { let time = std::time::SystemTime::now() .duration_since(std::time::UNIX_EPOCH) .unwrap() .as_secs_f64(); let mut data = data_arc.lock().unwrap(); + data.push(DataRecord::new( time, - BmeData::new(temp, pressure, height), + BmeData::new( + measurements.temperature.map(|v| v.as_celsius() as f64), + measurements.pressure.map(|v| v.as_pascals() as f64), + measurements.altitude.map(|v| v.as_meters() as f64), + ), Orientation::new( - f64::sin(time / 8.0), - f64::sin(time / 15.0), - f64::sin(time / 2.0), + Some(f64::sin(time / 8.0)), + Some(f64::sin(time / 15.0)), + Some(f64::sin(time / 2.0)), ), - Acceleration::new(0.0, 0.0, 0.0), + Acceleration::new(Some(0.0), Some(0.0), Some(0.0)), )); } } impl eframe::App for FlightVisualizerApp { fn update(&mut self, ctx: &Context, _frame: &mut Frame) { ui::draw_ui(ctx, &self.data.lock().unwrap()); - ctx.request_repaint_after(Duration::from_millis(33)); + ctx.request_repaint_after(Duration::from_millis(1000)); } } diff --git a/tools/flight-visualizer/src/data.rs b/tools/flight-visualizer/src/data.rs index b6cc81e..64e065e 100644 --- a/tools/flight-visualizer/src/data.rs +++ b/tools/flight-visualizer/src/data.rs @@ -1,9 +1,10 @@ use derive_new::new; use std::collections::VecDeque; -const MAX_DATA_POINTS: usize = 10; +pub const DEFAULT_CAPACITY: usize = 20; pub struct Data { + data_points: usize, data_records: VecDeque, signal_strength: SignalStrength, } @@ -24,63 +25,165 @@ pub struct SignalStrength { #[derive(new, Debug)] pub struct BmeData { - pub temperature: f64, - pub pressure: f64, - pub height: f64, + pub temperature: Option, + pub pressure: Option, + pub height: Option, } #[derive(new, Debug)] pub struct Orientation { - pub x: f64, - pub y: f64, - pub z: f64, + pub x: Option, + pub y: Option, + pub z: Option, } #[derive(new, Debug)] pub struct Acceleration { - pub x: f64, - pub y: f64, - pub z: f64, + pub x: Option, + pub y: Option, + pub z: Option, } impl Data { - pub fn new() -> Self { + pub fn new(data_points: usize) -> Self { Self { - data_records: VecDeque::new(), + data_points, + data_records: VecDeque::with_capacity(data_points), signal_strength: SignalStrength::new(0, 0), } } pub fn push(&mut self, data_record: DataRecord) { self.data_records.push_back(data_record); - if self.data_records.len() > MAX_DATA_POINTS { + if self.data_records.len() > self.data_points { self.data_records.pop_front(); } } - pub fn get_last_data(&self) -> Option<&DataRecord> { + pub fn last_data(&self) -> Option<&DataRecord> { self.data_records.back() } - pub fn get_nth_element(&self, n: usize) -> Option<&DataRecord> { + pub fn nth_element(&self, n: usize) -> Option<&DataRecord> { self.data_records.get(n) } - pub fn get_data_iter(&self) -> impl Iterator { + pub fn data_iter(&self) -> impl Iterator { self.data_records.iter() } + pub fn data_windows(&self) -> impl Iterator { + self.data_records + .iter() + .zip(self.data_records.iter().skip(1)) + .map(|t| [t.0, t.1]) + } + pub fn set_signal_strength(&mut self, signal_strength: SignalStrength) { self.signal_strength = signal_strength; } - pub fn get_signal_strength(&self) -> &SignalStrength { + pub fn signal_strength(&self) -> &SignalStrength { &self.signal_strength } } impl Default for Data { fn default() -> Self { - Self::new() + Self::new(DEFAULT_CAPACITY) + } +} + +#[cfg(test)] +mod test { + use super::*; + + fn new_test_data(test_value: f64) -> DataRecord { + DataRecord::new( + 0.0, + BmeData::new(Some(test_value), Some(test_value), Some(test_value)), + Orientation::new(Some(test_value), Some(test_value), Some(test_value)), + Acceleration::new(Some(test_value), Some(test_value), Some(test_value)), + ) + } + + fn test_data_getter(data_record: &DataRecord) -> Option { + data_record.bme.temperature + } + + fn test_data_getter_arr(data_record: [&DataRecord; 2]) -> [Option; 2] { + [ + data_record[0].bme.temperature, + data_record[1].bme.temperature, + ] + } + + #[test] + fn test_data_nth_element() { + let mut data = Data::new(3); + + data.push(new_test_data(1.0)); + data.push(new_test_data(2.0)); + data.push(new_test_data(3.0)); + assert_eq!(test_data_getter(&data.nth_element(0).unwrap()), Some(1.0)); + assert_eq!(test_data_getter(&data.nth_element(1).unwrap()), Some(2.0)); + assert_eq!(test_data_getter(&data.nth_element(2).unwrap()), Some(3.0)); + + data.push(new_test_data(4.0)); + assert_eq!(test_data_getter(&data.nth_element(0).unwrap()), Some(2.0)); + assert_eq!(test_data_getter(&data.nth_element(1).unwrap()), Some(3.0)); + assert_eq!(test_data_getter(&data.nth_element(2).unwrap()), Some(4.0)); + + data.push(new_test_data(5.0)); + assert_eq!(test_data_getter(&data.nth_element(0).unwrap()), Some(3.0)); + assert_eq!(test_data_getter(&data.nth_element(1).unwrap()), Some(4.0)); + assert_eq!(test_data_getter(&data.nth_element(2).unwrap()), Some(5.0)); + } + + #[test] + fn test_data_iter() { + let mut data = Data::new(3); + + data.push(new_test_data(1.0)); + data.push(new_test_data(2.0)); + data.push(new_test_data(3.0)); + { + let mut iter = data.data_iter(); + assert_eq!(iter.next().map(test_data_getter), Some(Some(1.0))); + assert_eq!(iter.next().map(test_data_getter), Some(Some(2.0))); + assert_eq!(iter.next().map(test_data_getter), Some(Some(3.0))); + assert_eq!(iter.next().map(test_data_getter), None); + } + { + let mut iter = data.data_windows(); + assert_eq!( + iter.next().map(test_data_getter_arr), + Some([Some(1.0), Some(2.0)]) + ); + assert_eq!( + iter.next().map(test_data_getter_arr), + Some([Some(2.0), Some(3.0)]) + ); + assert_eq!(iter.next().map(test_data_getter_arr), None); + } + + data.push(new_test_data(4.0)); + data.push(new_test_data(5.0)); + let mut iter = data.data_iter(); + assert_eq!(iter.next().map(test_data_getter), Some(Some(3.0))); + assert_eq!(iter.next().map(test_data_getter), Some(Some(4.0))); + assert_eq!(iter.next().map(test_data_getter), Some(Some(5.0))); + assert_eq!(iter.next().map(test_data_getter), None); + + let mut iter = data.data_windows(); + assert_eq!( + iter.next().map(test_data_getter_arr), + Some([Some(3.0), Some(4.0)]) + ); + assert_eq!( + iter.next().map(test_data_getter_arr), + Some([Some(4.0), Some(5.0)]) + ); + assert_eq!(iter.next().map(test_data_getter_arr), None); } } diff --git a/tools/flight-visualizer/src/ui.rs b/tools/flight-visualizer/src/ui.rs index 19f5611..dfd1496 100644 --- a/tools/flight-visualizer/src/ui.rs +++ b/tools/flight-visualizer/src/ui.rs @@ -1,14 +1,14 @@ use crate::data::{Data, DataRecord}; use eframe::egui; use eframe::egui::Context; -use egui::plot::{Line, Plot, PlotPoints}; +use egui::plot::{Line, Plot, PlotPoints, Points}; use egui::{Color32, Pos2, Stroke, Ui, Vec2}; use nalgebra::{Matrix3, Vector2, Vector3}; use once_cell::sync::Lazy; use time::format_description::FormatItem; use time::OffsetDateTime; -type DataRecordFieldGetter = fn(&DataRecord) -> f64; +type DataRecordFieldGetter = fn(&DataRecord) -> Option; pub fn draw_ui(ctx: &Context, data: &Data) { // ctx.set_debug_on_hover(true); @@ -50,7 +50,7 @@ fn ui_left_panel(ui: &mut Ui, data: &Data) { ui, "dXY", data, - |d| d.acceleration.x + d.acceleration.y, + extract_horizontal_velocity, UiGraphSettings::new_with_height(0.0, 0.0, full_height * 0.25), ); }); @@ -79,19 +79,19 @@ fn ui_info_box(ui: &mut Ui, data: &Data) { let available_width = ui.available_width(); ui.vertical(|ui| { ui.set_width(available_width * 0.5); - ui.label(format!("Signal strength: {:?}", data.get_signal_strength())); + ui.label(format!("Signal strength: {:?}", data.signal_strength())); ui.separator(); - let last_data = data.get_last_data(); + let last_data = data.last_data(); if last_data.is_none() { ui.label("No data"); return; } let last_data = last_data.unwrap(); ui.label(format!("Time: {}", timestamp_formatter(last_data.time))); - ui.label(format!("Temperature: {}", last_data.bme.temperature)); - ui.label(format!("Pressure: {}", last_data.bme.pressure)); - ui.label(format!("Height: {}", last_data.bme.height)); + ui.label(format!("Temperature: {:?}", last_data.bme.temperature)); + ui.label(format!("Pressure: {:?}", last_data.bme.pressure)); + ui.label(format!("Height: {:?}", last_data.bme.height)); ui.label(format!("{:?}", last_data.orientation)); ui.label(format!("{:?}", last_data.acceleration)); }); @@ -134,7 +134,7 @@ fn ui_3d_panel(ui: &mut Ui, data: &Data) { let rect = response.rect; painter.rect_filled(rect, 0.0, Color32::from_rgb(0, 0, 0)); - let last_data = data.get_last_data(); + let last_data = data.last_data(); if last_data.is_none() { return; } @@ -152,9 +152,9 @@ fn ui_3d_panel(ui: &mut Ui, data: &Data) { ] .map(|p| p - Vector3::new(0.5, 0.5, 0.5)); - let rot_z = last_data.orientation.z; - let rot_x = last_data.orientation.x; - let rot_y = last_data.orientation.y; + let rot_z = last_data.orientation.z.unwrap_or(0.0); + let rot_x = last_data.orientation.x.unwrap_or(0.0); + let rot_y = last_data.orientation.y.unwrap_or(0.0); // transform points let r1 = Matrix3::from([ @@ -245,7 +245,7 @@ fn draw_graph( ui.horizontal(|ui| { ui.label(name); - let value = data.get_last_data().map(field_getter).unwrap_or(f64::NAN); + let value = data.last_data().and_then(field_getter).unwrap_or(f64::NAN); ui.label(format!("{:.2}", value)); }); @@ -259,15 +259,17 @@ fn draw_graph( plot.show(ui, |plot_ui| { let value_iter = data - .get_data_iter() + .data_iter() + .filter(|d| field_getter(d).is_some()) .map(|d| data_to_point(d, &field_getter)); - plot_ui.line(Line::new(PlotPoints::from_iter(value_iter)).name(name)) + + plot_ui.line(Line::new(PlotPoints::from_iter(value_iter)).name(name)); }); }); } fn data_to_point(data: &DataRecord, field_getter: &DataRecordFieldGetter) -> [f64; 2] { - [data.time, field_getter(data)] + [data.time, field_getter(data).unwrap()] } fn timestamp_formatter(sec: f64) -> String { @@ -278,6 +280,13 @@ fn timestamp_formatter(sec: f64) -> String { datetime.format(&FORMAT).unwrap() } +fn extract_horizontal_velocity(d: &DataRecord) -> Option { + match (d.acceleration.x, d.acceleration.y) { + (Some(x), Some(y)) => Some(x + y), + _ => None, + } +} + struct UiGraphSettings { component_width: Option, component_height: Option, From 363e711f18af7a6995e88285832b99e68e17db1c Mon Sep 17 00:00:00 2001 From: Patryk Paluch Date: Wed, 30 Aug 2023 15:22:03 +0200 Subject: [PATCH 5/9] feat: even better ui --- Cargo.lock | 2648 +++++++++++++++++++++++- crates/cansat-core/src/measurements.rs | 6 +- crates/cansat-core/src/quantity.rs | 8 +- tools/flight-visualizer/Cargo.toml | 3 +- tools/flight-visualizer/src/app.rs | 60 +- tools/flight-visualizer/src/data.rs | 40 +- tools/flight-visualizer/src/ui.rs | 10 +- tools/lora-cli/src/main.rs | 6 +- 8 files changed, 2666 insertions(+), 115 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ba78d0b..af79837 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -23,6 +23,22 @@ dependencies = [ "mach", ] +[[package]] +name = "ab_glyph" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5110f1c78cf582855d895ecd0746b653db010cec6d9f5575293f27934d980a39" +dependencies = [ + "ab_glyph_rasterizer", + "owned_ttf_parser", +] + +[[package]] +name = "ab_glyph_rasterizer" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" + [[package]] name = "accelerometer" version = "0.12.0" @@ -32,6 +48,75 @@ dependencies = [ "micromath", ] +[[package]] +name = "accesskit" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76eb1adf08c5bcaa8490b9851fd53cca27fa9880076f178ea9d29f05196728a8" + +[[package]] +name = "accesskit_consumer" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04bb4d9e4772fe0d47df57d0d5dbe5d85dd05e2f37ae1ddb6b105e76be58fb00" +dependencies = [ + "accesskit", +] + +[[package]] +name = "accesskit_macos" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "134d0acf6acb667c89d3332999b1a5df4edbc8d6113910f392ebb73f2b03bb56" +dependencies = [ + "accesskit", + "accesskit_consumer", + "objc2", + "once_cell", +] + +[[package]] +name = "accesskit_unix" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e084cb5168790c0c112626175412dc5ad127083441a8248ae49ddf6725519e83" +dependencies = [ + "accesskit", + "accesskit_consumer", + "async-channel", + "atspi", + "futures-lite", + "serde", + "zbus", +] + +[[package]] +name = "accesskit_windows" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9eac0a7f2d7cd7a93b938af401d3d8e8b7094217989a7c25c55a953023436e31" +dependencies = [ + "accesskit", + "accesskit_consumer", + "arrayvec", + "once_cell", + "paste", + "windows", +] + +[[package]] +name = "accesskit_winit" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "825d23acee1bd6d25cbaa3ca6ed6e73faf24122a774ec33d52c5c86c6ab423c0" +dependencies = [ + "accesskit", + "accesskit_macos", + "accesskit_unix", + "accesskit_windows", + "winit", +] + [[package]] name = "addr2line" version = "0.19.0" @@ -47,6 +132,17 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "ahash" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", +] + [[package]] name = "aho-corasick" version = "1.0.2" @@ -65,6 +161,30 @@ dependencies = [ "as-slice", ] +[[package]] +name = "android-activity" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64529721f27c2314ced0890ce45e469574a73e5e6fdd6e9da1860eb29285f5e0" +dependencies = [ + "android-properties", + "bitflags 1.3.2", + "cc", + "jni-sys", + "libc", + "log", + "ndk", + "ndk-context", + "ndk-sys", + "num_enum 0.6.1", +] + +[[package]] +name = "android-properties" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" + [[package]] name = "anstream" version = "0.3.2" @@ -101,7 +221,7 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" dependencies = [ - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -111,7 +231,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" dependencies = [ "anstyle", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -123,6 +243,29 @@ dependencies = [ "num-traits", ] +[[package]] +name = "arboard" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac57f2b058a76363e357c056e4f74f1945bf734d37b8b3ef49066c4787dde0fc" +dependencies = [ + "clipboard-win", + "log", + "objc", + "objc-foundation", + "objc_id", + "parking_lot", + "thiserror", + "winapi", + "x11rb", +] + +[[package]] +name = "arrayref" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" + [[package]] name = "arrayvec" version = "0.7.2" @@ -144,6 +287,137 @@ dependencies = [ "stable_deref_trait", ] +[[package]] +name = "async-broadcast" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c48ccdbf6ca6b121e0f586cbc0e73ae440e56c67c30fa0873b4e110d9c26d2b" +dependencies = [ + "event-listener", + "futures-core", +] + +[[package]] +name = "async-channel" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" +dependencies = [ + "concurrent-queue", + "event-listener", + "futures-core", +] + +[[package]] +name = "async-executor" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fa3dc5f2a8564f07759c008b9109dc0d39de92a88d5588b8a5036d286383afb" +dependencies = [ + "async-lock", + "async-task", + "concurrent-queue", + "fastrand", + "futures-lite", + "slab", +] + +[[package]] +name = "async-fs" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" +dependencies = [ + "async-lock", + "autocfg", + "blocking", + "futures-lite", +] + +[[package]] +name = "async-io" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" +dependencies = [ + "async-lock", + "autocfg", + "cfg-if", + "concurrent-queue", + "futures-lite", + "log", + "parking", + "polling", + "rustix", + "slab", + "socket2", + "waker-fn", +] + +[[package]] +name = "async-lock" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" +dependencies = [ + "event-listener", +] + +[[package]] +name = "async-process" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a9d28b1d97e08915212e2e45310d47854eafa69600756fc735fb788f75199c9" +dependencies = [ + "async-io", + "async-lock", + "autocfg", + "blocking", + "cfg-if", + "event-listener", + "futures-lite", + "rustix", + "signal-hook", + "windows-sys 0.48.0", +] + +[[package]] +name = "async-recursion" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.29", +] + +[[package]] +name = "async-task" +version = "4.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc7ab41815b3c653ccd2978ec3255c81349336702dfdf62ee6f7069b12a3aae" + +[[package]] +name = "async-trait" +version = "0.1.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b2d0f03b3640e3a630367e40c468cb7f309529c708ed1d88597047b0e7c6ef7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.29", +] + +[[package]] +name = "atoi" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" +dependencies = [ + "num-traits", +] + [[package]] name = "atomic-polyfill" version = "0.1.11" @@ -162,6 +436,45 @@ dependencies = [ "critical-section", ] +[[package]] +name = "atomic-waker" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1181e1e0d1fce796a03db1ae795d67167da795f9cf4a39c37589e85ef57f26d3" + +[[package]] +name = "atomic_refcell" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "112ef6b3f6cb3cb6fc5b6b494ef7a848492cff1ab0ef4de10b0f7d572861c905" + +[[package]] +name = "atspi" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "674e7a3376837b2e7d12d34d58ac47073c491dc3bf6f71a7adaf687d4d817faa" +dependencies = [ + "async-recursion", + "async-trait", + "atspi-macros", + "enumflags2", + "futures-lite", + "serde", + "tracing", + "zbus", + "zbus_names", +] + +[[package]] +name = "atspi-macros" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fb4870a32c0eaa17e35bca0e6b16020635157121fb7d45593d242c295bc768" +dependencies = [ + "quote", + "syn 1.0.109", +] + [[package]] name = "atty" version = "0.2.14" @@ -189,7 +502,7 @@ dependencies = [ "cc", "cfg-if", "libc", - "miniz_oxide", + "miniz_oxide 0.6.2", "object", "rustc-demangle", ] @@ -227,6 +540,55 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6776fc96284a0bb647b615056fc496d1fe1644a7ab01829818a6d91cae888b84" +[[package]] +name = "block" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array 0.14.7", +] + +[[package]] +name = "block-sys" +version = "0.1.0-beta.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa55741ee90902547802152aaf3f8e5248aab7e21468089560d4c8840561146" +dependencies = [ + "objc-sys", +] + +[[package]] +name = "block2" +version = "0.2.0-alpha.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dd9e63c1744f755c2f60332b88de39d341e5e86239014ad839bd71c106dec42" +dependencies = [ + "block-sys", + "objc2-encode", +] + +[[package]] +name = "blocking" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77231a1c8f801696fc0123ec6150ce92cffb8e164a02afb9c8ddee0e9b65ad65" +dependencies = [ + "async-channel", + "async-lock", + "async-task", + "atomic-waker", + "fastrand", + "futures-lite", + "log", +] + [[package]] name = "bme280" version = "0.4.4" @@ -236,12 +598,58 @@ dependencies = [ "embedded-hal 1.0.0-alpha.8", ] +[[package]] +name = "bumpalo" +version = "3.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" + +[[package]] +name = "bytemuck" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdde5c9cd29ebd706ce1b35600920a33550e402fc998a2e53ad3b42c3c47a192" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.29", +] + [[package]] name = "byteorder" version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +[[package]] +name = "bytes" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" + +[[package]] +name = "calloop" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52e0d00eb1ea24371a97d2da6201c6747a633dc6dc1988ef503403b4c59504a8" +dependencies = [ + "bitflags 1.3.2", + "log", + "nix 0.25.1", + "slotmap", + "thiserror", + "vec_map", +] + [[package]] name = "cansat-core" version = "0.1.0" @@ -266,7 +674,7 @@ dependencies = [ "defmt", "embedded-hal 1.0.0-alpha.8", "heapless", - "rand", + "rand 0.8.5", ] [[package]] @@ -304,7 +712,7 @@ dependencies = [ "panic-reset", "rtic", "rtic-monotonics", - "serde-csv-core", + "serde-csv-core 0.1.1", "shared-bus", "stm32f4xx-hal", ] @@ -331,6 +739,15 @@ name = "cc" version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +dependencies = [ + "jobserver", +] + +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" [[package]] name = "cfg-if" @@ -338,6 +755,21 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" + +[[package]] +name = "cgl" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ced0551234e87afee12411d535648dd89d2e7f34c78b753395567aff3d447ff" +dependencies = [ + "libc", +] + [[package]] name = "chrono" version = "0.4.24" @@ -382,7 +814,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.29", ] [[package]] @@ -391,6 +823,48 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" +[[package]] +name = "clipboard-win" +version = "4.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7191c27c2357d9b7ef96baac1773290d4ca63b24205b82a3fd8a0637afcf0362" +dependencies = [ + "error-code", + "str-buf", + "winapi", +] + +[[package]] +name = "cocoa" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f425db7937052c684daec3bd6375c8abe2d146dca4b8b143d6db777c39138f3a" +dependencies = [ + "bitflags 1.3.2", + "block", + "cocoa-foundation", + "core-foundation", + "core-graphics", + "foreign-types", + "libc", + "objc", +] + +[[package]] +name = "cocoa-foundation" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "931d3837c286f56e3c58423ce4eba12d08db2374461a785c86f672b08b5650d6" +dependencies = [ + "bitflags 1.3.2", + "block", + "core-foundation", + "core-graphics-types", + "foreign-types", + "libc", + "objc", +] + [[package]] name = "color-eyre" version = "0.6.2" @@ -405,8 +879,14 @@ dependencies = [ ] [[package]] -name = "colorchoice" -version = "1.0.0" +name = "color_quant" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" + +[[package]] +name = "colorchoice" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" @@ -421,6 +901,65 @@ dependencies = [ "winapi", ] +[[package]] +name = "combine" +version = "4.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" +dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "concurrent-queue" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "core-foundation" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" + +[[package]] +name = "core-graphics" +version = "0.22.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-graphics-types", + "foreign-types", + "libc", +] + +[[package]] +name = "core-graphics-types" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bb142d41022986c1d8ff29103a1411c8a3dfad3552f87a4f8dc50d61d4f4e33" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "libc", +] + [[package]] name = "cortex-m" version = "0.6.7" @@ -467,12 +1006,49 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "cpufeatures" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +dependencies = [ + "cfg-if", +] + [[package]] name = "critical-section" version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6548a0ad5d2549e111e1f6a11a6c2e2d00ce6a3dafe22948d67c2b443f775e52" +[[package]] +name = "crossbeam-utils" +version = "0.8.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array 0.14.7", + "typenum", +] + [[package]] name = "csv-core" version = "0.1.10" @@ -503,7 +1079,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.18", + "syn 2.0.29", ] [[package]] @@ -514,7 +1090,7 @@ checksum = "29a358ff9f12ec09c3e61fef9b5a9902623a695a46a917b07f269bff1445611a" dependencies = [ "darling_core", "quote", - "syn 2.0.18", + "syn 2.0.29", ] [[package]] @@ -559,6 +1135,34 @@ dependencies = [ "defmt", ] +[[package]] +name = "deranged" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive-new" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3418329ca0ad70234b9735dc4ceed10af4df60eff9c8e7b06cb5e520d92c3535" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "derive_more" version = "0.99.17" @@ -570,6 +1174,138 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] + +[[package]] +name = "dispatch" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" + +[[package]] +name = "dlib" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" +dependencies = [ + "libloading 0.8.0", +] + +[[package]] +name = "downcast-rs" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" + +[[package]] +name = "dummy-lora-receiver" +version = "0.1.0" +dependencies = [ + "cansat-core", + "csv-core", + "noise", + "serde-csv-core 0.2.0", +] + +[[package]] +name = "ecolor" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e479a7fa3f23d4e794f8b2f8b3568dd4e47886ad1b12c9c095e141cb591eb63" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "eframe" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf4596583a2c680c55b6feaa748f74890c4f9cb9c7cb69d6117110444cb65b2f" +dependencies = [ + "bytemuck", + "cocoa", + "egui", + "egui-winit", + "egui_glow", + "glow", + "glutin", + "glutin-winit", + "image", + "js-sys", + "log", + "objc", + "percent-encoding", + "raw-window-handle", + "thiserror", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winapi", + "winit", +] + +[[package]] +name = "egui" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3aef8ec3ae1b772f340170c65bf27d5b8c28f543a0116c844d2ac08d01123e7" +dependencies = [ + "accesskit", + "ahash", + "epaint", + "log", + "nohash-hasher", +] + +[[package]] +name = "egui-winit" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a49155fd4a0a4fb21224407a91de0030847972ef90fc64edb63621caea61cb2" +dependencies = [ + "accesskit_winit", + "arboard", + "egui", + "instant", + "log", + "raw-window-handle", + "smithay-clipboard", + "webbrowser", + "winit", +] + +[[package]] +name = "egui_glow" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f8c2752cdf1b0ef5fcda59a898cacabad974d4f5880e92a420b2c917022da64" +dependencies = [ + "bytemuck", + "egui", + "glow", + "log", + "memoffset 0.6.5", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "emath" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3857d743a6e0741cdd60b622a74c7a36ea75f5f8f11b793b41d905d2c9721a4b" +dependencies = [ + "bytemuck", +] + [[package]] name = "embedded-dma" version = "0.2.0" @@ -615,6 +1351,50 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "723dce4e9f25b6e6c5f35628e144794e5b459216ed7da97b7c4b66cdb3fa82ca" +[[package]] +name = "enumflags2" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c041f5090df68b32bcd905365fd51769c8b9d553fe87fde0b683534f10c01bd2" +dependencies = [ + "enumflags2_derive", + "serde", +] + +[[package]] +name = "enumflags2_derive" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.29", +] + +[[package]] +name = "epaint" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09333964d4d57f40a85338ba3ca5ed4716070ab184dcfed966b35491c5c64f3b" +dependencies = [ + "ab_glyph", + "ahash", + "atomic_refcell", + "bytemuck", + "ecolor", + "emath", + "log", + "nohash-hasher", + "parking_lot", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + [[package]] name = "errno" version = "0.3.1" @@ -623,7 +1403,7 @@ checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" dependencies = [ "errno-dragonfly", "libc", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -636,6 +1416,22 @@ dependencies = [ "libc", ] +[[package]] +name = "error-code" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64f18991e7bf11e7ffee451b5318b5c1a73c52d0d0ada6e5a3017c8c1ced6a21" +dependencies = [ + "libc", + "str-buf", +] + +[[package]] +name = "event-listener" +version = "2.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" + [[package]] name = "eyre" version = "0.6.8" @@ -646,12 +1442,81 @@ dependencies = [ "once_cell", ] +[[package]] +name = "fastrand" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" +dependencies = [ + "instant", +] + +[[package]] +name = "fdeflate" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d329bdeac514ee06249dabc27877490f17f5d371ec693360768b838e19f3ae10" +dependencies = [ + "simd-adler32", +] + +[[package]] +name = "flate2" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" +dependencies = [ + "crc32fast", + "miniz_oxide 0.7.1", +] + +[[package]] +name = "flight-visualizer" +version = "0.1.0" +dependencies = [ + "cansat-core", + "csv-core", + "derive-new", + "eframe", + "egui", + "glow", + "nalgebra 0.32.3", + "once_cell", + "regex", + "serde-csv-core 0.2.0", + "time", +] + [[package]] name = "fnv" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +dependencies = [ + "percent-encoding", +] + [[package]] name = "fugit" version = "0.3.7" @@ -678,6 +1543,33 @@ version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +[[package]] +name = "futures-io" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" + +[[package]] +name = "futures-lite" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" +dependencies = [ + "fastrand", + "futures-core", + "futures-io", + "memchr", + "parking", + "pin-project-lite", + "waker-fn", +] + +[[package]] +name = "futures-sink" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" + [[package]] name = "futures-task" version = "0.3.28" @@ -691,9 +1583,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" dependencies = [ "futures-core", + "futures-io", + "futures-sink", "futures-task", + "memchr", "pin-project-lite", "pin-utils", + "slab", ] [[package]] @@ -730,6 +1626,27 @@ dependencies = [ "version_check", ] +[[package]] +name = "gethostname" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1ebd34e35c46e00bb73e81363248d627782724609fe1b6396f553f68fe3862e" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", +] + [[package]] name = "getrandom" version = "0.2.10" @@ -738,7 +1655,7 @@ checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", ] [[package]] @@ -748,7 +1665,94 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" [[package]] -name = "hash32" +name = "gl_generator" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d" +dependencies = [ + "khronos_api", + "log", + "xml-rs", +] + +[[package]] +name = "glow" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca0fe580e4b60a8ab24a868bc08e2f03cbcb20d3d676601fa909386713333728" +dependencies = [ + "js-sys", + "slotmap", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "glutin" +version = "0.30.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc93b03242719b8ad39fb26ed2b01737144ce7bd4bfc7adadcef806596760fe" +dependencies = [ + "bitflags 1.3.2", + "cfg_aliases", + "cgl", + "core-foundation", + "dispatch", + "glutin_egl_sys", + "glutin_glx_sys", + "glutin_wgl_sys", + "libloading 0.7.4", + "objc2", + "once_cell", + "raw-window-handle", + "wayland-sys 0.30.1", + "windows-sys 0.45.0", + "x11-dl", +] + +[[package]] +name = "glutin-winit" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "629a873fc04062830bfe8f97c03773bcd7b371e23bcc465d0a61448cd1588fa4" +dependencies = [ + "cfg_aliases", + "glutin", + "raw-window-handle", + "winit", +] + +[[package]] +name = "glutin_egl_sys" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af784eb26c5a68ec85391268e074f0aa618c096eadb5d6330b0911cf34fe57c5" +dependencies = [ + "gl_generator", + "windows-sys 0.45.0", +] + +[[package]] +name = "glutin_glx_sys" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b53cb5fe568964aa066a3ba91eac5ecbac869fb0842cd0dc9e412434f1a1494" +dependencies = [ + "gl_generator", + "x11-dl", +] + +[[package]] +name = "glutin_wgl_sys" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef89398e90033fc6bc65e9bd42fd29bbbfd483bda5b56dc5562f455550618165" +dependencies = [ + "gl_generator", +] + +[[package]] +name = "hash32" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67" @@ -762,6 +1766,12 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +[[package]] +name = "hashbrown" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" + [[package]] name = "heapless" version = "0.7.16" @@ -815,12 +1825,45 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "home" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +dependencies = [ + "windows-sys 0.48.0", +] + [[package]] name = "ident_case" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" +[[package]] +name = "idna" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "image" +version = "0.24.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f3dfdbdd72063086ff443e297b61695500514b1e41095b6fb9a5ab48a70a711" +dependencies = [ + "bytemuck", + "byteorder", + "color_quant", + "num-rational", + "num-traits", + "png", +] + [[package]] name = "indenter" version = "0.3.3" @@ -834,7 +1877,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +dependencies = [ + "equivalent", + "hashbrown 0.14.0", +] + +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", ] [[package]] @@ -845,7 +1910,7 @@ checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ "hermit-abi 0.3.1", "libc", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -857,7 +1922,7 @@ dependencies = [ "hermit-abi 0.3.1", "io-lifetimes", "rustix", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -866,18 +1931,114 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +[[package]] +name = "jni" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" +dependencies = [ + "cesu8", + "cfg-if", + "combine", + "jni-sys", + "log", + "thiserror", + "walkdir", + "windows-sys 0.45.0", +] + +[[package]] +name = "jni-sys" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" + +[[package]] +name = "jobserver" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "khronos_api" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" + [[package]] name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +[[package]] +name = "lexical-parse-float" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683b3a5ebd0130b8fb52ba0bdc718cc56815b6a097e28ae5a6997d0ad17dc05f" +dependencies = [ + "lexical-parse-integer", + "lexical-util", + "static_assertions", +] + +[[package]] +name = "lexical-parse-integer" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d0994485ed0c312f6d965766754ea177d07f9c00c9b82a5ee62ed5b47945ee9" +dependencies = [ + "lexical-util", + "static_assertions", +] + +[[package]] +name = "lexical-util" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5255b9ff16ff898710eb9eb63cb39248ea8a5bb036bea8085b1a767ff6c4e3fc" +dependencies = [ + "static_assertions", +] + [[package]] name = "libc" version = "0.2.146" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b" +[[package]] +name = "libloading" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +dependencies = [ + "cfg-if", + "winapi", +] + +[[package]] +name = "libloading" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d580318f95776505201b28cf98eb1fa5e4be3b689633ba6a3e6cd880ff22d8cb" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + [[package]] name = "libm" version = "0.2.7" @@ -918,7 +2079,7 @@ checksum = "0f41b6bb1f0a9cf25c0f184469382e73112fa0071b206ef5b3c6b235c7353a84" dependencies = [ "accelerometer", "embedded-hal 0.2.7", - "num_enum", + "num_enum 0.5.11", ] [[package]] @@ -931,6 +2092,12 @@ dependencies = [ "scopeguard", ] +[[package]] +name = "log" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" + [[package]] name = "lora-cli" version = "0.1.0" @@ -962,12 +2129,58 @@ dependencies = [ "libc", ] +[[package]] +name = "malloc_buf" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" +dependencies = [ + "libc", +] + +[[package]] +name = "matrixmultiply" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "090126dc04f95dc0d1c1c91f61bdd474b3930ca064c1edc8a849da2c6cbe1e77" +dependencies = [ + "autocfg", + "rawpointer", +] + [[package]] name = "memchr" version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +[[package]] +name = "memmap2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" +dependencies = [ + "libc", +] + +[[package]] +name = "memoffset" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +dependencies = [ + "autocfg", +] + +[[package]] +name = "memoffset" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +dependencies = [ + "autocfg", +] + [[package]] name = "micromath" version = "1.1.1" @@ -992,6 +2205,28 @@ dependencies = [ "adler", ] +[[package]] +name = "miniz_oxide" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +dependencies = [ + "adler", + "simd-adler32", +] + +[[package]] +name = "mio" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" +dependencies = [ + "libc", + "log", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.48.0", +] + [[package]] name = "mpu6050" version = "0.1.6" @@ -1000,7 +2235,7 @@ checksum = "abd67852b244bcca82aa14dd89d50795c065fa598e435c0fe2724663f6e3b9f2" dependencies = [ "embedded-hal 0.2.7", "libm", - "nalgebra", + "nalgebra 0.31.4", ] [[package]] @@ -1013,10 +2248,37 @@ dependencies = [ "num-complex", "num-rational", "num-traits", - "simba", + "simba 0.7.3", + "typenum", +] + +[[package]] +name = "nalgebra" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "307ed9b18cc2423f29e83f84fd23a8e73628727990181f18641a8b5dc2ab1caa" +dependencies = [ + "approx", + "matrixmultiply", + "nalgebra-macros", + "num-complex", + "num-rational", + "num-traits", + "simba 0.8.1", "typenum", ] +[[package]] +name = "nalgebra-macros" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91761aed67d03ad966ef783ae962ef9bbaca728d2dd7ceb7939ec110fffad998" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "nb" version = "0.1.3" @@ -1035,6 +2297,60 @@ dependencies = [ "defmt", ] +[[package]] +name = "ndk" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" +dependencies = [ + "bitflags 1.3.2", + "jni-sys", + "ndk-sys", + "num_enum 0.5.11", + "raw-window-handle", + "thiserror", +] + +[[package]] +name = "ndk-context" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" + +[[package]] +name = "ndk-sys" +version = "0.4.1+23.1.7779620" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cf2aae958bd232cac5069850591667ad422d263686d75b52a065f9badeee5a3" +dependencies = [ + "jni-sys", +] + +[[package]] +name = "nix" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" +dependencies = [ + "bitflags 1.3.2", + "cfg-if", + "libc", + "memoffset 0.6.5", +] + +[[package]] +name = "nix" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f346ff70e7dbfd675fe90590b92d59ef2de15a8779ae305ebcbfd3f0caf59be4" +dependencies = [ + "autocfg", + "bitflags 1.3.2", + "cfg-if", + "libc", + "memoffset 0.6.5", +] + [[package]] name = "nix" version = "0.26.2" @@ -1044,6 +2360,7 @@ dependencies = [ "bitflags 1.3.2", "cfg-if", "libc", + "memoffset 0.7.1", "static_assertions", ] @@ -1062,6 +2379,23 @@ dependencies = [ "serde_with", ] +[[package]] +name = "nohash-hasher" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" + +[[package]] +name = "noise" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ba869e17168793186c10ca82c7079a4ffdeac4f1a7d9e755b9491c028180e40" +dependencies = [ + "num-traits", + "rand 0.7.3", + "rand_xorshift", +] + [[package]] name = "nom" version = "7.1.3" @@ -1118,7 +2452,16 @@ version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" dependencies = [ - "num_enum_derive", + "num_enum_derive 0.5.11", +] + +[[package]] +name = "num_enum" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" +dependencies = [ + "num_enum_derive 0.6.1", ] [[package]] @@ -1127,11 +2470,79 @@ version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" dependencies = [ + "proc-macro-crate", "proc-macro2", "quote", "syn 1.0.109", ] +[[package]] +name = "num_enum_derive" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.29", +] + +[[package]] +name = "objc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" +dependencies = [ + "malloc_buf", +] + +[[package]] +name = "objc-foundation" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" +dependencies = [ + "block", + "objc", + "objc_id", +] + +[[package]] +name = "objc-sys" +version = "0.2.0-beta.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b9834c1e95694a05a828b59f55fa2afec6288359cda67146126b3f90a55d7" + +[[package]] +name = "objc2" +version = "0.3.0-beta.3.patch-leaks.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e01640f9f2cb1220bbe80325e179e532cb3379ebcd1bf2279d703c19fe3a468" +dependencies = [ + "block2", + "objc-sys", + "objc2-encode", +] + +[[package]] +name = "objc2-encode" +version = "2.0.0-pre.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abfcac41015b00a120608fdaa6938c44cb983fee294351cc4bac7638b4e50512" +dependencies = [ + "objc-sys", +] + +[[package]] +name = "objc_id" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b" +dependencies = [ + "objc", +] + [[package]] name = "object" version = "0.30.4" @@ -1147,6 +2558,34 @@ version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +[[package]] +name = "orbclient" +version = "0.3.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8378ac0dfbd4e7895f2d2c1f1345cab3836910baf3a300b000d04250f0c8428f" +dependencies = [ + "redox_syscall", +] + +[[package]] +name = "ordered-stream" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aa2b01e1d916879f73a53d01d1d6cee68adbb31d6d9177a8cfce093cced1d50" +dependencies = [ + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "owned_ttf_parser" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "706de7e2214113d63a8238d1910463cfce781129a6f263d13fdb09ff64355ba4" +dependencies = [ + "ttf-parser", +] + [[package]] name = "owo-colors" version = "3.5.0" @@ -1172,12 +2611,47 @@ dependencies = [ "cortex-m 0.7.7", ] +[[package]] +name = "parking" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e" + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets 0.48.0", +] + [[package]] name = "paste" version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +[[package]] +name = "percent-encoding" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" + [[package]] name = "pin-project-lite" version = "0.2.9" @@ -1196,12 +2670,51 @@ version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +[[package]] +name = "png" +version = "0.17.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd75bf2d8dd3702b9707cdbc56a5b9ef42cec752eb8b3bafc01234558442aa64" +dependencies = [ + "bitflags 1.3.2", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide 0.7.1", +] + +[[package]] +name = "polling" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" +dependencies = [ + "autocfg", + "bitflags 1.3.2", + "cfg-if", + "concurrent-queue", + "libc", + "log", + "pin-project-lite", + "windows-sys 0.48.0", +] + [[package]] name = "ppv-lite86" version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit", +] + [[package]] name = "proc-macro-error" version = "1.0.4" @@ -1228,9 +2741,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.59" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aeca18b86b413c660b781aa319e4e2648a3e6f9eadc9b47e9038e6fe9f3451b" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] @@ -1244,6 +2757,19 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", +] + [[package]] name = "rand" version = "0.8.5" @@ -1251,8 +2777,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha", - "rand_core", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", ] [[package]] @@ -1262,7 +2798,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", ] [[package]] @@ -1271,7 +2816,46 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom", + "getrandom 0.2.10", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_xorshift" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77d416b86801d23dde1aa643023b775c3a462efc0ed96443add11546cdf1dca8" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "raw-window-handle" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" + +[[package]] +name = "rawpointer" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" + +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags 1.3.2", ] [[package]] @@ -1326,7 +2910,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a38200e4b59d03545fc0f1055cde51fce8cb3be632285ad9874fcf287f4ebc75" dependencies = [ - "indexmap", + "indexmap 1.9.3", "proc-macro-error", "proc-macro2", "quote", @@ -1392,7 +2976,7 @@ dependencies = [ "io-lifetimes", "libc", "linux-raw-sys", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -1401,12 +2985,49 @@ version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +[[package]] +name = "safe_arch" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f398075ce1e6a179b46f51bd88d0598b92b00d3551f1a2d4ac49e771b56ac354" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + [[package]] name = "scopeguard" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +[[package]] +name = "sctk-adwaita" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cda4e97be1fd174ccc2aae81c8b694e803fa99b34e8fd0f057a9d70698e3ed09" +dependencies = [ + "ab_glyph", + "log", + "memmap2", + "smithay-client-toolkit", + "tiny-skia", +] + [[package]] name = "semver" version = "0.9.0" @@ -1430,9 +3051,9 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.163" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" +checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" dependencies = [ "serde_derive", ] @@ -1450,15 +3071,41 @@ dependencies = [ "serde", ] +[[package]] +name = "serde-csv-core" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "704f0db0f651c19b2424ed0399734f477cca2ffd961f00c51ee4d75d74d19c54" +dependencies = [ + "atoi", + "csv-core", + "heapless", + "itoa", + "lexical-parse-float", + "ryu", + "serde", +] + [[package]] name = "serde_derive" -version = "1.0.163" +version = "1.0.188" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.29", +] + +[[package]] +name = "serde_repr" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" +checksum = "6f0a21fba416426ac927b1691996e82079f8b6156e920c85345f135b2e9ba2de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.29", ] [[package]] @@ -1481,7 +3128,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.29", ] [[package]] @@ -1496,12 +3143,23 @@ dependencies = [ "cfg-if", "libudev", "mach2", - "nix", + "nix 0.26.2", "regex", "scopeguard", "winapi", ] +[[package]] +name = "sha1" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + [[package]] name = "shared-bus" version = "0.2.4" @@ -1515,6 +3173,25 @@ dependencies = [ "nb 0.1.3", ] +[[package]] +name = "signal-hook" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" +dependencies = [ + "libc", + "signal-hook-registry", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +dependencies = [ + "libc", +] + [[package]] name = "simba" version = "0.7.3" @@ -1528,67 +3205,161 @@ dependencies = [ ] [[package]] -name = "spin" -version = "0.9.8" +name = "simba" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +checksum = "061507c94fc6ab4ba1c9a0305018408e312e17c041eb63bef8aa726fa33aceae" dependencies = [ - "lock_api", + "approx", + "num-complex", + "num-traits", + "paste", + "wide", ] [[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - -[[package]] -name = "static_assertions" -version = "1.1.0" +name = "simd-adler32" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" [[package]] -name = "stm32f4" -version = "0.15.1" +name = "slab" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb94729242cd1aebe6dab42a2ca0131985ae93bc3ab2751b680df724bb35528d" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ - "bare-metal 1.0.0", - "cortex-m 0.7.7", - "cortex-m-rt", - "vcell", + "autocfg", ] [[package]] -name = "stm32f4xx-hal" -version = "0.16.0" +name = "slotmap" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "431cd6045c6644beb39d421a37967e7f0708bce98ed6e38559137e09d5ae6d81" +checksum = "e1e08e261d0e8f5c43123b7adf3e4ca1690d655377ac93a03b2c9d3e98de1342" dependencies = [ - "bare-metal 1.0.0", - "bitflags 2.3.1", - "cortex-m 0.7.7", - "cortex-m-rt", - "defmt", - "embedded-dma", - "embedded-hal 0.2.7", - "embedded-hal 1.0.0-alpha.8", - "embedded-storage", - "fugit", - "fugit-timer", - "nb 1.1.0", - "rand_core", - "stm32f4", - "time", - "void", + "version_check", ] [[package]] -name = "strsim" -version = "0.10.0" +name = "smallvec" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" + +[[package]] +name = "smithay-client-toolkit" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f307c47d32d2715eb2e0ece5589057820e0e5e70d07c247d1063e844e107f454" +dependencies = [ + "bitflags 1.3.2", + "calloop", + "dlib", + "lazy_static", + "log", + "memmap2", + "nix 0.24.3", + "pkg-config", + "wayland-client", + "wayland-cursor", + "wayland-protocols", +] + +[[package]] +name = "smithay-clipboard" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a345c870a1fae0b1b779085e81b51e614767c239e93503588e54c5b17f4b0e8" +dependencies = [ + "smithay-client-toolkit", + "wayland-client", +] + +[[package]] +name = "socket2" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "stm32f4" +version = "0.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb94729242cd1aebe6dab42a2ca0131985ae93bc3ab2751b680df724bb35528d" +dependencies = [ + "bare-metal 1.0.0", + "cortex-m 0.7.7", + "cortex-m-rt", + "vcell", +] + +[[package]] +name = "stm32f4xx-hal" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "431cd6045c6644beb39d421a37967e7f0708bce98ed6e38559137e09d5ae6d81" +dependencies = [ + "bare-metal 1.0.0", + "bitflags 2.3.1", + "cortex-m 0.7.7", + "cortex-m-rt", + "defmt", + "embedded-dma", + "embedded-hal 0.2.7", + "embedded-hal 1.0.0-alpha.8", + "embedded-storage", + "fugit", + "fugit-timer", + "nb 1.1.0", + "rand_core 0.6.4", + "stm32f4", + "time", + "void", +] + +[[package]] +name = "str-buf" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0" + +[[package]] +name = "strict-num" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "syn" @@ -1603,15 +3374,29 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.18" +version = "2.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e" +checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "tempfile" +version = "3.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6" +dependencies = [ + "autocfg", + "cfg-if", + "fastrand", + "redox_syscall", + "rustix", + "windows-sys 0.48.0", +] + [[package]] name = "thiserror" version = "1.0.40" @@ -1629,16 +3414,20 @@ checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.29", ] [[package]] name = "time" -version = "0.3.22" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea9e1b3cf1243ae005d9e74085d4d542f3125458f3a81af210d901dcd7411efd" +checksum = "17f6bb557fd245c28e6411aa56b6403c689ad95061f50e4be16c274e70a17e48" dependencies = [ + "deranged", + "itoa", + "serde", "time-core", + "time-macros", ] [[package]] @@ -1647,6 +3436,55 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" +[[package]] +name = "time-macros" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a942f44339478ef67935ab2bbaec2fb0322496cf3cbe84b261e06ac3814c572" +dependencies = [ + "time-core", +] + +[[package]] +name = "tiny-skia" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df8493a203431061e901613751931f047d1971337153f96d0e5e363d6dbf6a67" +dependencies = [ + "arrayref", + "arrayvec", + "bytemuck", + "cfg-if", + "png", + "tiny-skia-path", +] + +[[package]] +name = "tiny-skia-path" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adbfb5d3f3dd57a0e11d12f4f13d4ebbbc1b5c15b7ab0a156d030b21da5f677c" +dependencies = [ + "arrayref", + "bytemuck", + "strict-num", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + [[package]] name = "toml" version = "0.5.11" @@ -1656,18 +3494,109 @@ dependencies = [ "serde", ] +[[package]] +name = "toml_datetime" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" + +[[package]] +name = "toml_edit" +version = "0.19.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" +dependencies = [ + "indexmap 2.0.0", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tracing" +version = "0.1.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +dependencies = [ + "cfg-if", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.29", +] + +[[package]] +name = "tracing-core" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "ttf-parser" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a464a4b34948a5f67fddd2b823c62d9d92e44be75058b99939eae6c5b6960b33" + [[package]] name = "typenum" version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +[[package]] +name = "uds_windows" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce65604324d3cce9b966701489fbd0cf318cb1f7bd9dd07ac9a4ee6fb791930d" +dependencies = [ + "tempfile", + "winapi", +] + +[[package]] +name = "unicode-bidi" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" + [[package]] name = "unicode-ident" version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "url" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + [[package]] name = "utf8parse" version = "0.2.1" @@ -1680,6 +3609,12 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77439c1b53d2303b20d9459b1ade71a83c716e3f9c34f3228c00e6f185d6c002" +[[package]] +name = "vec_map" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" + [[package]] name = "version_check" version = "0.9.4" @@ -1701,12 +3636,222 @@ dependencies = [ "vcell", ] +[[package]] +name = "waker-fn" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" + +[[package]] +name = "walkdir" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasm-bindgen" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.29", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.29", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" + +[[package]] +name = "wayland-client" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f3b068c05a039c9f755f881dc50f01732214f5685e379829759088967c46715" +dependencies = [ + "bitflags 1.3.2", + "downcast-rs", + "libc", + "nix 0.24.3", + "scoped-tls", + "wayland-commons", + "wayland-scanner", + "wayland-sys 0.29.5", +] + +[[package]] +name = "wayland-commons" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8691f134d584a33a6606d9d717b95c4fa20065605f798a3f350d78dced02a902" +dependencies = [ + "nix 0.24.3", + "once_cell", + "smallvec", + "wayland-sys 0.29.5", +] + +[[package]] +name = "wayland-cursor" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6865c6b66f13d6257bef1cd40cbfe8ef2f150fb8ebbdb1e8e873455931377661" +dependencies = [ + "nix 0.24.3", + "wayland-client", + "xcursor", +] + +[[package]] +name = "wayland-protocols" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b950621f9354b322ee817a23474e479b34be96c2e909c14f7bc0100e9a970bc6" +dependencies = [ + "bitflags 1.3.2", + "wayland-client", + "wayland-commons", + "wayland-scanner", +] + +[[package]] +name = "wayland-scanner" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f4303d8fa22ab852f789e75a967f0a2cdc430a607751c0499bada3e451cbd53" +dependencies = [ + "proc-macro2", + "quote", + "xml-rs", +] + +[[package]] +name = "wayland-sys" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be12ce1a3c39ec7dba25594b97b42cb3195d54953ddb9d3d95a7c3902bc6e9d4" +dependencies = [ + "dlib", + "lazy_static", + "pkg-config", +] + +[[package]] +name = "wayland-sys" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96b2a02ac608e07132978689a6f9bf4214949c85998c247abadd4f4129b1aa06" +dependencies = [ + "dlib", + "lazy_static", + "log", + "pkg-config", +] + +[[package]] +name = "web-sys" +version = "0.3.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webbrowser" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2c79b77f525a2d670cb40619d7d9c673d09e0666f72c591ebd7861f84a87e57" +dependencies = [ + "core-foundation", + "home", + "jni", + "log", + "ndk-context", + "objc", + "raw-window-handle", + "url", + "web-sys", +] + +[[package]] +name = "wide" +version = "0.7.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa469ffa65ef7e0ba0f164183697b89b854253fd31aeb92358b7b6155177d62f" +dependencies = [ + "bytemuck", + "safe_arch", +] + [[package]] name = "winapi" version = "0.3.9" @@ -1723,19 +3868,94 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi", +] + +[[package]] +name = "winapi-wsapoll" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c17110f57155602a80dca10be03852116403c9ff3cd25b079d666f2aa3df6e" +dependencies = [ + "winapi", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-targets 0.48.0", +] + +[[package]] +name = "windows-implement" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e2ee588991b9e7e6c8338edf3333fbe4da35dc72092643958ebb43f0ab2c49c" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "windows-interface" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6fb8df20c9bcaa8ad6ab513f7b40104840c8867d5751126e4df3b08388d0cc7" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + [[package]] name = "windows-sys" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets", + "windows-targets 0.48.0", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", ] [[package]] @@ -1744,57 +3964,201 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.48.0", + "windows_aarch64_msvc 0.48.0", + "windows_i686_gnu 0.48.0", + "windows_i686_msvc 0.48.0", + "windows_x86_64_gnu 0.48.0", + "windows_x86_64_gnullvm 0.48.0", + "windows_x86_64_msvc 0.48.0", ] +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + [[package]] name = "windows_aarch64_gnullvm" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + [[package]] name = "windows_aarch64_msvc" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + [[package]] name = "windows_i686_gnu" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + [[package]] name = "windows_i686_msvc" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + [[package]] name = "windows_x86_64_gnu" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + [[package]] name = "windows_x86_64_msvc" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +[[package]] +name = "winit" +version = "0.28.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "866db3f712fffba75d31bf0cdecf357c8aeafd158c5b7ab51dba2a2b2d47f196" +dependencies = [ + "android-activity", + "bitflags 1.3.2", + "cfg_aliases", + "core-foundation", + "core-graphics", + "dispatch", + "instant", + "libc", + "log", + "mio", + "ndk", + "objc2", + "once_cell", + "orbclient", + "percent-encoding", + "raw-window-handle", + "redox_syscall", + "sctk-adwaita", + "smithay-client-toolkit", + "wasm-bindgen", + "wayland-client", + "wayland-commons", + "wayland-protocols", + "wayland-scanner", + "web-sys", + "windows-sys 0.45.0", + "x11-dl", +] + +[[package]] +name = "winnow" +version = "0.5.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" +dependencies = [ + "memchr", +] + +[[package]] +name = "x11-dl" +version = "2.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" +dependencies = [ + "libc", + "once_cell", + "pkg-config", +] + +[[package]] +name = "x11rb" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "592b4883219f345e712b3209c62654ebda0bb50887f330cbd018d0f654bfd507" +dependencies = [ + "gethostname", + "nix 0.24.3", + "winapi", + "winapi-wsapoll", + "x11rb-protocol", +] + +[[package]] +name = "x11rb-protocol" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56b245751c0ac9db0e006dc812031482784e434630205a93c73cfefcaabeac67" +dependencies = [ + "nix 0.24.3", +] + +[[package]] +name = "xcursor" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "463705a63313cd4301184381c5e8042f0a7e9b4bb63653f216311d4ae74690b7" +dependencies = [ + "nom", +] + +[[package]] +name = "xdg-home" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2769203cd13a0c6015d515be729c526d041e9cf2c0cc478d57faee85f40c6dcd" +dependencies = [ + "nix 0.26.2", + "winapi", +] + +[[package]] +name = "xml-rs" +version = "0.8.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47430998a7b5d499ccee752b41567bc3afc57e1327dc855b1a2aa44ce29b5fa1" + [[package]] name = "xtask" version = "0.1.0" @@ -1804,3 +4168,107 @@ dependencies = [ "colored", "eyre", ] + +[[package]] +name = "zbus" +version = "3.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31de390a2d872e4cd04edd71b425e29853f786dc99317ed72d73d6fcf5ebb948" +dependencies = [ + "async-broadcast", + "async-executor", + "async-fs", + "async-io", + "async-lock", + "async-process", + "async-recursion", + "async-task", + "async-trait", + "blocking", + "byteorder", + "derivative", + "enumflags2", + "event-listener", + "futures-core", + "futures-sink", + "futures-util", + "hex", + "nix 0.26.2", + "once_cell", + "ordered-stream", + "rand 0.8.5", + "serde", + "serde_repr", + "sha1", + "static_assertions", + "tracing", + "uds_windows", + "winapi", + "xdg-home", + "zbus_macros", + "zbus_names", + "zvariant", +] + +[[package]] +name = "zbus_macros" +version = "3.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d1794a946878c0e807f55a397187c11fc7a038ba5d868e7db4f3bd7760bc9d" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "regex", + "syn 1.0.109", + "zvariant_utils", +] + +[[package]] +name = "zbus_names" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb80bb776dbda6e23d705cf0123c3b95df99c4ebeaec6c2599d4a5419902b4a9" +dependencies = [ + "serde", + "static_assertions", + "zvariant", +] + +[[package]] +name = "zvariant" +version = "3.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44b291bee0d960c53170780af148dca5fa260a63cdd24f1962fa82e03e53338c" +dependencies = [ + "byteorder", + "enumflags2", + "libc", + "serde", + "static_assertions", + "zvariant_derive", +] + +[[package]] +name = "zvariant_derive" +version = "3.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "934d7a7dfc310d6ee06c87ffe88ef4eca7d3e37bb251dece2ef93da8f17d8ecd" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", + "zvariant_utils", +] + +[[package]] +name = "zvariant_utils" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7234f0d811589db492d16893e3f21e8e2fd282e6d01b0cddee310322062cc200" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] diff --git a/crates/cansat-core/src/measurements.rs b/crates/cansat-core/src/measurements.rs index 0f4790f..488c561 100644 --- a/crates/cansat-core/src/measurements.rs +++ b/crates/cansat-core/src/measurements.rs @@ -3,7 +3,7 @@ use crate::quantity::{Distance, Pressure, Temperature}; use serde::{de, Deserializer, Serialize}; -#[derive(Default, serde::Serialize, serde::Deserialize)] +#[derive(Default, serde::Serialize, serde::Deserialize, Debug)] pub struct Measurements { #[serde(serialize_with = "option_temperature_celsius")] #[serde(deserialize_with = "f32_as_optional_temperature_in_celcius")] @@ -17,8 +17,6 @@ pub struct Measurements { #[serde(deserialize_with = "f32_as_optional_distance_in_meters")] pub altitude: Option, - pub nmea: Option, - #[serde(serialize_with = "option_tuple_f32x3")] pub acceleration: Option<(f32, f32, f32)>, @@ -27,6 +25,8 @@ pub struct Measurements { #[serde(serialize_with = "option_tuple_f32x2")] pub rollpitch: Option<(f32, f32)>, + + pub nmea: Option, } fn option_temperature_celsius(v: &Option, s: S) -> Result diff --git a/crates/cansat-core/src/quantity.rs b/crates/cansat-core/src/quantity.rs index 326843c..53f69bc 100644 --- a/crates/cansat-core/src/quantity.rs +++ b/crates/cansat-core/src/quantity.rs @@ -1,7 +1,7 @@ use core::f32::consts::PI; use derive_more::{Add, Div, Mul, Sub}; -#[derive(Default, PartialEq, Clone, Copy, PartialOrd, Add, Sub, Mul, Div)] +#[derive(Default, PartialEq, Clone, Copy, PartialOrd, Add, Sub, Mul, Div, Debug)] pub struct Pressure(f32); impl Pressure { @@ -30,7 +30,7 @@ impl core::ops::Div for Pressure { } } -#[derive(PartialEq, Clone, Copy, PartialOrd, Add, Sub, Mul, Div)] +#[derive(PartialEq, Clone, Copy, PartialOrd, Add, Sub, Mul, Div, Debug)] pub struct Temperature(f32); impl Temperature { @@ -51,7 +51,7 @@ impl Temperature { } } -#[derive(Default, PartialEq, Clone, Copy, PartialOrd, Add, Sub, Mul, Div)] +#[derive(Default, PartialEq, Clone, Copy, PartialOrd, Add, Sub, Mul, Div, Debug)] pub struct Distance(f32); impl Distance { @@ -80,7 +80,7 @@ impl core::ops::Div for Distance { } } -#[derive(Default, PartialEq, Clone, Copy, PartialOrd, Add, Sub, Mul, Div)] +#[derive(Default, PartialEq, Clone, Copy, PartialOrd, Add, Sub, Mul, Div, Debug)] pub struct Angle(f32); impl Angle { diff --git a/tools/flight-visualizer/Cargo.toml b/tools/flight-visualizer/Cargo.toml index 41e0dfd..6305428 100644 --- a/tools/flight-visualizer/Cargo.toml +++ b/tools/flight-visualizer/Cargo.toml @@ -13,6 +13,7 @@ time = { version = "0.3.27", features = ["formatting"] } once_cell = "1.17.1" derive-new = "0.5.9" nalgebra = "0.32.3" -cansat-core = { git = "https://github.com/0xf4lc0n/cansat", branch = "measurements_deserialize" } +cansat-core = { path = "../../crates/cansat-core" } csv-core = "0.1.10" serde-csv-core = { version = "0.2.0" } +regex = "1.8.1" diff --git a/tools/flight-visualizer/src/app.rs b/tools/flight-visualizer/src/app.rs index c5a3d10..ccc543a 100644 --- a/tools/flight-visualizer/src/app.rs +++ b/tools/flight-visualizer/src/app.rs @@ -1,10 +1,12 @@ -use crate::data::{Acceleration, BmeData, Data, DataRecord, Orientation}; +use crate::data::{Acceleration, BmeData, Data, DataRecord, Orientation, RollPitch, SignalStrength}; use crate::ui; use cansat_core::Measurements; use eframe::Frame; use egui::Context; use std::sync::{Arc, Mutex}; use std::time::Duration; +use once_cell::sync::Lazy; +use regex::Regex; pub struct FlightVisualizerApp { data: Arc>, @@ -48,12 +50,45 @@ impl FlightVisualizerApp { Ok((measurements, _)) => { Self::process_measurements(data_arc, measurements); } - Err(e) => { - println!("[STDIN][ ERROR ]### {}", e); + Err(_) => { + match Self::process_signal_strength(line) { + Ok((signal_strength, noise_level)) => + data_arc.lock().unwrap().set_signal_strength(SignalStrength::new( + signal_strength, + noise_level, + )), + Err(e) => println!("[STDIN][ ERROR ]### this is not a measurements or signal strength: {}", e) + } } } } + fn process_signal_strength(line: String) -> Result<(i32, i32),String> { + static SIGNAL_REGEX: Lazy = + Lazy::new(|| Regex::new(r#"Signal strength: (-?[0-9]+) dBm, Noise level: (-?[0-9]+) dB"#).unwrap()); + + let captures = + SIGNAL_REGEX.captures(&line).ok_or("Failed to capture signal strength")?; + + let signal_strength:i32 = + captures + .get(1) + .map(|g| g.as_str().parse()) + .transpose() + .map_err(|_| "Failed to parse signal strength".to_string())? + .unwrap(); + + let noise_level:i32 = + captures + .get(2) + .map(|g| g.as_str().parse()) + .transpose() + .map_err(|_| "Failed to parse noise level".to_string())? + .unwrap(); + + Ok((signal_strength, noise_level)) + } + fn process_measurements(data_arc: &Arc>, measurements: Measurements) { let time = std::time::SystemTime::now() .duration_since(std::time::UNIX_EPOCH) @@ -61,7 +96,7 @@ impl FlightVisualizerApp { .as_secs_f64(); let mut data = data_arc.lock().unwrap(); - + eprintln!("{:?}", measurements); data.push(DataRecord::new( time, BmeData::new( @@ -69,19 +104,22 @@ impl FlightVisualizerApp { measurements.pressure.map(|v| v.as_pascals() as f64), measurements.altitude.map(|v| v.as_meters() as f64), ), - Orientation::new( - Some(f64::sin(time / 8.0)), - Some(f64::sin(time / 15.0)), - Some(f64::sin(time / 2.0)), - ), - Acceleration::new(Some(0.0), Some(0.0), Some(0.0)), + measurements.gyro + .map(|g| Orientation::new_some(g.0 as f64, g.1 as f64, g.2 as f64)) + .unwrap_or(Orientation::new_none()), + measurements.acceleration + .map(|a| Acceleration::new_some(a.0 as f64, a.1 as f64, a.2 as f64)) + .unwrap_or(Acceleration::new_none()), + measurements.rollpitch + .map(|rp| RollPitch::new_some(rp.0 as f64, rp.1 as f64)) + .unwrap_or(RollPitch::new_none()), )); } } impl eframe::App for FlightVisualizerApp { fn update(&mut self, ctx: &Context, _frame: &mut Frame) { ui::draw_ui(ctx, &self.data.lock().unwrap()); - ctx.request_repaint_after(Duration::from_millis(1000)); + ctx.request_repaint_after(Duration::from_millis(33)); } } diff --git a/tools/flight-visualizer/src/data.rs b/tools/flight-visualizer/src/data.rs index 64e065e..837a22c 100644 --- a/tools/flight-visualizer/src/data.rs +++ b/tools/flight-visualizer/src/data.rs @@ -9,12 +9,13 @@ pub struct Data { signal_strength: SignalStrength, } -#[derive(new)] +#[derive(new, Debug)] pub struct DataRecord { pub time: f64, pub bme: BmeData, pub orientation: Orientation, pub acceleration: Acceleration, + pub rollpitch: RollPitch, } #[derive(new, Debug)] @@ -44,6 +45,12 @@ pub struct Acceleration { pub z: Option, } +#[derive(new, Debug)] +pub struct RollPitch { + pub roll: Option, + pub pitch: Option +} + impl Data { pub fn new(data_points: usize) -> Self { Self { @@ -94,6 +101,37 @@ impl Default for Data { } } +impl Orientation { + pub fn new_none() -> Self { + Self::new(None, None, None) + } + + pub fn new_some(x: f64, y: f64, z: f64) -> Self { + Self::new(Some(x), Some(y), Some(z)) + } +} + + +impl Acceleration { + pub fn new_none() -> Self { + Self::new(None, None, None) + } + + pub fn new_some(x: f64, y: f64, z: f64) -> Self { + Self::new(Some(x), Some(y), Some(z)) + } +} + +impl RollPitch { + pub fn new_none() -> Self { + Self::new(None, None) + } + + pub fn new_some(roll: f64, pitch: f64) -> Self { + Self::new(Some(roll), Some(pitch)) + } +} + #[cfg(test)] mod test { use super::*; diff --git a/tools/flight-visualizer/src/ui.rs b/tools/flight-visualizer/src/ui.rs index dfd1496..a5d6856 100644 --- a/tools/flight-visualizer/src/ui.rs +++ b/tools/flight-visualizer/src/ui.rs @@ -79,7 +79,7 @@ fn ui_info_box(ui: &mut Ui, data: &Data) { let available_width = ui.available_width(); ui.vertical(|ui| { ui.set_width(available_width * 0.5); - ui.label(format!("Signal strength: {:?}", data.signal_strength())); + ui.label(format!("{:?}", data.signal_strength())); ui.separator(); let last_data = data.last_data(); @@ -94,6 +94,8 @@ fn ui_info_box(ui: &mut Ui, data: &Data) { ui.label(format!("Height: {:?}", last_data.bme.height)); ui.label(format!("{:?}", last_data.orientation)); ui.label(format!("{:?}", last_data.acceleration)); + ui.label(format!("Roll {:?}", last_data.rollpitch.roll)); + ui.label(format!("Pitch {:?}", last_data.rollpitch.pitch)); }); } @@ -152,9 +154,9 @@ fn ui_3d_panel(ui: &mut Ui, data: &Data) { ] .map(|p| p - Vector3::new(0.5, 0.5, 0.5)); - let rot_z = last_data.orientation.z.unwrap_or(0.0); - let rot_x = last_data.orientation.x.unwrap_or(0.0); - let rot_y = last_data.orientation.y.unwrap_or(0.0); + let rot_z = last_data.rollpitch.roll.unwrap_or(0.0); + let rot_x = last_data.rollpitch.pitch.unwrap_or(0.0) + std::f64::consts::PI / 2.0; + let rot_y = 0.0f64; // transform points let r1 = Matrix3::from([ diff --git a/tools/lora-cli/src/main.rs b/tools/lora-cli/src/main.rs index 956858c..8291a5f 100644 --- a/tools/lora-cli/src/main.rs +++ b/tools/lora-cli/src/main.rs @@ -138,7 +138,7 @@ fn receive(args: PortArgs) -> Result<()> { fn process_message(msg: &str) { let parsed = parse_received_message(msg).unwrap_or_else(|e| e.to_string()); - eprintln!("{parsed}"); + println!("{parsed}"); } struct Lora { @@ -248,6 +248,10 @@ fn parse_received_message(input: &str) -> Result { } fn format_cansat_data(data: &str) -> Result { + if true { + return Ok(data.to_string()); + } + let measurements = decode_cansat_data_from_string(data)?; let formatted = format!( From fb20b4296099ecd945eca6bd4b271fe1ecab232d Mon Sep 17 00:00:00 2001 From: Patryk Paluch Date: Fri, 8 Sep 2023 23:31:59 +0200 Subject: [PATCH 6/9] feat: better 3d --- tools/flight-visualizer/src/app.rs | 65 +++++++++++++++------------- tools/flight-visualizer/src/data.rs | 3 +- tools/flight-visualizer/src/ui.rs | 67 ++++++++++++++++++++--------- 3 files changed, 83 insertions(+), 52 deletions(-) diff --git a/tools/flight-visualizer/src/app.rs b/tools/flight-visualizer/src/app.rs index ccc543a..797fd43 100644 --- a/tools/flight-visualizer/src/app.rs +++ b/tools/flight-visualizer/src/app.rs @@ -1,12 +1,14 @@ -use crate::data::{Acceleration, BmeData, Data, DataRecord, Orientation, RollPitch, SignalStrength}; +use crate::data::{ + Acceleration, BmeData, Data, DataRecord, Orientation, RollPitch, SignalStrength, +}; use crate::ui; use cansat_core::Measurements; use eframe::Frame; use egui::Context; -use std::sync::{Arc, Mutex}; -use std::time::Duration; use once_cell::sync::Lazy; use regex::Regex; +use std::sync::{Arc, Mutex}; +use std::time::Duration; pub struct FlightVisualizerApp { data: Arc>, @@ -50,41 +52,41 @@ impl FlightVisualizerApp { Ok((measurements, _)) => { Self::process_measurements(data_arc, measurements); } - Err(_) => { + Err(ee) => { match Self::process_signal_strength(line) { Ok((signal_strength, noise_level)) => data_arc.lock().unwrap().set_signal_strength(SignalStrength::new( signal_strength, noise_level, )), - Err(e) => println!("[STDIN][ ERROR ]### this is not a measurements or signal strength: {}", e) + Err(e) => println!("[STDIN][ ERROR ]### this is not a measurements or signal strength: {} ### {}", e, ee) } } } } - fn process_signal_strength(line: String) -> Result<(i32, i32),String> { - static SIGNAL_REGEX: Lazy = - Lazy::new(|| Regex::new(r#"Signal strength: (-?[0-9]+) dBm, Noise level: (-?[0-9]+) dB"#).unwrap()); - - let captures = - SIGNAL_REGEX.captures(&line).ok_or("Failed to capture signal strength")?; - - let signal_strength:i32 = - captures - .get(1) - .map(|g| g.as_str().parse()) - .transpose() - .map_err(|_| "Failed to parse signal strength".to_string())? - .unwrap(); - - let noise_level:i32 = - captures - .get(2) - .map(|g| g.as_str().parse()) - .transpose() - .map_err(|_| "Failed to parse noise level".to_string())? - .unwrap(); + fn process_signal_strength(line: String) -> Result<(i32, i32), String> { + static SIGNAL_REGEX: Lazy = Lazy::new(|| { + Regex::new(r#"Signal strength: (-?[0-9]+) dBm, Noise level: (-?[0-9]+) dB"#).unwrap() + }); + + let captures = SIGNAL_REGEX + .captures(&line) + .ok_or("Failed to capture signal strength")?; + + let signal_strength: i32 = captures + .get(1) + .map(|g| g.as_str().parse()) + .transpose() + .map_err(|_| "Failed to parse signal strength".to_string())? + .unwrap(); + + let noise_level: i32 = captures + .get(2) + .map(|g| g.as_str().parse()) + .transpose() + .map_err(|_| "Failed to parse noise level".to_string())? + .unwrap(); Ok((signal_strength, noise_level)) } @@ -104,13 +106,16 @@ impl FlightVisualizerApp { measurements.pressure.map(|v| v.as_pascals() as f64), measurements.altitude.map(|v| v.as_meters() as f64), ), - measurements.gyro + measurements + .gyro .map(|g| Orientation::new_some(g.0 as f64, g.1 as f64, g.2 as f64)) .unwrap_or(Orientation::new_none()), - measurements.acceleration + measurements + .acceleration .map(|a| Acceleration::new_some(a.0 as f64, a.1 as f64, a.2 as f64)) .unwrap_or(Acceleration::new_none()), - measurements.rollpitch + measurements + .rollpitch .map(|rp| RollPitch::new_some(rp.0 as f64, rp.1 as f64)) .unwrap_or(RollPitch::new_none()), )); diff --git a/tools/flight-visualizer/src/data.rs b/tools/flight-visualizer/src/data.rs index 837a22c..1510030 100644 --- a/tools/flight-visualizer/src/data.rs +++ b/tools/flight-visualizer/src/data.rs @@ -48,7 +48,7 @@ pub struct Acceleration { #[derive(new, Debug)] pub struct RollPitch { pub roll: Option, - pub pitch: Option + pub pitch: Option, } impl Data { @@ -111,7 +111,6 @@ impl Orientation { } } - impl Acceleration { pub fn new_none() -> Self { Self::new(None, None, None) diff --git a/tools/flight-visualizer/src/ui.rs b/tools/flight-visualizer/src/ui.rs index a5d6856..ac21469 100644 --- a/tools/flight-visualizer/src/ui.rs +++ b/tools/flight-visualizer/src/ui.rs @@ -1,7 +1,7 @@ use crate::data::{Data, DataRecord}; use eframe::egui; use eframe::egui::Context; -use egui::plot::{Line, Plot, PlotPoints, Points}; +use egui::plot::{Line, Plot, PlotPoints}; use egui::{Color32, Pos2, Stroke, Ui, Vec2}; use nalgebra::{Matrix3, Vector2, Vector3}; use once_cell::sync::Lazy; @@ -153,9 +153,33 @@ fn ui_3d_panel(ui: &mut Ui, data: &Data) { Vector3::new(1.0, 0.0, 0.0), ] .map(|p| p - Vector3::new(0.5, 0.5, 0.5)); + let paint_lines = [ + // cone + [0, 1], + [0, 2], + [0, 3], + [0, 4], + // base + [1, 2], + [2, 3], + [3, 4], + [4, 1], + ]; + let lines_colors = [ + // cone + Color32::from_rgb(255, 0, 0), + Color32::from_rgb(255, 0, 0), + Color32::from_rgb(255, 0, 0), + Color32::from_rgb(255, 0, 0), + // base + Color32::from_rgb(255, 0, 0), + Color32::from_rgb(255, 0, 150), + Color32::from_rgb(255, 0, 200), + Color32::from_rgb(255, 0, 255), + ]; let rot_z = last_data.rollpitch.roll.unwrap_or(0.0); - let rot_x = last_data.rollpitch.pitch.unwrap_or(0.0) + std::f64::consts::PI / 2.0; + let rot_x = -last_data.rollpitch.pitch.unwrap_or(0.0) + std::f64::consts::PI / 2.0; let rot_y = 0.0f64; // transform points @@ -175,29 +199,32 @@ fn ui_3d_panel(ui: &mut Ui, data: &Data) { [-rot_y.sin(), 0.0, rot_y.cos()], ]); - // transform 3d -> 2d - let r = r1 * r2 * r3; + // 3d transform model + let r = r2 * r1 * r3; let offset = Vector3::new(5.0, 0.0, 0.0); - let scale2d = 150.0; - let offset2d = Vector2::new(rect.min.x as f64 + 250.0, rect.min.y as f64 + 100.0); let points = points.map(|p| r * p + offset); + // 3d -> 2d + let viewport_min = Vector2::new(rect.min.x as f64, rect.min.y as f64); + let viewport_max = Vector2::new(rect.max.x as f64, rect.max.y as f64); + let viewport_size = viewport_max - viewport_min; + + let smaller_axis = f64::min(viewport_size.x, viewport_size.y); + let scale2d = smaller_axis; + let offset2d = viewport_min + viewport_size / 2.0; let points2d = points.map(|p| (p.yz() / p.x) * scale2d + offset2d); // drawing - let stroke = Stroke::new(1.0, Color32::from_rgb(255, 0, 0)); - for point_a in &points2d { - for point_b in &points2d { - if point_a == point_b { - continue; - } - painter.line_segment( - [ - Pos2::new(point_a.x as f32, point_a.y as f32), - Pos2::new(point_b.x as f32, point_b.y as f32), - ], - stroke, - ); - } + for line_index in 0..paint_lines.len() { + let line = paint_lines[line_index]; + let point_a = points2d[line[0]].map(|v| v as f32); + let point_b = points2d[line[1]].map(|v| v as f32); + painter.line_segment( + [ + Pos2::new(point_a.x, point_a.y), + Pos2::new(point_b.x, point_b.y), + ], + Stroke::new(2.0, lines_colors[line_index]), + ); } response.mark_changed(); From 36604e1c88c3e3bede88624ea87e36bb7862a4e8 Mon Sep 17 00:00:00 2001 From: Patryk Paluch Date: Fri, 8 Sep 2023 23:37:56 +0200 Subject: [PATCH 7/9] chore: update readme --- tools/flight-visualizer/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/flight-visualizer/README.md b/tools/flight-visualizer/README.md index 4168d61..c20061b 100644 --- a/tools/flight-visualizer/README.md +++ b/tools/flight-visualizer/README.md @@ -43,6 +43,9 @@ Build [lora-cli](../lora-cli) (see [README.md](../lora-cli/README.md)) and run: # or lora-cli in debug mode ../../target/debug/lora-cli | cargo run + +# with log file (release) +../../target/release/lora-cli | tee /tmp/cansat.log | cargo run ``` ## Without working lora (generated data) From 7b16ba146c91b4965bffd3b018e41c817a6bd009 Mon Sep 17 00:00:00 2001 From: Patryk Paluch Date: Sat, 9 Sep 2023 21:59:23 +0200 Subject: [PATCH 8/9] feat: gps(nmea) support --- crates/cansat-stm32f4/src/startup.rs | 3 +- tools/dummy-lora-receiver/src/main.rs | 32 +++++++++---------- tools/flight-visualizer/src/app.rs | 1 + tools/flight-visualizer/src/data.rs | 18 +++++++++++ tools/flight-visualizer/src/ui.rs | 44 ++++++++++++++++++++++----- 5 files changed, 74 insertions(+), 24 deletions(-) diff --git a/crates/cansat-stm32f4/src/startup.rs b/crates/cansat-stm32f4/src/startup.rs index 463ece9..d015558 100644 --- a/crates/cansat-stm32f4/src/startup.rs +++ b/crates/cansat-stm32f4/src/startup.rs @@ -4,6 +4,7 @@ use cansat_lora::ResponseContent; use heapless::Vec; use mpu6050::*; +use stm32f4xx_hal::serial::Serial2; use stm32f4xx_hal::{ gpio, i2c::{self, I2c1}, @@ -199,7 +200,7 @@ fn init_bme280(i2c: I2c1Proxy, delay: &mut Delay) -> Result Ok(bme280) } -fn init_gps(mut serial: Serial1) -> Result { +fn init_gps(mut serial: Serial2) -> Result { defmt::info!("Initializing GPS"); serial.listen(serial::Event::Rxne); diff --git a/tools/dummy-lora-receiver/src/main.rs b/tools/dummy-lora-receiver/src/main.rs index 2f70395..c240202 100644 --- a/tools/dummy-lora-receiver/src/main.rs +++ b/tools/dummy-lora-receiver/src/main.rs @@ -1,6 +1,6 @@ -use noise::{NoiseFn, Perlin}; -use cansat_core::{Measurements}; use cansat_core::quantity::{Distance, Pressure, Temperature}; +use cansat_core::Measurements; +use noise::{NoiseFn, Perlin}; const TEMPERATURE_SEED: f32 = 10000.0; const PRESSURE_SEED: f32 = 1993.0; @@ -53,19 +53,16 @@ fn main() { height += height_inc; let measurements = Measurements { - temperature: - if (inc % 3) == 0 { - None - } else { - Some(Temperature::from_celsius(temperature)) - }, - pressure: - if (inc % 4) != 0 { - None - } - else { - Some(Pressure::from_pascals(pressure)) - }, + temperature: if (inc % 3) == 0 { + None + } else { + Some(Temperature::from_celsius(temperature)) + }, + pressure: if (inc % 4) != 0 { + None + } else { + Some(Pressure::from_pascals(pressure)) + }, altitude: Some(Distance::from_meters(height)), nmea: None, acceleration: None, @@ -78,7 +75,10 @@ fn main() { let mut data = [0u8; 200]; let len = writer.serialize_to_slice(&measurements, &mut data).unwrap(); - print!("{}", &data[..len].iter().map(|b| *b as char).collect::()); + print!( + "{}", + &data[..len].iter().map(|b| *b as char).collect::() + ); std::thread::sleep(std::time::Duration::from_millis(DELAY)); } } diff --git a/tools/flight-visualizer/src/app.rs b/tools/flight-visualizer/src/app.rs index 797fd43..45da02f 100644 --- a/tools/flight-visualizer/src/app.rs +++ b/tools/flight-visualizer/src/app.rs @@ -118,6 +118,7 @@ impl FlightVisualizerApp { .rollpitch .map(|rp| RollPitch::new_some(rp.0 as f64, rp.1 as f64)) .unwrap_or(RollPitch::new_none()), + measurements.nmea, )); } } diff --git a/tools/flight-visualizer/src/data.rs b/tools/flight-visualizer/src/data.rs index 1510030..99c5cc9 100644 --- a/tools/flight-visualizer/src/data.rs +++ b/tools/flight-visualizer/src/data.rs @@ -1,3 +1,4 @@ +use cansat_core::nmea::NmeaGga; use derive_new::new; use std::collections::VecDeque; @@ -16,6 +17,7 @@ pub struct DataRecord { pub orientation: Orientation, pub acceleration: Acceleration, pub rollpitch: RollPitch, + pub nmea: Option, } #[derive(new, Debug)] @@ -109,6 +111,14 @@ impl Orientation { pub fn new_some(x: f64, y: f64, z: f64) -> Self { Self::new(Some(x), Some(y), Some(z)) } + + pub fn unwrap_or_nan(&self) -> (f64, f64, f64) { + ( + self.x.unwrap_or(f64::NAN), + self.y.unwrap_or(f64::NAN), + self.z.unwrap_or(f64::NAN), + ) + } } impl Acceleration { @@ -119,6 +129,14 @@ impl Acceleration { pub fn new_some(x: f64, y: f64, z: f64) -> Self { Self::new(Some(x), Some(y), Some(z)) } + + pub fn unwrap_or_nan(&self) -> (f64, f64, f64) { + ( + self.x.unwrap_or(f64::NAN), + self.y.unwrap_or(f64::NAN), + self.z.unwrap_or(f64::NAN), + ) + } } impl RollPitch { diff --git a/tools/flight-visualizer/src/ui.rs b/tools/flight-visualizer/src/ui.rs index ac21469..f4389c6 100644 --- a/tools/flight-visualizer/src/ui.rs +++ b/tools/flight-visualizer/src/ui.rs @@ -89,16 +89,46 @@ fn ui_info_box(ui: &mut Ui, data: &Data) { } let last_data = last_data.unwrap(); ui.label(format!("Time: {}", timestamp_formatter(last_data.time))); - ui.label(format!("Temperature: {:?}", last_data.bme.temperature)); - ui.label(format!("Pressure: {:?}", last_data.bme.pressure)); - ui.label(format!("Height: {:?}", last_data.bme.height)); - ui.label(format!("{:?}", last_data.orientation)); - ui.label(format!("{:?}", last_data.acceleration)); - ui.label(format!("Roll {:?}", last_data.rollpitch.roll)); - ui.label(format!("Pitch {:?}", last_data.rollpitch.pitch)); + label_if_present(ui, "Temperature", last_data.bme.temperature); + label_if_present(ui, "Pressure", last_data.bme.pressure); + label_if_present(ui, "Height", last_data.bme.height); + label_if_present(ui, "Roll", last_data.rollpitch.roll); + label_if_present(ui, "Pitch", last_data.rollpitch.pitch); + + ui.label(format!( + "Orientation: {:?}", + last_data.orientation.unwrap_or_nan() + )); + ui.label(format!( + "Acceleration: {:?}", + last_data.acceleration.unwrap_or_nan() + )); + if let Some(gga_data) = last_data.nmea.as_ref().map(|n| &n.0) { + label_if_present(ui, "nmea", Some("")); + label_if_present(ui, " fix time", gga_data.fix_time); + label_if_present(ui, " fix type", gga_data.fix_type); + label_if_present(ui, " hdop", gga_data.hdop); + label_if_present(ui, " Longitude ", gga_data.longitude); + label_if_present(ui, " Latitude ", gga_data.latitude); + label_if_present(ui, " altitude ", gga_data.altitude); + label_if_present(ui, " Geoid separation ", gga_data.geoid_separation); + } else { + label_if_present(ui, "nmea", Some("None")); + } }); } +fn label_if_present(ui: &mut Ui, text: &str, optional_value: Option) +where + T: std::fmt::Debug, +{ + if optional_value.is_some() { + ui.label(format!("{}: {:?}", text, optional_value.unwrap())); + } else { + ui.label(format!("{}: None", text)); + } +} + fn ui_orientation_box(ui: &mut Ui, data: &Data) { ui.vertical(|ui| { let single_graph_height = ui.available_height() * 0.33; From da893c08df4e856834bb7745fbc3085382b98230 Mon Sep 17 00:00:00 2001 From: Patryk Paluch Date: Sun, 17 Sep 2023 14:36:42 +0200 Subject: [PATCH 9/9] feat: map --- .gitignore | 1 + Cargo.lock | 626 +++++++++++++++++++++++++++- tools/flight-visualizer/Cargo.toml | 1 + tools/flight-visualizer/src/app.rs | 24 +- tools/flight-visualizer/src/data.rs | 15 +- tools/flight-visualizer/src/ui.rs | 62 ++- 6 files changed, 698 insertions(+), 31 deletions(-) diff --git a/.gitignore b/.gitignore index 4cdfe15..abb4ab5 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,6 @@ /.idea /target /.idea +/logs gyffhks package-lock.json \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index af79837..3e266d3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -522,6 +522,18 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8fe8f5a8a398345e52358e18ff07cc17a568fbca5c6f73873d3a62056309603" +[[package]] +name = "base64" +version = "0.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2" + +[[package]] +name = "bit_field" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61" + [[package]] name = "bitfield" version = "0.13.2" @@ -1030,6 +1042,40 @@ version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6548a0ad5d2549e111e1f6a11a6c2e2d00ce6a3dafe22948d67c2b443f775e52" +[[package]] +name = "crossbeam-channel" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" +dependencies = [ + "cfg-if", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +dependencies = [ + "cfg-if", + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" +dependencies = [ + "autocfg", + "cfg-if", + "crossbeam-utils", + "memoffset 0.9.0", + "scopeguard", +] + [[package]] name = "crossbeam-utils" version = "0.8.16" @@ -1039,6 +1085,12 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + [[package]] name = "crypto-common" version = "0.1.6" @@ -1282,6 +1334,17 @@ dependencies = [ "winit", ] +[[package]] +name = "egui_extras" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9278f4337b526f0d57e5375e5a7340a311fa6ee8f9fcc75721ac50af13face02" +dependencies = [ + "egui", + "image", + "serde", +] + [[package]] name = "egui_glow" version = "0.22.0" @@ -1297,6 +1360,12 @@ dependencies = [ "web-sys", ] +[[package]] +name = "either" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" + [[package]] name = "emath" version = "0.22.0" @@ -1351,6 +1420,15 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "723dce4e9f25b6e6c5f35628e144794e5b459216ed7da97b7c4b66cdb3fa82ca" +[[package]] +name = "encoding_rs" +version = "0.8.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +dependencies = [ + "cfg-if", +] + [[package]] name = "enumflags2" version = "0.7.7" @@ -1432,6 +1510,22 @@ version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" +[[package]] +name = "exr" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1e481eb11a482815d3e9d618db8c42a93207134662873809335a92327440c18" +dependencies = [ + "bit_field", + "flume", + "half", + "lebe", + "miniz_oxide 0.7.1", + "rayon-core", + "smallvec", + "zune-inflate", +] + [[package]] name = "eyre" version = "0.6.8" @@ -1485,6 +1579,20 @@ dependencies = [ "regex", "serde-csv-core 0.2.0", "time", + "walkers", +] + +[[package]] +name = "flume" +version = "0.10.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1657b4441c3403d9f7b3409e47575237dac27b1b5726df654a6ecbf92f0f7577" +dependencies = [ + "futures-core", + "futures-sink", + "nanorand", + "pin-project", + "spin 0.9.8", ] [[package]] @@ -1537,6 +1645,15 @@ dependencies = [ "nb 1.1.0", ] +[[package]] +name = "futures-channel" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +dependencies = [ + "futures-core", +] + [[package]] name = "futures-core" version = "0.3.28" @@ -1564,6 +1681,17 @@ dependencies = [ "waker-fn", ] +[[package]] +name = "futures-macro" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.29", +] + [[package]] name = "futures-sink" version = "0.3.28" @@ -1584,6 +1712,7 @@ checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" dependencies = [ "futures-core", "futures-io", + "futures-macro", "futures-sink", "futures-task", "memchr", @@ -1626,6 +1755,17 @@ dependencies = [ "version_check", ] +[[package]] +name = "geo-types" +version = "0.7.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9705398c5c7b26132e74513f4ee7c1d7dafd786004991b375c172be2be0eecaa" +dependencies = [ + "approx", + "num-traits", + "serde", +] + [[package]] name = "gethostname" version = "0.2.3" @@ -1654,8 +1794,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", + "js-sys", "libc", "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "gif" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80792593675e051cf94a4b111980da2ba60d4a83e43e0048c5693baab3977045" +dependencies = [ + "color_quant", + "weezl", ] [[package]] @@ -1751,6 +1903,34 @@ dependencies = [ "gl_generator", ] +[[package]] +name = "h2" +version = "0.3.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap 1.9.3", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "half" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02b4af3693f1b705df946e9fe5631932443781d0aabb423b62fcd4d73f6d2fd0" +dependencies = [ + "crunchy", +] + [[package]] name = "hash32" version = "0.2.1" @@ -1783,7 +1963,7 @@ dependencies = [ "hash32", "rustc_version 0.4.0", "serde", - "spin", + "spin 0.9.8", "stable_deref_trait", ] @@ -1834,6 +2014,78 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "http" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +dependencies = [ + "bytes", + "http", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hyper" +version = "0.14.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" +dependencies = [ + "futures-util", + "http", + "hyper", + "rustls", + "tokio", + "tokio-rustls", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -1859,9 +2111,14 @@ dependencies = [ "bytemuck", "byteorder", "color_quant", + "exr", + "gif", + "jpeg-decoder", "num-rational", "num-traits", "png", + "qoi", + "tiff", ] [[package]] @@ -1913,6 +2170,12 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "ipnet" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" + [[package]] name = "is-terminal" version = "0.4.7" @@ -1962,6 +2225,15 @@ dependencies = [ "libc", ] +[[package]] +name = "jpeg-decoder" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc0000e42512c92e31c2252315bda326620a4e034105e900c98ec492fa077b3e" +dependencies = [ + "rayon", +] + [[package]] name = "js-sys" version = "0.3.64" @@ -1983,6 +2255,12 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +[[package]] +name = "lebe" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" + [[package]] name = "lexical-parse-float" version = "0.8.5" @@ -2181,6 +2459,15 @@ dependencies = [ "autocfg", ] +[[package]] +name = "memoffset" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +dependencies = [ + "autocfg", +] + [[package]] name = "micromath" version = "1.1.1" @@ -2190,6 +2477,12 @@ dependencies = [ "generic-array 0.14.7", ] +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + [[package]] name = "minimal-lexical" version = "0.2.1" @@ -2279,6 +2572,15 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "nanorand" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" +dependencies = [ + "getrandom 0.2.10", +] + [[package]] name = "nb" version = "0.1.3" @@ -2446,6 +2748,16 @@ dependencies = [ "libm", ] +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi 0.3.1", + "libc", +] + [[package]] name = "num_enum" version = "0.5.11" @@ -2652,6 +2964,26 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +[[package]] +name = "pin-project" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.29", +] + [[package]] name = "pin-project-lite" version = "0.2.9" @@ -2748,6 +3080,15 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "qoi" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001" +dependencies = [ + "bytemuck", +] + [[package]] name = "quote" version = "1.0.28" @@ -2849,6 +3190,28 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" +[[package]] +name = "rayon" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +dependencies = [ + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-utils", + "num_cpus", +] + [[package]] name = "redox_syscall" version = "0.3.5" @@ -2875,6 +3238,60 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" +[[package]] +name = "reqwest" +version = "0.11.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1" +dependencies = [ + "base64", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-rustls", + "ipnet", + "js-sys", + "log", + "mime", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls", + "rustls-pemfile", + "serde", + "serde_json", + "serde_urlencoded", + "tokio", + "tokio-rustls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots", + "winreg", +] + +[[package]] +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin 0.5.2", + "untrusted", + "web-sys", + "winapi", +] + [[package]] name = "rtic" version = "2.0.0" @@ -2979,6 +3396,37 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "rustls" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8" +dependencies = [ + "log", + "ring", + "rustls-webpki", + "sct", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" +dependencies = [ + "base64", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45a27e3b59326c16e23d30aeb7a36a24cc0d29e71d68ff611cdfb4a01d013bed" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "ryu" version = "1.0.13" @@ -3015,6 +3463,16 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +[[package]] +name = "sct" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "sctk-adwaita" version = "0.5.4" @@ -3097,6 +3555,17 @@ dependencies = [ "syn 2.0.29", ] +[[package]] +name = "serde_json" +version = "1.0.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" +dependencies = [ + "itoa", + "ryu", + "serde", +] + [[package]] name = "serde_repr" version = "0.1.13" @@ -3108,6 +3577,18 @@ dependencies = [ "syn 2.0.29", ] +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + [[package]] name = "serde_with" version = "3.0.0" @@ -3286,6 +3767,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + [[package]] name = "spin" version = "0.9.8" @@ -3417,6 +3904,17 @@ dependencies = [ "syn 2.0.29", ] +[[package]] +name = "tiff" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d172b0f4d3fba17ba89811858b9d3d97f928aece846475bbda076ca46736211" +dependencies = [ + "flate2", + "jpeg-decoder", + "weezl", +] + [[package]] name = "time" version = "0.3.28" @@ -3485,6 +3983,58 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" +[[package]] +name = "tokio" +version = "1.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" +dependencies = [ + "autocfg", + "backtrace", + "bytes", + "libc", + "mio", + "pin-project-lite", + "socket2", + "tokio-macros", + "windows-sys 0.48.0", +] + +[[package]] +name = "tokio-macros" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.29", +] + +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", + "tracing", +] + [[package]] name = "toml" version = "0.5.11" @@ -3511,6 +4061,12 @@ dependencies = [ "winnow", ] +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + [[package]] name = "tracing" version = "0.1.37" @@ -3543,6 +4099,12 @@ dependencies = [ "once_cell", ] +[[package]] +name = "try-lock" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" + [[package]] name = "ttf-parser" version = "0.19.1" @@ -3586,6 +4148,12 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + [[package]] name = "url" version = "2.4.1" @@ -3652,6 +4220,31 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "walkers" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b196625e99da880975e55c5244c165493ed485bb6fa5553ef0d2cac61de9bdc" +dependencies = [ + "egui", + "egui_extras", + "geo-types", + "image", + "log", + "reqwest", + "thiserror", + "tokio", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + [[package]] name = "wasi" version = "0.9.0+wasi-snapshot-preview1" @@ -3842,6 +4435,18 @@ dependencies = [ "web-sys", ] +[[package]] +name = "webpki-roots" +version = "0.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" + +[[package]] +name = "weezl" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb" + [[package]] name = "wide" version = "0.7.11" @@ -4101,6 +4706,16 @@ dependencies = [ "memchr", ] +[[package]] +name = "winreg" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + [[package]] name = "x11-dl" version = "2.21.0" @@ -4235,6 +4850,15 @@ dependencies = [ "zvariant", ] +[[package]] +name = "zune-inflate" +version = "0.2.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ab332fe2f6680068f3582b16a24f90ad7096d5d39b974d1c0aff0125116f02" +dependencies = [ + "simd-adler32", +] + [[package]] name = "zvariant" version = "3.15.0" diff --git a/tools/flight-visualizer/Cargo.toml b/tools/flight-visualizer/Cargo.toml index 6305428..603ba6e 100644 --- a/tools/flight-visualizer/Cargo.toml +++ b/tools/flight-visualizer/Cargo.toml @@ -17,3 +17,4 @@ cansat-core = { path = "../../crates/cansat-core" } csv-core = "0.1.10" serde-csv-core = { version = "0.2.0" } regex = "1.8.1" +walkers = "0.7.0" diff --git a/tools/flight-visualizer/src/app.rs b/tools/flight-visualizer/src/app.rs index 45da02f..92576a3 100644 --- a/tools/flight-visualizer/src/app.rs +++ b/tools/flight-visualizer/src/app.rs @@ -1,7 +1,7 @@ use crate::data::{ Acceleration, BmeData, Data, DataRecord, Orientation, RollPitch, SignalStrength, }; -use crate::ui; +use crate::{data, ui}; use cansat_core::Measurements; use eframe::Frame; use egui::Context; @@ -9,22 +9,22 @@ use once_cell::sync::Lazy; use regex::Regex; use std::sync::{Arc, Mutex}; use std::time::Duration; +use walkers::providers::openstreetmap; +use walkers::Tiles; pub struct FlightVisualizerApp { data: Arc>, } -impl Default for FlightVisualizerApp { - fn default() -> Self { - Self { - data: Arc::new(Mutex::new(Data::default())), - } - } -} - impl FlightVisualizerApp { - pub fn new(_cc: &eframe::CreationContext<'_>) -> Self { - let mut slf: Self = Default::default(); + pub fn new(cc: &eframe::CreationContext<'_>) -> Self { + let data = Data::new( + Tiles::new(openstreetmap, cc.egui_ctx.clone()), + data::DEFAULT_CAPACITY, + ); + let mut slf: Self = FlightVisualizerApp { + data: Arc::new(Mutex::new(data)), + }; slf.spawn_input_consumer(); slf @@ -124,7 +124,7 @@ impl FlightVisualizerApp { } impl eframe::App for FlightVisualizerApp { fn update(&mut self, ctx: &Context, _frame: &mut Frame) { - ui::draw_ui(ctx, &self.data.lock().unwrap()); + ui::draw_ui(ctx, &mut self.data.lock().unwrap()); ctx.request_repaint_after(Duration::from_millis(33)); } } diff --git a/tools/flight-visualizer/src/data.rs b/tools/flight-visualizer/src/data.rs index 99c5cc9..599afa6 100644 --- a/tools/flight-visualizer/src/data.rs +++ b/tools/flight-visualizer/src/data.rs @@ -1,10 +1,13 @@ use cansat_core::nmea::NmeaGga; use derive_new::new; use std::collections::VecDeque; +use walkers::{MapMemory, Tiles}; -pub const DEFAULT_CAPACITY: usize = 20; +pub const DEFAULT_CAPACITY: usize = 50; pub struct Data { + pub tiles: Tiles, + pub map_memory: MapMemory, data_points: usize, data_records: VecDeque, signal_strength: SignalStrength, @@ -54,8 +57,10 @@ pub struct RollPitch { } impl Data { - pub fn new(data_points: usize) -> Self { + pub fn new(tiles: Tiles, data_points: usize) -> Self { Self { + tiles, + map_memory: MapMemory::default(), data_points, data_records: VecDeque::with_capacity(data_points), signal_strength: SignalStrength::new(0, 0), @@ -97,12 +102,6 @@ impl Data { } } -impl Default for Data { - fn default() -> Self { - Self::new(DEFAULT_CAPACITY) - } -} - impl Orientation { pub fn new_none() -> Self { Self::new(None, None, None) diff --git a/tools/flight-visualizer/src/ui.rs b/tools/flight-visualizer/src/ui.rs index f4389c6..57ed8c1 100644 --- a/tools/flight-visualizer/src/ui.rs +++ b/tools/flight-visualizer/src/ui.rs @@ -2,15 +2,16 @@ use crate::data::{Data, DataRecord}; use eframe::egui; use eframe::egui::Context; use egui::plot::{Line, Plot, PlotPoints}; -use egui::{Color32, Pos2, Stroke, Ui, Vec2}; +use egui::{Color32, PointerButton, Pos2, Stroke, Ui, Vec2}; use nalgebra::{Matrix3, Vector2, Vector3}; use once_cell::sync::Lazy; use time::format_description::FormatItem; use time::OffsetDateTime; +use walkers::{Map, Position}; type DataRecordFieldGetter = fn(&DataRecord) -> Option; -pub fn draw_ui(ctx: &Context, data: &Data) { +pub fn draw_ui(ctx: &Context, data: &mut Data) { // ctx.set_debug_on_hover(true); egui::CentralPanel::default().show(ctx, |ui| { let available_height = ui.available_height(); @@ -34,7 +35,12 @@ fn ui_left_panel(ui: &mut Ui, data: &Data) { ui, "height", data, - |d| d.bme.height, + |d| { + d.nmea + .as_ref() + .map(|n| &n.0) + .map(|n| n.altitude.unwrap_or(0.0) as f64) + }, UiGraphSettings::new_with_height(f64::NAN, f64::NAN, full_height * 0.5), ); @@ -56,11 +62,16 @@ fn ui_left_panel(ui: &mut Ui, data: &Data) { }); } -fn ui_right_panel(ui: &mut Ui, data: &Data) { +fn ui_right_panel(ui: &mut Ui, data: &mut Data) { ui.vertical(|ui| { ui.set_width(ui.available_width()); ui_right_top_info_panel(ui, data); - ui_3d_panel(ui, data); + let map_and_3d_panel_height = ui.available_height() * 0.75; + ui.horizontal(|ui| { + let w = ui.available_width(); + ui_3d_panel(ui, w / 2.0, map_and_3d_panel_height, data); + ui_map_panel(ui, w / 2.0, map_and_3d_panel_height, data); + }); ui_right_bottom_info_panel(ui, data); }); } @@ -158,11 +169,8 @@ fn ui_orientation_box(ui: &mut Ui, data: &Data) { }); } -fn ui_3d_panel(ui: &mut Ui, data: &Data) { - let h = ui.available_height() * 0.75; - - let (mut response, painter) = - ui.allocate_painter(Vec2::new(ui.available_width(), h), egui::Sense::click()); +fn ui_3d_panel(ui: &mut Ui, w: f32, h: f32, data: &Data) { + let (mut response, painter) = ui.allocate_painter(Vec2::new(w, h), egui::Sense::click()); let rect = response.rect; painter.rect_filled(rect, 0.0, Color32::from_rgb(0, 0, 0)); @@ -260,6 +268,40 @@ fn ui_3d_panel(ui: &mut Ui, data: &Data) { response.mark_changed(); } +fn ui_map_panel(ui: &mut Ui, w: f32, h: f32, data: &mut Data) { + let last_data = data.last_data(); + if last_data.is_none() { + return; + } + let last_data = last_data.unwrap(); + let (x, y) = last_data + .nmea + .as_ref() + .map(|n| &n.0) + .map(|n| (n.latitude.unwrap_or(0.0), n.longitude.unwrap_or(0.0))) + .unwrap_or((0.0, 0.0)); + + // let (mut response, painter) = + // ui.allocate_painter(Vec2::new(w, h), egui::Sense::click()); + // let rect = response.rect; + // painter.rect_filled(rect, 0.0, Color32::from_rgb(0, 0, 0)); + + let response = ui.add_sized( + Vec2::new(w, h), + Map::new( + Some(&mut data.tiles), + &mut data.map_memory, + Position::new(y, x), + ), + ); + + if response.clicked_by(PointerButton::Primary) { + let _ = data.map_memory.zoom.zoom_in(); + } else if response.clicked_by(PointerButton::Secondary) { + let _ = data.map_memory.zoom.zoom_out(); + } +} + fn ui_right_bottom_info_panel(ui: &mut Ui, data: &Data) { let available_height = ui.available_height(); ui.horizontal(|ui| {