Low-level reactions for bump sensors. More...
Go to the source code of this file.
Functions | |
void | lo_bumps (void) |
char | lo_bumps_pending (void) |
void | lo_send_bumps (void) |
Send pending bumps acknowledgement to the high level. |
Low-level reactions for bump sensors.
This file defines an API for examining the iRobot Create's bump sensor states and taking appropriate action to avoid whatever lobot has bumped into. Additionally, this module provides an API for sending the bump sensor acknowledgement to the high level.
Definition in file LoBumps.h.
void lo_bumps | ( | void | ) |
This function reacts to the iRobot Create's bump sensors. If the bump sensors are indeed active, it sets a flag to indicate to the main program that a bumps acknowledgement needs to be sent to the high level.
Definition at line 84 of file LoBumps.c.
References lo_backup(), lo_get_sensor(), lo_hibyte(), lo_lobyte(), lo_rear_bumps_spin(), lo_spin(), lo_stop_immediate, lo_update_odometry(), LOBOT_BUMP_ACK_REAR_LEFT, LOBOT_BUMPS_ANGLE_HI, LOBOT_BUMPS_DISTANCE_HI, LOBOT_BUMPS_FLAGS, LOBOT_OI_BUMP_LEFT, and LOBOT_SENSORS_BUMPS.
char lo_bumps_pending | ( | void | ) |
This function returns true if Robolocust's low-level Command Module control program reacted to the bump sensors and needs to send an acknowledgement to the high level letting it know what the low level did.
Definition at line 154 of file LoBumps.c.
References LOBOT_BUMPS_FLAGS.
void lo_send_bumps | ( | void | ) |
Send pending bumps acknowledgement to the high level.
Definition at line 160 of file LoBumps.c.
References lo_tx(), LOBOT_ACK_BUMPS, LOBOT_BUMPS_FLAGS, and LOBOT_BUMPS_SIZE.