Aesl Program
Functions
Motion

Incoming events to change motion queue: Q_*. More...

Functions

 Q_add_motion (integer Qid, integer Qtime, integer QspL, integer QspR)
 Q_add_motion job %n for %n csec, left %n right %n. More...
 
 Q_cancel_motion (integer Qid)
 Q_cancel_motion job %n. More...
 
 Q_set_odometer (integer angle, integer x, integer y)
 Q_set_odometer theta %n x %n y %n. More...
 
 Q_reset ()
 Q_reset. More...
 

Detailed Description

Incoming events to change motion queue: Q_*.

The REST API provides events for sending requests to the motion queue. Note that the brief description line for each will be used as the Scratch block definition.

Changes to the motion queue will be broadcast using events Q_motion_added, Q_motion_cancelled, Q_motion_started, Q_motion_ended, Q_motion_noneleft.

Function Documentation

Q_add_motion ( integer  Qid,
integer  Qtime,
integer  QspL,
integer  QspR 
)
inlineprivate

Q_add_motion job %n for %n csec, left %n right %n.

Add a task to the motion queue

Parameters
Qidtask id
Qtimetime in 100ths
QspLleft motor speed
QspRright motor speed
Q_cancel_motion ( integer  Qid)
inlineprivate

Q_cancel_motion job %n.

Cancel a task in the motion queue

Parameters
Qidtask id
Q_reset ( )
inlineprivate

Q_reset.

Reset the queue and stop motors

Q_set_odometer ( integer  angle,
integer  x,
integer  y 
)
inlineprivate

Q_set_odometer theta %n x %n y %n.

Set the odometer

Parameters
angleangle in Aseba radians
xx coordinate
yy coordinate