Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with 'W' Command "Save color patterns" on blink(1) device #684

Open
mukirkland opened this issue Nov 30, 2023 · 1 comment
Open

Issue with 'W' Command "Save color patterns" on blink(1) device #684

mukirkland opened this issue Nov 30, 2023 · 1 comment

Comments

@mukirkland
Copy link

mukirkland commented Nov 30, 2023

I am encountering a problem with the 'W' command, as outlined in the HID command document.

As per the given structure { 1, 'W', 0,0,0, 0,0, 0 }, this command should enable me to "Save color patterns" to Flash. Unfortunately, this command doesn't seem to function properly on my blink(1) device.

While trying to use the 'W' command to save color patterns, the command fails to execute successfully, without any visible changes or error messages in the blink(1) device, and patterns hadn't been kept after the power off.

@todbot
Copy link
Owner

todbot commented Nov 30, 2023

The 'W' command is used to save the current pattern in RAM to flash.
The 'P' command changes a single color pattern line.
Please try using the command-line program blink1-tool to exercise these commands. You can see how they're implemented in the accompanying blink1-lib.c library. (specifically, the blink1_writePatternLine() and blink1_savePattern() functions)

For example:

# Change the 2nd color pattern line to #112233 with a 0.5 sec fade
blink1-tool -m 500 --rgb 112233 --setpattline 1 
# Write entire pattern from RAM to flash
blink1-tool --savepattern 

If blink1-tool --savepattern is not done, any changes to the RAM pattern will be lost when powered off and the flash pattern gets reloaded into RAM.

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

No branches or pull requests

2 participants