Component: Pedestrian Crossing (Scenarios)
Author | Matrix TSL |
Version | 1.0 (Release) |
Category | Scenarios |
Contents
Pedestrian Crossing component
A set of pedestrian crossing lights complete with manual light control, a simple state machine and an automatic mode to allow the lights to take care of themselves.
Examples
No additional examples
Downloadable macro reference
This component does not contain any downloadable macros
Simulation macro reference
GetStopGo
Reads one of the light sets to determine if it is safe to go through the lights.
Returns 1 for a Green light, otherwise returns 0.
Parameters
- This macro has no parameters
Return value
- BOOL : Returns true if the operation is a success, else false
ReadSwitch
Check to see if switch is currently pressed.
Return: 0 = Not Pressed, 1 = Pressed
Parameters
- This macro has no parameters
Return value
- BOOL : Returns true if the operation is a success, else false
AutomaticMode
Enables or Disables automatic mode where the lights will automatically cycle between modes.
Parameters
- BOOL Mode
- 0 = Auto Mode Disabled, 1 = Auto Mode Enabled
Return value
- This call does not return a value
GetLightState
Reads the state of one of the light sets.
Returns the state as a number.
0=Red, 1=Red+Wait, 2=Green, 3=FlashingGreen, 4=Unknown State
Parameters
- This macro has no parameters
Return value
SetLights
Direct control over all 3 of the lights.
Parameters
- BOOL Red
- 0 = Off, 1 = On
- BOOL Green
- 0 = Off, 1 = On
- BOOL Wait
- 0 = Off, 1 = On
Return value
- This call does not return a value
SetLightState
Follows the standard pedestrian crossing light sequence.
Parameters
- BYTE SequenceNumber
- 0 = Red, 1 = Red+Wait, 2 = Green, 3 = Green Flashing
Return value
- This call does not return a value
Property reference
Red Colour
This property is of type Color picker and can be referenced with the variable name Red.
No additional information
Green Colour
This property is of type Color picker and can be referenced with the variable name Green.
No additional information
Wait Colour
This property is of type Color picker and can be referenced with the variable name Wait.
No additional information
Off Colour
This property is of type Color picker and can be referenced with the variable name Off.
No additional information
Wait Time
This property is of type Unsigned integer and can be referenced with the variable name WaitTime.
Amount of time to wait in milliseconds the pedestrians have to wait before being allowed to cross.
Crossing Time
This property is of type Unsigned integer and can be referenced with the variable name CrossTime.
Amount of time to wait in milliseconds for the pedestrians to cross the road.
Flash Time
This property is of type Unsigned integer and can be referenced with the variable name FlashTime.
Amount of time to wait in milliseconds to warn pedestrians to finish crossing the road.
Switch
This property is of type Single digital pin and can be referenced with the variable name Switch.
No additional information