Adam Piekarski / XBEE

Fork of XBEE by GDP 4

Committer:
RobinIsLeg
Date:
Tue Oct 18 03:29:46 2016 +0000
Revision:
0:8cdf90642ef6
Child:
1:ce4058bc0913
Initial Release

Who changed what in which revision?

UserRevisionLine numberNew contents of line
RobinIsLeg 0:8cdf90642ef6 1 // Add commands you wish to implement to the switch statement and #define the command with the next unused letter of the alphabet
RobinIsLeg 0:8cdf90642ef6 2 // Please try to minimise the number of lines you add per command i.e. for adding a steer left command simply call steerLeft() which
RobinIsLeg 0:8cdf90642ef6 3 // you then define in a separate file. This will make it easier to keep track of the big picture of what other people are making
RobinIsLeg 0:8cdf90642ef6 4 // the car do
RobinIsLeg 0:8cdf90642ef6 5
RobinIsLeg 0:8cdf90642ef6 6
RobinIsLeg 0:8cdf90642ef6 7 #define START 'A'
RobinIsLeg 0:8cdf90642ef6 8 #define STOP 'B'
RobinIsLeg 0:8cdf90642ef6 9 #define STATUSSTRING 'C'
RobinIsLeg 0:8cdf90642ef6 10 void XBEE::switchCase(char command)
RobinIsLeg 0:8cdf90642ef6 11 {
RobinIsLeg 0:8cdf90642ef6 12 switch(command){
RobinIsLeg 0:8cdf90642ef6 13 case START:
RobinIsLeg 0:8cdf90642ef6 14
RobinIsLeg 0:8cdf90642ef6 15
RobinIsLeg 0:8cdf90642ef6 16 break;
RobinIsLeg 0:8cdf90642ef6 17 case STOP:
RobinIsLeg 0:8cdf90642ef6 18
RobinIsLeg 0:8cdf90642ef6 19
RobinIsLeg 0:8cdf90642ef6 20
RobinIsLeg 0:8cdf90642ef6 21 break;
RobinIsLeg 0:8cdf90642ef6 22 case STATUSSTRING:
RobinIsLeg 0:8cdf90642ef6 23 sendCommand("But how long is a piece of string?\n");
RobinIsLeg 0:8cdf90642ef6 24 break;
RobinIsLeg 0:8cdf90642ef6 25
RobinIsLeg 0:8cdf90642ef6 26
RobinIsLeg 0:8cdf90642ef6 27
RobinIsLeg 0:8cdf90642ef6 28
RobinIsLeg 0:8cdf90642ef6 29 default:
RobinIsLeg 0:8cdf90642ef6 30 sendCommand("Invalid Command Received\n");
RobinIsLeg 0:8cdf90642ef6 31 break;
RobinIsLeg 0:8cdf90642ef6 32
RobinIsLeg 0:8cdf90642ef6 33
RobinIsLeg 0:8cdf90642ef6 34
RobinIsLeg 0:8cdf90642ef6 35
RobinIsLeg 0:8cdf90642ef6 36
RobinIsLeg 0:8cdf90642ef6 37 }
RobinIsLeg 0:8cdf90642ef6 38
RobinIsLeg 0:8cdf90642ef6 39
RobinIsLeg 0:8cdf90642ef6 40 }