SPLat Logo

# ConnectEvent()

NOTICE: Our web site is being updated, but is currently experiencing extreme slowness due to host issues. Please contact us directly.
NOTICE: SPLat Controls has moved. We are now at 1/85 Brunel Rd, Seaford, 3198. map

# ConnectEvent()

Valid For #HMI
Applies To HMI430

This instruction registers a subroutine that will be called when specific events occur.

Function Prototype

# ConnectEvent(
ev:EventHandler )

 

ParameterOptionDescription
ev mandatory    The name of the subroutine that will be called when an event occurs.

Description

On a controller, this event is called for the reasons in the table below.

EventDescriptionParameters
Backlight Change    This event signals a change in the backlight state, meaning the backlight is now either HIGH, MEDIUM or OFF.  The backlight state as well as the actual level is passed in the parameter list. State,Level
PowerOnTouch This event signals the user has been pressing the touch screen for 2 seconds since power on.  This is useful for activating touch screen calibration. nil

A module that looks after processing the event message is available for download here:

Download ui_utils.spt

Either #Include this file or place it in a build script.  Full details on ui_utils.spt can be found on this page.

NOTE: ConnectEvent() in a touch screen controller (like the HMI430) is very different to ConnectEvent() in the Android & Windows implementation of SimpleHMI.  After all, the LCD is always connected in a touch screen controller, therefore it's used for different things.