-
Notifications
You must be signed in to change notification settings - Fork 45
Support ValueChanged and DebounceTimeout in Lightning Provider #26
Comments
We're actively working on the interrupt support and expect to have it available within a few weeks. For the timestamp request, we would have to update the in-box APIs and so that can't be added as part of a github update. We do like that feature request though and are looking at options for implementing it and getting it out there. Thanks, |
Sounds great, thanks for replying so quickly 👍 |
Hello! Is there any news about ValueChanged supporting? |
We've been blocked on a few related issues, but have just cleared those up. They will be going up today. --Jesse |
Thanks! |
|
I installed Microsoft IoT Lightning SDK 1.1.0-alpha. However, the ValueChanged still does not work. |
@andyfung What is the error you're getting? Can you share some code? |
I am running the sample code BlinkyBackground and PushButton from https://github.com/ms-iot/BusProviders/tree/develop/Microsoft.IoT.Lightning.Providers. In BlinkyBackground, it is work well. But in PushButton, there is no interrupt with ValueChanged. |
Is the HW setup for the PushButton the same as the one here ? |
Also, are you using Raspberry Pi 2/3 or MBM? |
And I set breakpoint in the if statement shown as below, so I can tell lightning is enable or not:
When lightning is enabled, ValueChanged does not work. |
And I am running on Rasp Pi 2. |
@andyfung Thanks for your feedback. |
Thanks a lot! I appreciated it. |
Hello! Any updated? |
Apologies for the delay. I'm still unable to reproduce the issue with the latest Lightning SDK. |
Thanks. Let me know if more information is needed from me. |
I figured you maybe using an older build of IOT Core. My guess, you're using 10586? |
Correct. i am using 10586 which the instruction told me. How can I get 14352? |
I flash my SD with IoT core which I got it from https://developer.microsoft.com/en-us/windows/iot/downloads |
To get 14352, 1- Please download and install the Windows IOT Core Dashboard from here. Also available from https://developer.microsoft.com/en-us/windows/iot/downloads |
I have the Dashboard already. The problem is the device type doesn't show me 14352. It only show me "Windows IoT Core for Raspberry Pi 2". |
My apologies! Looks like insider preview builds were not published yet. You can still download Insider preview build 14342 from http://go.microsoft.com/fwlink/?LinkId=733603. |
And, here are instructions to manually install an Insider build: https://developer.microsoft.com/en-us/windows/iot/win10/GetStartedManually.htm |
ValueChanged seems to work now. Thanks. |
@andyfung Thanks for confirming! |
Unfortunately this is just not performing for PWM input (pulse length/timing) calculation. Because we didn't get the timestamp property I requested, it appears that the lower level (higher priority) event handling is now causing more of a delay to my user code. Meaning in end effect that attempts at "after the fact" PWM decoding are now worse! Here are some actual values from the current Lightning provider (same PWM calculation code, only the driver setting is changed): PWM Frame at 2256385689 1=2127 2=1552 3=1017 4=920 5=870 6=937 7=989 8=1010 Totally erratic, e.g. PWM value 1 was really about 1500 but varies here up to over 2400! In contrast, here are the results from the same code with the old "inbox" driver: PWM Frame at 96264950 1=1333 2=1441 3=914 4=1468 5=990 6=1497 7=1061 8=946 Still not perfect but at least within the same ballpark! If I activate my CPPM validity filter, which ensures that the low and high times are not beyond the CPPM standard maximum of "about" ~300 microseconds (I gave it 600 to account for manufacturer differences) then I get no data at all! If I only had the timestamp available from the low level code (where and when the "fact" occurred), then my code would change to virtually no calculation at all, so the PWM values (both value and length) would be atomic and potentially useful for real world applications. I will open an issue requesting that small feature with this justification. Just one little timestamp value would make a world of difference to the possibilities. |
If you sign up for Windows Insider, the next preview build* of IoT Core will provide a timestamp, captured as early as possible, for each interupt. We'll also store them in a reasonably large (1 page) buffer so you don't have to service the events in real time to get the appropriate data. Please give it a try and let us know if it meets your needs. We're working on better reconciliation between the in-box and direct memory mapped driver. That will be available in a future preview and we'll have more details as we get closer. *There is a small chance that the new timestamp feature just missed the snap deadline for the upcoming flight. If it did, it will be in the next one. |
Wow that is exactly what we need! That will close #42 when it is released 👍 I'm already using the insider build and downloaded the preview a few days ago, but I'll check again regularly until I see something new. |
ValueChanged is not working for me. I'm using Minnowboard Turbot dual core with windows iot build 16299. I have added Microsoft.IoT.Lightning v1.1.0. I wanted to capture an interrupt continuously (which is generated at an interval rate of less than 100 micro seconds) using a gpio as input pin. I'm able to set a gpio as output also. Now i need to use ValueChanged. Can anyone help me in this regard. |
The current Lightning provider does not support the ValueChanged event or the DebounceTimeout property because, according to the source GpioDeviceProvider.h it says "Not implemented since Lightning does yet support interrupts yet".
I don't see any roadmap or milestone in GitHub. Can you please give us a hint how long it will be before we can use that.
Also when you implement it, please consider this feature request I made at the IoT forum (https://social.msdn.microsoft.com/Forums/en-US/af4018ad-5658-4048-86a0-ae13c994effb/gpio-drivers?forum=WindowsIoT see answer from MSFT Jordan Rhee), to add the timestamp to the event. It makes more sense then when PWM decoding and increases potential accuracy of software decoding.
The text was updated successfully, but these errors were encountered: