Elisa3
|
#include "irCommunication.h"
Functions | |
void | irCommInitTransmitter () |
Initialize the IR communication state machine in transmission mode (used internally). | |
void | irCommInitReceiver () |
Initialize the IR communication state machine in reception mode (used internally). | |
void | irCommInitVars () |
void | irCommInit () |
Initialize the IR communication; need to be called only once. | |
void | irCommDeinit () |
Stop the IR communication, only sensors sampling for obstacle and cliff avoidance is enabled. | |
void | resetDebugVariables () |
void | irCommTasks () |
Handle the internal state machine of the IR communication. Need to be called repeatedly from the main loop. | |
void | irCommSendData (unsigned char value) |
Set the data to be sent through IR; the obstacle avoidance and cliff avoidance will be disabled during the transmission. | |
unsigned char | irCommDataSent () |
Tell whether the last transmission is terminated or not. | |
unsigned char | irCommDataAvailable () |
Tell whether incoming data are received or not. | |
unsigned char | irCommReadData () |
Get the last byte received through IR. | |
signed char | irCommReceivingSensor () |
Get the last sensor id that receives the message. | |
signed int | getBearing (unsigned char sensor) |
Get the direction of the sensor that receives the last message. |
signed int getBearing | ( | unsigned char | sensor | ) |
Get the direction of the sensor that receives the last message.
unsigned char irCommDataAvailable | ( | ) |
Tell whether incoming data are received or not.
unsigned char irCommDataSent | ( | ) |
Tell whether the last transmission is terminated or not.
void irCommDeinit | ( | ) |
Stop the IR communication, only sensors sampling for obstacle and cliff avoidance is enabled.
void irCommInit | ( | ) |
Initialize the IR communication; need to be called only once.
void irCommInitReceiver | ( | ) |
Initialize the IR communication state machine in reception mode (used internally).
void irCommInitTransmitter | ( | ) |
Initialize the IR communication state machine in transmission mode (used internally).
void irCommInitVars | ( | ) |
unsigned char irCommReadData | ( | ) |
Get the last byte received through IR.
signed char irCommReceivingSensor | ( | ) |
Get the last sensor id that receives the message.
void irCommSendData | ( | unsigned char | value | ) |
Set the data to be sent through IR; the obstacle avoidance and cliff avoidance will be disabled during the transmission.
value,: | byte to be sent; sensor: sensor id mask (bit 0 corresponds to sensor 0 in front of robot, id increases clockwise). |
value,: | byte to be sent; sensor. |
void irCommTasks | ( | ) |
Handle the internal state machine of the IR communication. Need to be called repeatedly from the main loop.
void resetDebugVariables | ( | ) |