Skip to content

Add safe color controls - #82

Open
wattsjus wants to merge 1 commit into
todbot:mainfrom
wattsjus:agent/add-safe-color-controls
Open

Add safe color controls#82
wattsjus wants to merge 1 commit into
todbot:mainfrom
wattsjus:agent/add-safe-color-controls

Conversation

@wattsjus

Copy link
Copy Markdown

What changed

  • add native --orange (#FF8000) and --purple (#E000A0) color commands
  • on macOS, stop older blink1-tool processes before executing a new command
  • wait briefly for an older process to release its HID handle before opening the device

Why

Continuous commands such as --playpattern keep running in their original process. A later invocation can set a new color, but the older animation then writes to the device again. This makes automation handoffs, such as moving from a pulsing Focus status to a solid meeting status, unreliable.

The macOS process handoff makes the newest invocation authoritative while retaining the existing command syntax. The two additional named colors provide convenient aliases consistent with the existing named-color options.

Impact

On macOS, invoking blink1-tool now terminates other processes named blink1-tool owned by any visible process entry before accessing the device. Other platforms retain their current process behavior.

Validation

  • built successfully with CMake as a universal macOS binary
  • tested --orange and --purple on a blink(1) mk3
  • started an infinite purple --playpattern, then verified that blink1-tool --red terminated the older animation and left the light solid red
  • ran git diff --check

@wattsjus
wattsjus marked this pull request as ready for review August 13, 2026 04:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant