Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
25 lines (19 sloc) 427 Bytes
#ifndef __RANGERS_H_
#define __RANGERS_H_
#define RIGHT_RANGER IN_2
#define FORWARD_RANGER IN_1
#define MIN_DIST_TO_WALL 15
struct ranger_t
{
int forward_value;
int right_value;
int last_right_value;
};
ranger_t rangers;
void update_rangers()
{
rangers.last_right_value = rangers.right_value;
rangers.forward_value = SensorUS(FORWARD_RANGER);
rangers.right_value = SensorUS(RIGHT_RANGER);
}
#endif