mirror of
https://codeberg.org/icewind/hlk_ld6002.git
synced 2026-06-03 16:44:10 +02:00
flake update
This commit is contained in:
parent
e55e68920c
commit
fdf2a70b2a
4 changed files with 240 additions and 232 deletions
4
Cargo.lock
generated
4
Cargo.lock
generated
|
|
@ -307,9 +307,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "log"
|
name = "log"
|
||||||
version = "0.4.20"
|
version = "0.4.26"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f"
|
checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mach2"
|
name = "mach2"
|
||||||
|
|
|
||||||
12
README.md
12
README.md
|
|
@ -1,10 +1,14 @@
|
||||||
# HLK-LD6002
|
# HLK-LD6002
|
||||||
|
|
||||||
A library for community with [HLK-LD6002](https://www.hlktech.net/index.php?id=1180) radar respiratory and heartbeat sensors.
|
A library for community with
|
||||||
|
[HLK-LD6002](https://www.hlktech.net/index.php?id=1180) radar respiratory and
|
||||||
|
heartbeat sensors.
|
||||||
|
|
||||||
Supports both sync and async serial ports using `embedded-io` or `embedded-io-async`.
|
Supports both sync and async serial ports using `embedded-io` or
|
||||||
|
`embedded-io-async`.
|
||||||
|
|
||||||
## A note about serial adapters.
|
## A note about serial adapters.
|
||||||
|
|
||||||
The sensor use 1.382.400 baud UART for communicating, not all serial adapters support baud rates this high.
|
The sensor use 1.382.400 baud UART for communicating, not all serial adapters
|
||||||
Using an adapter that doesn't support this baud rate (like the common CP210 based adapters) can lead to silent failures.
|
support baud rates this high. Using an adapter that doesn't support this baud
|
||||||
|
rate (like the common CP210 based adapters) can lead to silent failures.
|
||||||
|
|
|
||||||
127
flake.lock
generated
127
flake.lock
generated
|
|
@ -1,80 +1,103 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"flake-utils": {
|
"crane": {
|
||||||
"inputs": {
|
|
||||||
"systems": "systems"
|
|
||||||
},
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1705309234,
|
"lastModified": 1742394900,
|
||||||
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
|
"narHash": "sha256-vVOAp9ahvnU+fQoKd4SEXB2JG2wbENkpqcwlkIXgUC0=",
|
||||||
"owner": "numtide",
|
"owner": "ipetkov",
|
||||||
"repo": "flake-utils",
|
"repo": "crane",
|
||||||
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
|
"rev": "70947c1908108c0c551ddfd73d4f750ff2ea67cd",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "numtide",
|
"owner": "ipetkov",
|
||||||
"repo": "flake-utils",
|
"repo": "crane",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"flakelight": {
|
||||||
"locked": {
|
|
||||||
"lastModified": 1708161998,
|
|
||||||
"narHash": "sha256-6KnemmUorCvlcAvGziFosAVkrlWZGIc6UNT9GUYr0jQ=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "84d981bae8b5e783b3b548de505b22880559515f",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"id": "nixpkgs",
|
|
||||||
"ref": "nixos-23.11",
|
|
||||||
"type": "indirect"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": {
|
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils",
|
|
||||||
"nixpkgs": "nixpkgs",
|
|
||||||
"rust-overlay": "rust-overlay"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"rust-overlay": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-utils": [
|
|
||||||
"flake-utils"
|
|
||||||
],
|
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1708241671,
|
"lastModified": 1748868585,
|
||||||
"narHash": "sha256-zSulX9tP4R35Y8A842dGSzaHMVP91W2Ry0SXvQKD2BQ=",
|
"narHash": "sha256-DrrbahOQAwvNM8l5EuGxxkVS7X5/S59zcG0N9ZWQFhk=",
|
||||||
"owner": "oxalica",
|
"owner": "nix-community",
|
||||||
"repo": "rust-overlay",
|
"repo": "flakelight",
|
||||||
"rev": "d500e370b26f9b14303cb39bf1509df0a920c8b0",
|
"rev": "dfbecd12d99c1bf82906521a6a7d5b75d2aa1ca2",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "oxalica",
|
"owner": "nix-community",
|
||||||
"repo": "rust-overlay",
|
"repo": "flakelight",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"systems": {
|
"mill-scale": {
|
||||||
|
"inputs": {
|
||||||
|
"crane": "crane",
|
||||||
|
"flakelight": [
|
||||||
|
"flakelight"
|
||||||
|
],
|
||||||
|
"rust-overlay": "rust-overlay"
|
||||||
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681028828,
|
"lastModified": 1748205441,
|
||||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
"narHash": "sha256-W+UUBT/l1DSTZo5G43494mRNNspJ2i9jW2QELC9JuMQ=",
|
||||||
"owner": "nix-systems",
|
"ref": "refs/heads/main",
|
||||||
"repo": "default",
|
"rev": "dac3b74a89cebbeb21cc6602e4a346604adbee8b",
|
||||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
"revCount": 49,
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://codeberg.org/icewind/mill-scale"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://codeberg.org/icewind/mill-scale"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1748708770,
|
||||||
|
"narHash": "sha256-q8jG2HJWgooWa9H0iatZqBPF3bp0504e05MevFmnFLY=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "a59eb7800787c926045d51b70982ae285faa2346",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-systems",
|
"id": "nixpkgs",
|
||||||
"repo": "default",
|
"ref": "nixos-25.05",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"flakelight": "flakelight",
|
||||||
|
"mill-scale": "mill-scale",
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"rust-overlay": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"mill-scale",
|
||||||
|
"flakelight",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1742697269,
|
||||||
|
"narHash": "sha256-Lpp0XyAtIl1oGJzNmTiTGLhTkcUjwSkEb0gOiNzYFGM=",
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "rust-overlay",
|
||||||
|
"rev": "01973c84732f9275c50c5f075dd1f54cc04b3316",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "rust-overlay",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
35
flake.nix
35
flake.nix
|
|
@ -1,33 +1,14 @@
|
||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "nixpkgs/nixos-23.11";
|
nixpkgs.url = "nixpkgs/nixos-25.05";
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
flakelight = {
|
||||||
rust-overlay.url = "github:oxalica/rust-overlay";
|
url = "github:nix-community/flakelight";
|
||||||
rust-overlay.inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
rust-overlay.inputs.flake-utils.follows = "flake-utils";
|
|
||||||
};
|
};
|
||||||
|
mill-scale = {
|
||||||
outputs = {
|
url = "git+https://codeberg.org/icewind/mill-scale";
|
||||||
self,
|
inputs.flakelight.follows = "flakelight";
|
||||||
nixpkgs,
|
|
||||||
flake-utils,
|
|
||||||
rust-overlay,
|
|
||||||
}:
|
|
||||||
flake-utils.lib.eachDefaultSystem (
|
|
||||||
system: let
|
|
||||||
overlays = [
|
|
||||||
(import rust-overlay)
|
|
||||||
];
|
|
||||||
pkgs = (import nixpkgs) {
|
|
||||||
inherit system overlays;
|
|
||||||
};
|
};
|
||||||
toolchain = pkgs.rust-bin.stable.latest.default;
|
|
||||||
dependencies = with pkgs; [pkg-config udev];
|
|
||||||
tools = with pkgs; [toolchain bacon cargo-edit cargo-outdated cargo-audit];
|
|
||||||
in rec {
|
|
||||||
devShell = pkgs.mkShell {
|
|
||||||
nativeBuildInputs = dependencies ++ tools;
|
|
||||||
};
|
};
|
||||||
}
|
outputs = {mill-scale, ...}: mill-scale ./. {};
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue