Rewrite the driver in Rust; move the testbench tools out

The repository is now only the HPCS 6500 driver: a Rust library (serial
transport, every protocol command, block parsing, USBPcap captures, a
simulated instrument) and the hpcs6500 CLI with the flags of the former
hpcs6500.py, plus dump/capture for reverse engineering.

The lamp station, lamp export, TM-30, label printer and LED calibration
move to B4L/lamp-testbench. Golden tests pin the Rust output to the Python
driver's: parsed values bit-exact, report text, CSV and number formatting.
The Python driver is at tag python-final.
This commit is contained in:
grabowski committed 2026-10-22 17:01:47 +07:00
1 parent 3ac7cd243b
commit 54242da04b
79 files changed
+23340 -3246

No files matched your search

+38
View File
@@ -0,0 +1,38 @@
[package]
name = "hpcs6500"
version = "0.2.0"
edition = "2024"
rust-version = "1.85"
description = "Open-source driver and CLI for the HPCS 6500 spectrophotometer / integrating sphere"
repository = "https://git.b4l.co.th/B4L/HPCS6500-py"
readme = "README.md"
publish = false
[features]
default = ["cli"]
# the `hpcs6500` command line tool; library users can turn it off
cli = ["dep:clap", "dep:serde_json", "dep:chrono", "dep:ctrlc"]
[lib]
name = "hpcs6500"
path = "src/lib.rs"
[[bin]]
name = "hpcs6500"
path = "src/cli/main.rs"
required-features = ["cli"]
[dependencies]
serialport = "4.7"
serde = { version = "1", features = ["derive"] }
thiserror = "2"
clap = { version = "4.5", features = ["derive"], optional = true }
serde_json = { version = "1", features = ["preserve_order"], optional = true }
chrono = { version = "0.4", default-features = false, features = ["clock", "std"], optional = true }
ctrlc = { version = "3.4", optional = true }
[dev-dependencies]
serde_json = { version = "1", features = ["preserve_order"] }
[profile.release]
strip = true