refactor: 重构架构并整理仓库
This commit is contained in:
+45
-20
@@ -1,17 +1,27 @@
|
||||
[workspace]
|
||||
resolver = "3"
|
||||
members = [
|
||||
"crates/motor-core",
|
||||
"crates/can-link",
|
||||
"crates/dji-esc",
|
||||
"crates/dji-esc-sim",
|
||||
"crates/dji-esc-socketcan",
|
||||
"crates/dji-esc-slcan",
|
||||
"crates/can",
|
||||
"crates/imu",
|
||||
"crates/motor-protocol",
|
||||
"crates/delta10-protocol",
|
||||
"crates/socketcan",
|
||||
"crates/slcan",
|
||||
"crates/delta10",
|
||||
"crates/motor",
|
||||
"crates/esc-bus",
|
||||
"crates/pid",
|
||||
"crates/motor-control",
|
||||
"crates/mecanum",
|
||||
"crates/motor-model",
|
||||
"crates/experiment",
|
||||
"crates/sim-harness",
|
||||
"crates/tuning",
|
||||
"crates/chassis-config",
|
||||
"crates/chassis-bench",
|
||||
"crates/chassis-tune",
|
||||
"crates/bench",
|
||||
"crates/chassisd",
|
||||
"crates/spin",
|
||||
"crates/chassis-tune",
|
||||
]
|
||||
|
||||
[workspace.package]
|
||||
@@ -27,20 +37,23 @@ strip = true
|
||||
[workspace.dependencies]
|
||||
# 异步运行时
|
||||
tokio = { version = "1", features = ["rt-multi-thread", "macros", "sync", "time", "signal"] }
|
||||
# CAN 总线(仅 Linux,由 dji-esc-socketcan 按 target 引入)
|
||||
socketcan = { version = "4", features = ["tokio"] }
|
||||
# CAN 总线(仅 Linux,由 socketcan 按 target 引入)
|
||||
socketcan-rs = { package = "socketcan", version = "4", features = ["tokio"] }
|
||||
# SLCAN 串口适配器(CANable 等,用户态 Lawicel 协议)
|
||||
slcan-proto = { package = "slcan", version = "0.1.3" }
|
||||
serial = "0.4"
|
||||
# 错误定义与结构化日志
|
||||
thiserror = "2"
|
||||
tracing = "0.1"
|
||||
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
||||
# 配置与命令行(chassisd)
|
||||
# 配置与命令行
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
toml = "0.9"
|
||||
clap = { version = "4", features = ["derive"] }
|
||||
# 测试
|
||||
proptest = "1"
|
||||
approx = "0.5"
|
||||
# 自动整定工具(chassis-tune)
|
||||
# 自动整定工具
|
||||
#
|
||||
# `rand` 对齐 argmin 依赖的 0.9,避免依赖树里出现两个 rand 大版本;
|
||||
# `argmin-math` 必须显式开启 `vec`(argmin 自身只启 `primitives`),
|
||||
@@ -56,16 +69,28 @@ anyhow = "1"
|
||||
# 仅在 chassis-tune 的 `plot` feature 下引入:只要 SVG 后端与折线系列,
|
||||
# 但文字标签需要 `ttf`(字体加载),因此不能用纯 svg_backend 最小集。
|
||||
plotters = { version = "0.3", default-features = false, features = ["svg_backend", "line_series", "ttf"] }
|
||||
# workspace 内部 crate
|
||||
motor-core = { path = "crates/motor-core" }
|
||||
can-link = { path = "crates/can-link" }
|
||||
dji-esc = { path = "crates/dji-esc" }
|
||||
dji-esc-sim = { path = "crates/dji-esc-sim" }
|
||||
dji-esc-socketcan = { path = "crates/dji-esc-socketcan" }
|
||||
dji-esc-slcan = { path = "crates/dji-esc-slcan" }
|
||||
|
||||
# ---- 职责型内部 crate ----
|
||||
can = { path = "crates/can" }
|
||||
imu = { path = "crates/imu" }
|
||||
motor-protocol = { path = "crates/motor-protocol" }
|
||||
delta10-protocol = { path = "crates/delta10-protocol" }
|
||||
socketcan = { path = "crates/socketcan" }
|
||||
slcan = { path = "crates/slcan" }
|
||||
delta10 = { path = "crates/delta10" }
|
||||
motor = { path = "crates/motor" }
|
||||
esc-bus = { path = "crates/esc-bus" }
|
||||
pid = { path = "crates/pid" }
|
||||
motor-control = { path = "crates/motor-control" }
|
||||
mecanum = { path = "crates/mecanum" }
|
||||
motor-model = { path = "crates/motor-model" }
|
||||
experiment = { path = "crates/experiment" }
|
||||
sim-harness = { path = "crates/sim-harness" }
|
||||
tuning = { path = "crates/tuning" }
|
||||
chassis-config = { path = "crates/chassis-config" }
|
||||
chassis-bench = { path = "crates/chassis-bench" }
|
||||
bench = { path = "crates/bench" }
|
||||
chassisd = { path = "crates/chassisd" }
|
||||
spin = { path = "crates/spin" }
|
||||
chassis-tune = { path = "crates/chassis-tune" }
|
||||
|
||||
[workspace.lints.rust]
|
||||
|
||||
Reference in New Issue
Block a user