View Single Post
Old 03-04-2019, 04:42 PM   #2688
Geoff Waddington
Human being with feelings
 
Geoff Waddington's Avatar
 
Join Date: Mar 2009
Location: Dartmouth, Nova Scotia
Posts: 11,252
Default

Quote:
Originally Posted by MalcolmG View Post
That makes sense, but the one thing I wonder now is when I have a Press with two messages, what's the second one? if it is alternating (which it seems to be), doesn't that go against that model.
Consider the MCU Stop button
Code:
Stop 	    PressFB 90 5d 7f  90 5d 00
When a 90 5d 7f is received, a 1 is output as normal.

This button has no release behaviour so that the heck is 90 5d 00 there for ?

The light.

So in reality what we are dealing with here is the use of one protocol for two purposes.

When the button is pushed 90 5d 7f is sent from the hardware to CSI.

CSI can control the light state by sending 90 5d 7f (on) or 90 5d 00 (off) to the hardware.

Here's where things get funky with some surfaces.

Let's assume a surface with some PressFB button with a light.

When the button is pressed, 7f gets sent to CSi AND the surface sets it's own internal state to 7f, also turning on the light, in the process.

Next time the button is pressed it notices it is in the 7f state so it sends a 00, and thereby turns off the light.

CSI can also set then light state.

With many of these type controllers, that ALSO sets the internal state, so the next press (7f or 00) is also dependant on what state CSI set the button light to.

Clear as mud ?

I know, it's quite a mess

The best results are always achieved by getting the hardware to "let go and stop trying to be such a control freak, just let CSI provide the feedback"
__________________
To install you need the CSI Software and Support Files
For installation instructions and documentation see the Wiki
Donate -- via PayPal to waddingtongeoff@gmail.com

Last edited by Geoff Waddington; 03-04-2019 at 05:27 PM.
Geoff Waddington is offline   Reply With Quote