Skip to content

Releases: J040M/xcontroller-app

xcontroller-app v0.3.1

16 May 07:05

Choose a tag to compare

Add USB serial transport for the native app

The native (Tauri) app can now talk to a Marlin printer directly over
USB serial, alongside the existing WebSocket transport. The user picks
per profile.

Frontend transport abstraction (src/transport/): ITransport,
WebSocketTransport (moved from utils/wsconnector.ts) and a new
UsbTransport that bridges Tauri events into the same MessageEvent
shape client.ts already understands. init/client.ts swaps the active
transport via setActiveTransport; components subscribe to connection:*
events on the shared eventBus, so they no longer care which transport
is live.

Rust backend (src-tauri/src/printer_core/) vendors the protocol logic
from the xcontroller server (commands, parser, serialcom, structs)
plus a small upload.rs with the SD-upload validation helpers. The new
src-tauri/src/serial.rs spawns one worker thread that owns the
SerialConnection and drains an ordered mpsc channel — the queue gives
FIFO command ordering for free (each invoke is an independent IPC
call with no ordering guarantee of its own) and naturally serializes
uploads. Five Tauri commands expose it: list_serial_ports,
serial_connect, serial_disconnect, serial_send_command, usb_upload.
Replies are emitted as serial-message events in the same MessageSender
shape the WebSocket protocol uses, so the dispatcher needs no
USB-specific code. tauri-plugin-dialog is registered so files.vue can
pick a real path for uploads.

UI: PrinterProfile gains transportType/serialPort/baudRate.
printerprofile.vue adds a connection-type selector (USB hidden in web
builds) and serial-port/baud-rate fields with a refresh button.
files.vue branches by transport: WebSocket keeps the hidden input;
USB opens the Tauri dialog and hands the path to the Rust side via
uploadFileFromPath. USB upload shows an indeterminate progress bar —
a real percentage would need the source file's total size, which the
webview doesn't have for a path-based upload (future enhancement).

Cross-OS:
- macOS lists /dev/cu.* and filters out /dev/tty.* dial-in nodes.
- Linux surfaces permission-denied clearly; the user must be in the
  dialout group (documented in README).
- Windows COM* ports work via the Win32 API — no native ARM lib
  needed, so the aarch64-pc-windows-msvc cross-compile leg builds.

Tests: WebSocketTransport.test.ts (6) and UsbTransport.test.ts (7,
Tauri APIs mocked). The vendored Rust modules bring their unit tests
(38). Local 'tauri build' produces a working macOS bundle end to end.

Release v0.3.0

21 Mar 09:17
0ab05f5

Choose a tag to compare

Bump minor version (#31)

Release v0.2.1

19 Feb 17:52
d955871

Choose a tag to compare

Fix (#20)

Release v0.1.0

06 Feb 00:37
72afb06

Choose a tag to compare

Merge develop (#10) (#11)

- Add tests
- Heating profiles
- Update controls
- Update printer obj
- Update printer reactivity
- Fix crashes
- Refactor