Thanks again for the help. I've got the SWC controls working great.
1st thing is that I needed to wait for the nopress value to be detected because while Centrafuse is waking up the brain starts reading zeros first and then ramps up to the nopress which is the largest value. Only once I have received a nopress value do I start handing out signals.
The timer fires every 0.1 seconds and I only see values in 5s (5, 10, 15 etc.). That's my threshold setting for this port.
If the previously read value is not the same then I ignore the values because we are sliding to a value to settle on. Only once two consecutive values (within the threshold) have been detected do I update the actual signal value.
Once a Mute or Mode value has been handed out (not just detected) then I don't hand out any more signals until a nopress has been detected. That makes it real simple to handle those two buttons. The user has to release the button and press it again for it to have any effect.
Volume or Seek Up/Down keep handing out values if continually pressed.
It's working like a charm. The response to a press is fast enough, the continuous press is not too fast and for Mute & Mode the length of time pressed does not cause a problem.
Excellent.



LinkBack URL
About LinkBacks
Reply With Quote




Bookmarks