-
Notifications
You must be signed in to change notification settings - Fork 236
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
macOS System regional number formatting is affecting blink(1) patterns #347
Comments
Of course, the most obvious fix is to set the decimal separator to ".", but then you have solved one problem and gained 9.999 new ones (or 9,99 - who knows?) |
Hi @atchoo78, Are you essentially changing the "number separators" setting in System Preferences -> Language & Region -> Advanced...? |
@todbot : Major update following I just did a couple of tests, just to be on the safe side, and it turns out that (most likely) I was wrong in my assumptions regarding the language & region settings. I wasn't aware that Sure enough, when adding an extra "0" to every color of the pattern, it was added flawlessly regardless of decimal separator. That also explains why it "worked" when I use the "," separator. I couldn't find any references to the "led" parameter here or here, so that's what put me off when I tried to refresh my memory on the server commands. Sorry that I sent you out on a wild goose chase too 😣 PS! I just received my blink(1) mk3 today, and it ROCKS with or without decimals! 👍🏼 |
I discovered this today, after some heavy duty debugging until my head nearly imploded:
If the macOS system language is set to any language with a comma separator (delimiter)
instead of a period (which is the default in all English languages, as far as I know), adding a new pattern through Blink1Control2 won't work unless you replace all period characters with a comma.
This can be totally confusing because the comma already separates the different segments of the URL, but I'm afraid the rabbit hole is far deeper and far more complex 🐇
Even if adding the pattern will succeed (and by that I mean that the repeats, timing and rgb hex is "translated" correctly to their respective places in the response text), it is not possible to play the pattern afterwards, because (as you may have guessed by now)...
"/pattern/play" is hard coded to understand periods instead of commas, and that's what almost made my head implode when I tried to grasp the inner beast of this logic.
It's kind of like reverse engineering a catch 22
Examples
This will fail :
One theory I have is that the "." is interpreted as a"full stop" (or something else) by OSX, which messes up the resulting pattern that ends up like this: "3,%2300ff00,1,#5%230000,0,5"
This however, works:
But as I mentioned, it's of no use because the pattern won't play correctly unless you implement some clever string replacing, but that's almost impossible to do, due to the complexity of it all, and LOTS of culprits. The "%23" bit being one of them.
Ok, I've done my best in explaining the problem, so I leave it hanging there for the moment. Now you know.
Ta-ta-ta-taaaa 🎺
Andreas
The text was updated successfully, but these errors were encountered: