LoCliffs.h File Reference

Low-level reactions for the cliff sensors. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define lo_is_cliff_detected()   lo_cliffs_pending()
 Returns true if a cliff is detected; false otherwise.

Functions

void lo_cliffs (void)
char lo_cliffs_pending (void)
void lo_send_cliffs (void)
 Send pending cliff sensor acknowledgement to the high level.

Detailed Description

Low-level reactions for the cliff sensors.

This file defines an API for examining the iRobot Create's cliff sensors and backing lobot up in case it is on the brink of teetering off the edge of a stairway or something like that. Additionally, this module provides an API for sending the cliffs acknowledgement to the high level.

Definition in file LoCliffs.h.


Define Documentation

 
#define lo_is_cliff_detected (  )     lo_cliffs_pending()

Returns true if a cliff is detected; false otherwise.

Definition at line 73 of file LoCliffs.h.


Function Documentation

void lo_cliffs ( void   ) 

This function reacts to the iRobot Create's cliff sensors. If any of them are indeed active, it sets a flag to indicate to the main program that a cliffs acknowledgement needs to be sent to the high level.

Definition at line 85 of file LoCliffs.c.

References lo_backup(), lo_get_sensor(), lo_hibyte(), lo_lobyte(), lo_spin(), lo_update_odometry(), LOBOT_CLIFFS_ANGLE_HI, LOBOT_CLIFFS_DISTANCE_HI, LOBOT_CLIFFS_FLAGS, and LOBOT_SENSORS_CLIFF_LEFT.

char lo_cliffs_pending ( void   ) 

This function returns true if Robolocust's low-level Command Module control program reacted to the Create robot's cliff sensors and needs to send an acknowledgement to the high level letting it know what the low level did.

Definition at line 161 of file LoCliffs.c.

References LOBOT_CLIFFS_FLAGS.

void lo_send_cliffs ( void   ) 

Send pending cliff sensor acknowledgement to the high level.

Definition at line 167 of file LoCliffs.c.

References lo_tx(), LOBOT_ACK_CLIFFS, and LOBOT_CLIFFS_SIZE.

Generated on Sun May 8 08:42:49 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3