-
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
Blink1 MK2 only 1 LED is activated #327
Comments
Hi, |
Hello Tod,
Thx for you reaction.
Btw I think this is a VERY useful application!.
Below is the stack we basically use.
Application.
----------------
blink1-cs.dll (Managed Blink lib)
in here are the calls
*[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]*
* public static extern System.IntPtr blink1_open();*
*etc.*
----------------
blink1-lib.dll,
----------------
hid.dll.
We are using vs2017 c++17 C#4.7.1 all latest greatest. (64 bit compilation)
When doing the same calls *sometimes* only 1 LED is lid. This is realy confusing
for people who use this as a diagnosis tool.
Additional questions
1) Is it possible to program the flash with the following sequence
solid red 2 sec off 2 sec (endless). I can now only do a fade to transition.
2) The initial startup sequence ( fading red to blue to green to white) was
probably fun
to flash that, is there a way to overrule that behaviour?
Thx in advance
Ruud Sampers
2018-03-22 18:39 GMT+01:00 Tod E. Kurt <notifications@github.com>:
… Hi,
Which C# API are you using? I cannot tell from the methods you're using.
It looks sort of like "Blink1Lib" and not "ManagedBlink1", but I don't see
a PlayPattern() method in "Blink1Lib".
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#327 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AEh4oCPh_Y997iubr9iKL-GmYjaXDCBYks5tg-HsgaJpZM4S27sd>
.
|
I am currently experiencing this problem. My app is using the Blink1 C# API and hidlibrary v3.2.46 in a .NET 4.6.1 app. The issue occurs from a fresh start-up or after resuming from sleep* with the device already connected. From this point on, calls to SetColor() still affect both LEDs but, calls to PlayPreset() affect only 1 LED. The issue is resolved when removing and re-attaching the Blink(1) device. *I suspect that the "demo mode" (blue, red, green cycle), which appears to occur when the device is plugged in while not in communication with the OS/driver, might be the cause of the issue... perhaps it leaves the device in a state which the C# API doesn't reset/clear. |
Hi @laurencedobson,
(As for which C# API, I normally suggest people use the Sleddog.Blink1 on NuGet just because it's 100% .NET (no C library dependency) and it's in a package manager. Second choice would be our ManagedBlink1 library since it's also 100% .NET.) |
Hi @todbot. Thanks for getting back to me.
I note that, when using Blink1Control.exe, everything works as expected. When I then exit and run my app instead, the symptoms still persist. |
Follow-up for 3: Substituting |
While poking around with the command-line tool, |
On a device exhibiting this issue, the pattern being written to it is different. Here's what I did...
The pattern uses 1 (which denotes LED 1 only)
Output: This time, the pattern is set to uses 0 (denoting both LEDs). |
Additionally, while exhibiting the issue, using blink1-tool.exe to play the pattern on a specific LED results in the pattern playing on LED 1, regardless of which LED I specify. Therefore, each of the following commands produces the same result:
|
I realised that what I needed was a way to specify the LED number via the .NET library, so...
Now, ensuring the device was still exhibiting the issue, I then ran the new code to set the pattern and play it... AND IT WORKED :) I'll get the changes put into a PR for you. |
Platform Windows 10, using c# API.
For diagnose purposes we use solid(blinking) red,use solid(blinking) green,
use solid(blinking) blue, off.
It sometimes happens that only 1 LED is on whilest expected to be Both on.
folowing code snippet
The text was updated successfully, but these errors were encountered: