regcldwall( sectionname, priority )
Parameters
| Type | Description | |
| sectionname | section | name of a section |
| priority | numeric | event priority |
_result
Not set.
Descriptions
Registers the section specified by sectionname
to handle wall collision events. The wall collision event handler
is called if no higher priority events are occurring when a robot runs into a
wall.
Wall collision events are triggered by the _cldwall variable. When a
wall collision event handler
completes, the _cldwall variable is automatically set to false causing the event to end.
When a robot collides with any obstacle the following system variables are updated to provide information about the
collision: _cldbearing,
_cldheading, _cldenergy,
_cldid, and _cldteamid.
Robots only track information about the most recent collision event, causing all _cld
variables to be reset for each collision.
The priority value should be a whole number, decimals are ignored.
Lower numbers are higher priority. The highest priority possible is 1. If two events registered with the same priority occur at the same time, it is unspecified which event handler will be called.
When an event handler is registered or re-registered, it becomes immediately active. Use the cldwallevents command to temporarily deactivate a registered event handler.
See Also
cldwallevents, _cldwall, _cldbearing, _cldheading, _cldenergy, _cldid, _cldteamid, event summary