User Tools

Site Tools


mosh:element_library:switch

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
mosh:element_library:switch [2025/06/27 02:05] moshmosh:element_library:switch [2025/06/27 14:22] (current) – removed mosh
Line 1: Line 1:
-====== Switch ====== 
  
-  * ACTION_RESET - sent when the switch is first registered. 
-  * ACTION_STATE_ON - sent when the switch is placed in the "on" position 
-  * ACTION_STATE_OFF - sent when the switch is planed on the "off" position 
-  * ACTION_STATE_FLICK - sent when the switch is moved from either on-off-on, or off-on-off within the flick_delay 
- 
-==== Configuration ==== 
- 
-<code c> 
-switch_element.set_flick_delay(uint16_t); //default is 250ms 
-</code> 
- 
-==== Properties ==== 
- 
-<code c> 
-switch_element.get_state(); //current state of switch (on/off) 
-</code> 
- 
-==== Element Message ==== 
- 
-<code c> 
-enum class MOSH_Element_Switch_Action : uint8_t { 
-    ACTION_RESET            = 0x00, 
-    ACTION_STATE_ON         = 0x01, 
-    ACTION_STATE_OFF        = 0x02, 
-    ACTION_STATE_FLICK      = 0x03, 
-    ... 
-    MSG_CUSTOM         = 0xFF  // Reserved for user-defined 
-}; 
-</code> 
/var/www/wiki.moshnetworks.com/data/attic/mosh/element_library/switch.1750989904.txt.gz · Last modified: by mosh

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki