wip from deskpi?
This commit is contained in:
parent
7cd6639283
commit
83c94f8802
1086
Cargo.lock
generated
1086
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -4,7 +4,7 @@ version = "0.1.0"
|
|||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
hidapi = "1"
|
hidapi = "2"
|
||||||
rumqttc = "0.12"
|
rumqttc = "0.12"
|
||||||
bitvec = "1"
|
bitvec = "1"
|
||||||
serde = "1"
|
serde = "1"
|
||||||
|
|||||||
84
flake.lock
generated
84
flake.lock
generated
@ -6,11 +6,11 @@
|
|||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1650900878,
|
"lastModified": 1678957337,
|
||||||
"narHash": "sha256-qhNncMBSa9STnhiLfELEQpYC1L4GrYHNIzyCZ/pilsI=",
|
"narHash": "sha256-Gw4nVbuKRdTwPngeOZQOzH/IFowmz4LryMPDiJN/ah4=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "devshell",
|
"repo": "devshell",
|
||||||
"rev": "d97df53b5ddaa1cfbea7cddbd207eb2634304733",
|
"rev": "3e0e60ab37cd0bf7ab59888f5c32499d851edb47",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -36,11 +36,11 @@
|
|||||||
},
|
},
|
||||||
"flake-utils_2": {
|
"flake-utils_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1656065134,
|
"lastModified": 1659877975,
|
||||||
"narHash": "sha256-oc6E6ByIw3oJaIyc67maaFcnjYOz1mMcOtHxbEf9NwQ=",
|
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "bee6a7250dd1b01844a2de7e02e4df7d8a0a206c",
|
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -54,11 +54,11 @@
|
|||||||
"nixpkgs": "nixpkgs_2"
|
"nixpkgs": "nixpkgs_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1651574473,
|
"lastModified": 1679567394,
|
||||||
"narHash": "sha256-wQhFORvRjo8LB2hTmETmv6cbyKGDPbfWqvZ/0chnDE4=",
|
"narHash": "sha256-ZvLuzPeARDLiQUt6zSZFGOs+HZmE+3g4QURc8mkBsfM=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "naersk",
|
"repo": "naersk",
|
||||||
"rev": "f21309b38e1da0d61b881b6b6d41b81c1aed4e1d",
|
"rev": "88cd22380154a2c36799fe8098888f0f59861a15",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -69,11 +69,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1643381941,
|
"lastModified": 1677383253,
|
||||||
"narHash": "sha256-pHTwvnN4tTsEKkWlXQ8JMY423epos8wUOhthpwJjtpc=",
|
"narHash": "sha256-UfpzWfSxkfXHnb4boXZNaKsAcUrZT9Hw+tao1oZxd08=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "5efc8ca954272c4376ac929f4c5ffefcc20551d5",
|
"rev": "9952d6bc395f5841262b006fbace8dd7e143b634",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -85,12 +85,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1652059086,
|
"lastModified": 1678500271,
|
||||||
"narHash": "sha256-CjHSbr6LSFkN4YBdTB6+8ZQmSqhsbiXqAeQ9hQJ/gBI=",
|
"narHash": "sha256-tRBLElf6f02HJGG0ZR7znMNFv/Uf7b2fFInpTHiHaSE=",
|
||||||
"owner": "NixOS",
|
"path": "/nix/store/x00nwwv3ima5ri9q6wi7mq9vml4djjgn-source",
|
||||||
"repo": "nixpkgs",
|
"rev": "5eb98948b66de29f899c7fe27ae112a47964baf8",
|
||||||
"rev": "934e076a441e318897aa17540f6cf7caadc69028",
|
"type": "path"
|
||||||
"type": "github"
|
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"id": "nixpkgs",
|
"id": "nixpkgs",
|
||||||
@ -99,12 +98,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_3": {
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1652059086,
|
"lastModified": 1678500271,
|
||||||
"narHash": "sha256-CjHSbr6LSFkN4YBdTB6+8ZQmSqhsbiXqAeQ9hQJ/gBI=",
|
"narHash": "sha256-tRBLElf6f02HJGG0ZR7znMNFv/Uf7b2fFInpTHiHaSE=",
|
||||||
"owner": "NixOS",
|
"path": "/nix/store/x00nwwv3ima5ri9q6wi7mq9vml4djjgn-source",
|
||||||
"repo": "nixpkgs",
|
"rev": "5eb98948b66de29f899c7fe27ae112a47964baf8",
|
||||||
"rev": "934e076a441e318897aa17540f6cf7caadc69028",
|
"type": "path"
|
||||||
"type": "github"
|
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"id": "nixpkgs",
|
"id": "nixpkgs",
|
||||||
@ -113,11 +111,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_4": {
|
"nixpkgs_4": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1656401090,
|
"lastModified": 1665296151,
|
||||||
"narHash": "sha256-bUS2nfQsvTQW2z8SK7oEFSElbmoBahOPtbXPm0AL3I4=",
|
"narHash": "sha256-uOB0oxqxN9K7XGF1hcnY+PQnlQJ+3bP2vCn/+Ru/bbc=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "16de63fcc54e88b9a106a603038dd5dd2feb21eb",
|
"rev": "14ccaaedd95a488dd7ae142757884d8e125b3363",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -142,11 +140,11 @@
|
|||||||
"nixpkgs": "nixpkgs_4"
|
"nixpkgs": "nixpkgs_4"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1657248581,
|
"lastModified": 1681179516,
|
||||||
"narHash": "sha256-VSAhHCruQCFWzTz7ZSW5QLb2xIKrBGeEyEfKds4MXeY=",
|
"narHash": "sha256-Ij/3YM5Gz5AiDKnP77ODJp2RGRRWmGTWYlfnuUT3z78=",
|
||||||
"owner": "oxalica",
|
"owner": "oxalica",
|
||||||
"repo": "rust-overlay",
|
"repo": "rust-overlay",
|
||||||
"rev": "6bd9919005ab6bf72464c9ebdd80f89b0cf82f97",
|
"rev": "9e7373ba5627ffe952f66a3e82e3a375bdc38565",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -155,13 +153,31 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"utils": {
|
"systems": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1649676176,
|
"lastModified": 1681028828,
|
||||||
"narHash": "sha256-OWKJratjt2RW151VUlJPRALb7OU2S5s+f0vLj4o1bHM=",
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681202837,
|
||||||
|
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "a4b154ebbdc88c8498a5c7b01589addc9e9cb678",
|
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@ -27,7 +27,7 @@
|
|||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
|
|
||||||
overlays = [devshell.overlay (import rust-overlay)];
|
overlays = [devshell.overlays.default (import rust-overlay)];
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
pkgs.mkShell {
|
pkgs.mkShell {
|
||||||
@ -37,7 +37,7 @@
|
|||||||
dhall-json
|
dhall-json
|
||||||
dhall-lsp-server
|
dhall-lsp-server
|
||||||
# Rust!
|
# Rust!
|
||||||
(rust-bin.stable.latest.default.override {
|
(rust-bin.stable."1.68.1".default.override {
|
||||||
extensions = ["rls"];
|
extensions = ["rls"];
|
||||||
})
|
})
|
||||||
# Build requirements
|
# Build requirements
|
||||||
@ -46,6 +46,7 @@
|
|||||||
openssl
|
openssl
|
||||||
# Utils
|
# Utils
|
||||||
mosquitto # So we can poke mqtt
|
mosquitto # So we can poke mqtt
|
||||||
|
usbutils
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
formatter = pkgs.alejandra;
|
formatter = pkgs.alejandra;
|
||||||
|
|||||||
@ -135,8 +135,7 @@ fn main() -> StdError<()> {
|
|||||||
let device = device::get_devices(&hid, true)
|
let device = device::get_devices(&hid, true)
|
||||||
.get(0)
|
.get(0)
|
||||||
.expect("No device found")
|
.expect("No device found")
|
||||||
.open_device(&hid)
|
.open_device(&hid)?;
|
||||||
.expect("Couldn't open device");
|
|
||||||
|
|
||||||
let pad = device::ButtonPad::new(&device);
|
let pad = device::ButtonPad::new(&device);
|
||||||
for ev in pad {
|
for ev in pad {
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
-- Sampad Dhall types, autogenerated by git#96d9ca3 on 2022-07-11 13:54:53.099283885 UTC
|
-- Sampad Dhall types, autogenerated by git#3065040 on 2022-07-12 12:53:11.933270598 UTC
|
||||||
{ Action =
|
{ Action =
|
||||||
< ActivateLayer : Text
|
< ActivateLayer : Text
|
||||||
| MQTTPub : { payload : Text, topic : Text }
|
| MQTTPub : { payload : Text, topic : Text }
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user