summaryrefslogtreecommitdiff
path: root/core.h
blob: f216364fbb079c6a97d9a5c6ea647a988f5dd283 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef AMERICANO_MAIN_H
#define AMERICANO_MAIN_H

enum RobotState_t {
  // right at the start before
  // we do anything
  IDLE = 0,
  // This is the state we'll likely spend
  // the most time in (looking for the beacon)
  SEARCHING = 1,
  // When we're near the beacon
  // but not quite aligned for a drop yet
  ALIGNMENT = 2,
  // In position to drop the object
  DROP_OBJECT = 3,
  // signal that we're done somehow
  // and stop moving
  COMPLETE = 4,
  // special state that we use to recover
  // from collisions (can be thought of
  // like an interrupt state)
  COLLISION = 5
};

char *stateToString(enum RobotState_t state);

void core();

#endif