Kangaroo Library for Arduino
Use reliable Packet Serial to communicate with your Kangaroo.
|
Makes it easy to track the status of position commands, speed commands, and any other commands that take time to complete. More...
Public Member Functions | |
KangarooStatus | status () const |
boolean | valid () const |
KangarooMonitor | update () |
KangarooMonitor | update (int32_t timeoutMS) |
KangarooMonitor | update (const KangarooTimeout &timeout) |
KangarooMonitor | wait (int32_t timeoutMS=KANGAROO_INFINITE_TIMEOUT) |
KangarooMonitor | wait (const KangarooTimeout &timeout) |
Makes it easy to track the status of position commands, speed commands, and any other commands that take time to complete.
KangarooStatus KangarooMonitor::status | ( | ) | const |
Gets the most recently received status.
KangarooMonitor KangarooMonitor::update | ( | ) |
Updates the status. The channel's command timeout is used.
KangarooMonitor KangarooMonitor::update | ( | int32_t | timeoutMS | ) |
Updates the status.
timeoutMS | The timeout to use, in milliseconds. |
KangarooMonitor KangarooMonitor::update | ( | const KangarooTimeout & | timeout | ) |
boolean KangarooMonitor::valid | ( | ) | const |
Gets whether the status is valid. If you keep an old KangarooMonitor object around and issue a new command on the same channel, the old KangarooMonitor will become invalid.
KangarooMonitor KangarooMonitor::wait | ( | int32_t | timeoutMS = KANGAROO_INFINITE_TIMEOUT | ) |
Waits until KangarooStatus::done() returns true or the timeout expires.
timeoutMS | The timeout to use, in milliseconds. |
KangarooMonitor KangarooMonitor::wait | ( | const KangarooTimeout & | timeout | ) |
Waits until KangarooStatus::done() returns true or the timeout object expires.
timeout | The timeout object to use. |