mosh:element_library:switch
This is an old revision of the document!
Table of Contents
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
switch_element.set_flick_delay(uint16_t); //default is 250ms
Properties
switch_element.get_state(); //current state of switch (on/off)
Element Message
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 };
/var/www/wiki.moshnetworks.com/data/attic/mosh/element_library/switch.1750989904.txt.gz · Last modified: by mosh
