Commit graph

7 commits

Author SHA1 Message Date
cc8152a75d Break out stage IO into separate file.
Signed-off-by: Henner Zeller <h.zeller@acm.org>
2026-03-08 12:48:39 +01:00
4e946eef77 Run cargo fmt
... to have canonical formatting.

Signed-off-by: Henner Zeller <h.zeller@acm.org>
2026-03-08 08:37:46 +01:00
7d8337bd5e Add cmdline-flag handling.
For now, just interface settings for the stage control:

```
target/release/hostcontrol --help
Usage: hostcontrol [OPTIONS]

Options:
      --stage-device <STAGE_DEVICE>  Interface to talk to movement stage [default: /dev/ttyACM0]
      --tty-speed <TTY_SPEED>        Speed of the stage device (bps) [default: 115200]
  -h, --help                         Print help
  -V, --version                      Print version
```

Signed-off-by: Henner Zeller <h.zeller@acm.org>
2026-03-08 08:35:36 +01:00
f65cc9236b Add debug log support for serial interface.
This shows the chatter on the serial interface if debug
logging is enabled.

```
RUST_LOG=debug target/debug/hostcontrol
```

Signed-off-by: Henner Zeller <h.zeller@acm.org>
2026-03-08 08:32:44 +01:00
053ad4fb63 Break out serial interface to be used in other stages.
Signed-off-by: Henner Zeller <h.zeller@acm.org>
2026-03-08 08:26:13 +01:00
38c483b92a More explicitly name all the dependencies in shell.nix
Add all the relevant tools to compile (only `cargo` needed, `rustc`
is bundled with it in the right version) and develop (`clippy` and
`rustfmt` can then directly be called from cargo; `rust-analyzer`
provides a useful language server for editor).

Made it possible to override nixpkgs by providing an overridable
`pkgs`.

Not sure if the `LD_LIBRARY_PATH` is needed; left it like this for
now.

Signed-off-by: Henner Zeller <h.zeller@acm.org>
2026-02-22 08:29:10 +01:00
bdc3a8e3ae init from q3k's code dump 2026-02-21 23:04:37 +01:00