Commit graph

12 commits

Author SHA1 Message Date
3ec2add6e4 Properly report the position in filename. 2026-03-08 20:41:59 +01:00
2da9567679 Run cargo fmt 2026-03-08 20:38:48 +01:00
a6077d755e Add simple camera-capture with nokhwa.
There might be better camera capture crates, this
is just the first pick for now.

Signed-off-by: Henner Zeller <h.zeller@acm.org>
2026-03-08 20:36:44 +01:00
b130450019 Smallish cleanup.
Signed-off-by: Henner Zeller <h.zeller@acm.org>
2026-03-08 14:12:02 +01:00
ad9b1cb8c2 Implement simple GCode stage.
Easy experimenting with 3D printer or other CNC if
open flexure is not available.

Signed-off-by: Henner Zeller <h.zeller@acm.org>
2026-03-08 14:04:15 +01:00
4f620ad899 Make a XYStage trait, and have OpenFlexureStage implement it.
This way, we can have multiple implementations of a stage
that moves in XY direction.

Signed-off-by: Henner Zeller <h.zeller@acm.org>
2026-03-08 13:24:25 +01:00
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
bdc3a8e3ae init from q3k's code dump 2026-02-21 23:04:37 +01:00