LoRemote.c File Reference

Implementation of the low-level remote control module. More...

#include "LoDrive.h"
#include "LoSensors.h"
#include "LoIO.h"
#include "LoTimer.h"
#include "LoCMInterface.h"
#include "LoOpenInterface.h"
Include dependency graph for LoRemote.c:

Go to the source code of this file.

Enumerations

enum  { AUTONOMOUS, REMOTE_CONTROL }
enum  { LOBOT_REMOTE_DRIVE_SPEED = 250, LOBOT_REMOTE_TURN_SPEED = 100, LOBOT_REMOTE_TIMEOUT = 1500, LOBOT_POWER_DEBOUNCE = 5 }

Functions

static char supported_cmd (char c)
static void execute (char ir_cmd)
void lo_remote (void)
char lo_remote_pending (void)
void lo_send_remote (void)
 Send pending remote control acknowledgement to the high level.
char lo_is_remote_control (void)
char lo_remote_quit (void)

Variables

static char g_state
static unsigned long g_time
static char g_remote [LOBOT_REMOTE_SIZE+1]
static char g_power_count

Detailed Description

Implementation of the low-level remote control module.

Definition in file LoRemote.c.


Function Documentation

char lo_is_remote_control ( void   ) 

Returns true if the user is remote controlling the robot; false if the robot is operating autonomously.

Definition at line 235 of file LoRemote.c.

void lo_remote ( void   ) 

This function reacts to the Roomba Remote commands. If a remote command was indeed sent by the user and handled by the low-level controller, it sets a flag to indicate to the main program that a remote control acknowledgement needs to be sent to the high level.

Definition at line 179 of file LoRemote.c.

References lo_get_sensor(), lo_ticks(), and LOBOT_SENSORS_INFRARED_BYTE.

char lo_remote_pending ( void   ) 

This function returns true if Robolocust's low-level Command Module control program reacted to a Roomba Remote button press and needs to send an acknowledgement to the high level letting it know what the low level did.

Definition at line 216 of file LoRemote.c.

References LOBOT_ACK_REMOTE.

char lo_remote_quit ( void   ) 

Returns true if the Roomba Remote's 'P' button has been pressed; false otherwise.

NOTE: In addition to the 'P' button, the Roomba Remote's "Spot" and "Max" buttons may also be used to quit the low-level controller.

Definition at line 242 of file LoRemote.c.

void lo_send_remote ( void   ) 

Send pending remote control acknowledgement to the high level.

Definition at line 222 of file LoRemote.c.

References lo_tx(), and LOBOT_REMOTE_SIZE.

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