bug(stage3): instlist device index is passed as chartread -c comm port #111
Notifications
Total Time Spent: 50 hours 50 minutes
gronod
50 hours 50 minutes
No due date set.
Dependencies
No dependencies set.
Reference: gronod/ICCery#111
Reference in New Issue
Block a user
Kind/Bug,Priority/Highfix/chartread-comm-port(fromdevelopment)Description
#86 added instrument autodetection via
instlistand a dropdown. The selected option’s value is the instlist ordinal (1,2, …).build_chartread_argsthen emits-c {index}.In ArgyllCMS these are different lists. They often coincide when a single USB i1Pro is port
1. With two instruments, or USB plus serial,-c 2can select the wrong port or a non-spectro device.Current behaviour
instlistchartread -??-c NFrontend (
src/js/chartread.js):Backend (
src-tauri/src/commands.rs):The instlist regex is also too loose and will match unrelated numbered log lines:
Proposed solution
Pick one of the following, in order of preference.
Option A (recommended)
Do not pass
-cfrom instlist. Use instlist only as a presence/health display (Found i1Pro on USB). Let Argyll default to the first usable port (-comitted). Document that in the UI.Option B
Parse
chartread -??(the communication-port dump Argyll prints) and populate the dropdown from that list. Values must be the Argyll comm-port numbers. Show the instrument name as the label if USB strings can be correlated.Option C
If
instlistoutput includes a usable port specifier, pass that string only when it is a documented-cargument. Do not assume ordinal equality.Also tighten the instlist regex. Require a known instrument token (
i1,ColorMunki,Spyder,spectro,Display,Huey,DTP,SpectroScan) or theon '…'port clause.UI copy must not say “instrument index”. It should say “communication port” or “auto”.
Files
src/js/chartread.js— dropdown values, regex, copysrc-tauri/src/commands.rs—build_chartread_argsand testssrc/index.html— Stage 3 help textAcceptance criteria
-c).port: None→["-v", "-u", basename].port: Some("1")only when that1is a comm port.instliststdout containing1: somethingthat is not an instrument is not added to the dropdown.Dependencies
None.
# bug(stage3): instlist device index is passed as chartread -c comm port | Field | Value | |---|---| | Labels | `Kind/Bug`, `Priority/High` | | Priority | High | | Milestone | v0.3.3 hotfix | | Related | #86 | | Branch | `fix/chartread-comm-port` (from `to # bug(stage3): instlist device index is passed as chartread -c comm port# bug(stage3): instlist device index is passed as chartread -c comm portto bug(stage3): instlist device index is passed as chartread -c comm portResolved via PR #120.
chartreadnow defaults to auto-detected first available device and does not pass theinstlistordinal index as-c. Regex detection was tightened to known instrument tokens and UI labels updated.