Skip to content

Commit

Permalink
Update robot.h
Browse files Browse the repository at this point in the history
  • Loading branch information
alkaza authored Nov 25, 2017
1 parent 1f348e4 commit 3725afe
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/lib/robot.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
/* Min speed */
#define MINSPEED 60

/* Track flags */
/* Track current flag */
extern volatile int turningR;
extern volatile int turningL;
extern volatile int goingFW;
Expand All @@ -33,18 +33,19 @@ extern volatile int goingBW;
extern volatile int curr_speedA;
extern volatile int curr_speedB;

/* Setup function */
/* Setup */
extern void setup (void);
/* Motor control functions */
/* Motor state control */
extern void move (char dir, int speedA, int speedB);
extern void move_slow (char dir, int speedA, int speedB);
/* Calulate distance */
extern float calc_dist (void);

/* Initialization functions */
/* Initialize */
extern void ultraInit (void);
extern void motorInit (void);
/* Motor helper functions */

/* Motor functions */
extern void setSpeed (int speedA, int speedB);
extern void setDir (char dir);
extern void goFW (void);
Expand All @@ -53,10 +54,12 @@ extern void turnR (void);
extern void turnL (void);
extern void brake (void);
extern void stop (void);

/* Flag functions */
extern void setFlag (char dir);
extern int getFlag (char dir);
/* Signal handler */

/* Ctrl-C handler */
extern void sigHandler (int sigNo);

#endif

0 comments on commit 3725afe

Please sign in to comment.