Loading
Commits on Source 20
-
Martin Zak authored
Release v10.0.0 Release 10.0.0 (major version — breaking changes). See CHANGELOG.md for the release notes.
🤖 Generated with [Claude Code](https://claude.com/claude-code) See merge request software-public/zaber-motion-lib!1760 -
Soleil Lapierre authored
-
Soleil Lapierre authored
Remove trailing zeroes and decimal point from ASCII commands Makes commands shorter and easier to read. #ZML-1108 Fixed See merge request software-public/zaber-motion-lib!1761
-
Martin Zak authored
-
Martin Zak authored
ZML-1185: use the "master" short name for the Device DB in examples See merge request software-public/zaber-motion-lib!1762
-
Martin Zak authored
-
Martin Zak authored
ZML-1182: Implement Dispose (Symbol.dispose / Symbol.asyncDispose) for JS/TS Adds TC39 explicit resource management (`using` / `await using`) support to the 9 resource-owning JS/TS classes, and deprecates the public `free()` in favour of it. Non-breaking — `free()` is retained. ## What changed - **Closeable resources** (`ascii.Connection`, `binary.Connection`, `Transport`, `WdiAutofocusProvider`, `Ge1xGripper`) gain an async `[Symbol.asyncDispose]` that calls `close()` then `free()` — free in a `finally`, so the native handle is always released; `close()` is idempotent across transports. Usable with `await using`. - **Non-closeable resources** (`OscilloscopeData`, `Moveable`, `gcode.Translator`, `gcode.OfflineTranslator`) gain a sync `[Symbol.dispose]` that frees. Usable with `using`. - **`free()` retained but `@deprecated`**, pointing users at the disposal API. ## Design notes - **Conditional attach** — the method is attached to the prototype in a `static {}` block guarded by a symbol-availability check and typed via a `declare` member. No global `Symbol` mutation, and nothing is emitted on engines that predate the well-known symbols (graceful degradation, no crash). - `FinalizationRegistry` remains the GC-driven safety net; dispose is the deterministic path, and double-free is a Go-side no-op. Commits are split so the generated bindings are separate from the template/logic changes, keeping the reviewable diff small. Closes ZML-1182🤖 Generated with [Claude Code](https://claude.com/claude-code) See merge request software-public/zaber-motion-lib!1758 -
Soleil Lapierre authored
-
Soleil Lapierre authored
Co-authored-by:Colby Sparks <colby.sparks@zaber.com>
-
Soleil Lapierre authored
-
Soleil Lapierre authored
Add a comment about default units of measure. #ZML-1180 Fixed See merge request software-public/zaber-motion-lib!1764
-
Martin Zak authored
-
Martin Zak authored
Update FB and ND warning flag descriptions to match protocol manual Two `WarningFlags` descriptions were narrower than the [ASCII Protocol Manual](https://docs.izaber.com/firmware/protocol-manual/ascii/7/#topic_message_format_warning_flags), which titles both flags as covering PVT sequences alongside streams: | Flag | Was | Now | |---|---|---| | `FB` | Stream Bounds Error | Stream/PVT Sequence Bounds Error | | `ND` | Stream Discontinuity | Stream/PVT Sequence Discontinuity | Only the doc strings change. Constant names (`STREAM_BOUNDS_ERROR`, `STREAM_DISCONTINUITY`) and flag values are untouched, so this is not a breaking change. Edited `templates/src/templates/definitions/warning_flags.ts` and ran `npx gulp gen_code`; the other 8 files are regenerated output. The `internal/dto/` line-ending churn that `gen_code` produces on Windows was reverted so the diff stays focused. ### Notes for the reviewer While comparing against the manual I found further drift that is **not** addressed here, since fixing it either needs a rename of public constants or a decision from you: - `FD` is titled *Driver Temperature/Current Error* in current firmware; we say *Driver Disabled* and add "Devices with Firmware 7.10 and lower". That version note is wrong — `FD` has no max-firmware in the manual and still exists on 7.60. - `FS` is titled *Stalled* (was *Stalled and Stopped* in 7.26 and below). - `WT` is titled *Temperature High* and covers controller, lamp, or motor; we say *Controller Temperature High*. - `FP` was removed in firmware 7.09 and above, but carries no version note. - `NU` (Setting Update Pending) and `NJ` (Joystick Calibrating) appear in no published manual version — the manual only publishes 7.08 through 7.60. Comparing the manual at version 7.08 shows our `FB`/`FD`/`FS`/`ND` wording matches it verbatim, so these descriptions were written against a ~7.08-era manual and never refreshed.
🤖 Generated with [Claude Code](https://claude.com/claude-code) See merge request software-public/zaber-motion-lib!1763 -
Martin Zak authored
-
Martin Zak authored
ZL-1999, ZL-2000: add settle and auto laser power objective parameters Adds three new named parameters to the existing `Autofocus.getObjectiveParameters()` / `setObjectiveParameters()` API. No new methods, no DTO or API definition changes, so no `gulp gen_code` run and no per-language binding work — this is Go core plus e2e tests only. - **ZL-2000** — `settle_tolerance` and `settle_period` - **ZL-1999** — `auto_laser_power_limit` ## ZL-2000 — settle tolerance and period Stored per objective on the focus axis and applied to `motion.tracking.settle.tolerance` and `motion.tracking.settle.period` when the objective becomes current, the same way `control_loop_kp` / `ki` already work. The four stored parameters now come from one table rather than being spelled out in each of `loadAutofocusObjectives`, `autofocusGetObjectiveParams`, `autofocusSetObjectiveParams` and `autofocusSyncTrackingParams`. Sync now reads and writes only the settings an objective actually overrides. Besides being fewer commands, this means a device without `motion.tracking.settle.*` (firmware below 7.40) is never asked for them unless someone deliberately stores an override. ## ZL-1999 — auto laser power limit WDI register P10, `DtWordEnm`, 0–1023 digital units, where **0 means no limit** (`atf_ReadAutoLaserPowerLimit` in the PFA-DT/LN Functions Library Reference Guide). Raw digital units rather than a percentage so the value round-trips exactly and `0` is unambiguous. The register applies to the currently selected objective. The register needs WDI firmware 3.0. On older firmware the parameter is **left out of the reported list entirely** rather than reported as `null`, which keeps `null` free to mean "the objective is disabled": ``` FW 2.x: [magnification, max_exposure, signal_to_noise_ratio] FW 3.x, objective off: [..., { auto_laser_power_limit, null }] FW 3.x, no limit: [..., { auto_laser_power_limit, 0 }] FW 3.x, limited: [..., { auto_laser_power_limit, 512 }] ``` Setting it on older firmware throws `NotSupportedException` naming the required firmware, rather than silently dropping the value. `IsValidParameter(name) bool` on `ioc.AutofocusProvider` becomes `ValidateParameter(name) errors.SdkError` so the provider can report the firmware gate as well as an unknown name. ## Register identification A register ID is only meaningful within a bank, and each register has a fixed width, so `Request` and `RequestFloat` now carry a single `Register` value instead of a loose bank, ID and data type. Every register the library talks to is named, including the ones that were bare numbers before. The two signal-to-noise registers are now told apart by their bank (`signalToNoiseRatioRegister` U231, `signalToNoiseRatioPfaRegister` P11) rather than by a `Float` suffix that named the encoding instead of the actual difference. `RegisterBank` and `RegisterDataType` become distinct types. They were aliases of `byte`, so nothing stopped a bank, a register ID and a data type from being passed in each other's places — which matters once all three sit in one struct. Also drops the bank parsing duplicated across the four generic register calls, and the implicit user-bank default in `makeHeader` that no longer has a caller which omits the bank.🤖 Generated with [Claude Code](https://claude.com/claude-code) See merge request software-public/zaber-motion-lib!1765 -
Martin Zak authored
-
Martin Zak authored
ZL-1997: bump zaber-device-db-service Propagates the atomic config-file write from #ZL-1997 into this repo. The device DB service file store used to write config files by hand: create a temp file, write it, then rename it over the target. That was moved to a shared `WriteFileAtomic` helper in zaber-go-lib (`pkg/utils/files.go`), and zaber-device-db-service was changed to call it in `pkg/store/fs_store.go`. Both of those changes are already merged. This repo vendors the device DB service as a Go dependency, so it needs a version bump to pick the fix up. Changes are limited to `go.mod` and `go.sum`: - `gitlab.com/ZaberTech/zaber-device-db-service`: `v0.0.0-20260321034906-d07612c69337` → `v0.0.0-20260819205842-f65107591f67` - `gitlab.com/ZaberTech/zaber-go-lib`: `v0.0.0-20260321034215-e98f002fe839` → `v0.0.0-20260819201212-d5b77ec59709` zaber-go-lib moves because the new device DB service master requires it and minimal version selection pulls it in. It is bumped explicitly so `go.mod` states it directly rather than leaving it implied. `go mod tidy` also refreshed a few `go.sum`-only transitive test dependencies (`stretchr/testify`, `gopkg.in/yaml.v3`) and pruned stale entries for `zabertech/go-serial` and `golang.org/x/sys`. No first-party source files changed. Verified locally on Windows: `go build ./...` and `go vet ./...` both clean, `golangci-lint run` at the repo-pinned v2.11.3 reports 0 issues, and `go test ./internal/...` passes across all five test packages. Also confirmed in the resolved module cache that `fs_store.go` now calls `utils.WriteFileAtomic` and that the helper exists in the bumped zaber-go-lib. See merge request software-public/zaber-motion-lib!1767
-
Colby Sparks authored
-
Colby Sparks authored
Pin ZML Core from DLL Constructor I didn't manage to reproduce the specific crash that our customer observed when his 'compiled' MATLAB application exited, but I did (with Claude's help) get the library to produce the same access violation crash by loading and unloading it before the `invoker.go` init function which pins the DLL could be called. Moving the pinning function call to a `dll`/`dylib`/`so` constructor has fixed this issue. I've also added a check in the init function which will panic if the library hasn't been pinned. #zml-1181 Fixed Related to zml-1181 See merge request software-public/zaber-motion-lib!1766
-
Martin Zak authored
Co-Authored-By:Claude Opus 5 (1M context) <noreply@anthropic.com>