Skip to content

Commit

Permalink
add rust crate (#4)
Browse files Browse the repository at this point in the history
* add imu crate

* fix checks

* add uv

* undo

---------

Co-authored-by: WT-MM <wesley.maa@@gmail.com>
  • Loading branch information
WT-MM and WT-MM authored Nov 12, 2024
1 parent 928a873 commit a1a25d9
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[workspace]

members = [
"imu",
"imu/bindings",
"imu/hexmove",
]
Expand Down
2 changes: 1 addition & 1 deletion examples/graph_hexmove.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import argparse
import time

import matplotlib.pyplot as plt
import matplotlib.pyplot as plt # noqa: PGH003

from imu import HexmoveImuReader

Expand Down
18 changes: 18 additions & 0 deletions imu/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[package]
name = "imu"
version.workspace = true
authors.workspace = true
edition.workspace = true
description = "Interface for interacting with various IMU devices"
license.workspace = true
repository.workspace = true
readme = "README.md"

[lib]
name = "imu"
crate-type = ["rlib"]

[dependencies]
hexmove = { path = "./hexmove", version = "0.1.2" }
socketcan = "3.3.0"
log = "0.4"
3 changes: 3 additions & 0 deletions imu/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# imu

This crate contains interfaces for interacting with IMUs.
3 changes: 3 additions & 0 deletions imu/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ ruff
# For testing CAN
python-can
pyserial

# For plotting
matplotlib
3 changes: 3 additions & 0 deletions imu/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pub mod hexmove {
pub use ::hexmove::*;
}
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.lint.per-file-ignores]

"__init__.py" = ["E402", "F401", "F403", "F811"]
"target/package/imu*/__init__.py" = ["N999"]

[tool.ruff.lint.isort]

Expand Down

0 comments on commit a1a25d9

Please sign in to comment.