Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: N5110WN PowerControl SRF02 mbed
main.cpp@3:00933efbe463, 2015-03-21 (annotated)
- Committer:
- JakBlackburn
- Date:
- Sat Mar 21 19:14:04 2015 +0000
- Revision:
- 3:00933efbe463
- Parent:
- 2:a1eaa4d74b63
- Child:
- 4:2e9aa626a02c
added initial visual modes
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| JakBlackburn | 1:7f151ab172cb | 1 | /** |
| JakBlackburn | 1:7f151ab172cb | 2 | @file main.cpp |
| JakBlackburn | 1:7f151ab172cb | 3 | @brief Program implementation |
| JakBlackburn | 0:73bfbe8729d4 | 4 | |
| JakBlackburn | 1:7f151ab172cb | 5 | */ |
| JakBlackburn | 1:7f151ab172cb | 6 | #include "main.h" |
| JakBlackburn | 0:73bfbe8729d4 | 7 | |
| JakBlackburn | 0:73bfbe8729d4 | 8 | |
| JakBlackburn | 0:73bfbe8729d4 | 9 | |
| JakBlackburn | 3:00933efbe463 | 10 | int main() |
| JakBlackburn | 3:00933efbe463 | 11 | { |
| JakBlackburn | 1:7f151ab172cb | 12 | pc.baud(9600); //sets baud rate |
| JakBlackburn | 1:7f151ab172cb | 13 | timer.attach(&timerExpired,0.5); |
| JakBlackburn | 1:7f151ab172cb | 14 | LogTog.rise(&logButtonPressed); |
| JakBlackburn | 1:7f151ab172cb | 15 | UnitTog.rise(&unitToggle); |
| JakBlackburn | 3:00933efbe463 | 16 | VisTog.rise(&visToggle); |
| JakBlackburn | 1:7f151ab172cb | 17 | pc.attach(&serialISR); // attach serial ISR |
| JakBlackburn | 1:7f151ab172cb | 18 | char buffer[30]; // buffer used to store time string |
| JakBlackburn | 1:7f151ab172cb | 19 | set_time(1427846400); // initialise time to 1st April 2015 00:00:00 |
| JakBlackburn | 3:00933efbe463 | 20 | |
| JakBlackburn | 2:a1eaa4d74b63 | 21 | BLED.period(0.02); //sets the frequency of the Backlight at 50Hz |
| JakBlackburn | 3:00933efbe463 | 22 | BLED=BLEDLevel.read(); //sets the brightness |
| JakBlackburn | 2:a1eaa4d74b63 | 23 | lcd.init(); //to initilize the display |
| JakBlackburn | 2:a1eaa4d74b63 | 24 | checkerBoard(); |
| JakBlackburn | 2:a1eaa4d74b63 | 25 | wait(0.2); |
| JakBlackburn | 2:a1eaa4d74b63 | 26 | lcd.clear(); |
| JakBlackburn | 3:00933efbe463 | 27 | |
| JakBlackburn | 2:a1eaa4d74b63 | 28 | introTune(); // plays the intro tune |
| JakBlackburn | 2:a1eaa4d74b63 | 29 | lcd.printString("Parking",20,0); |
| JakBlackburn | 3:00933efbe463 | 30 | lcd.printString("Sensor",23,1); |
| JakBlackburn | 2:a1eaa4d74b63 | 31 | lcd.printString("by",35,2); |
| JakBlackburn | 2:a1eaa4d74b63 | 32 | lcd.printString("Jakobi",24,3); |
| JakBlackburn | 2:a1eaa4d74b63 | 33 | lcd.printString("Blackburn",16,4); |
| JakBlackburn | 3:00933efbe463 | 34 | wait(2); |
| JakBlackburn | 2:a1eaa4d74b63 | 35 | lcd.clear(); |
| JakBlackburn | 0:73bfbe8729d4 | 36 | while(1) { |
| JakBlackburn | 3:00933efbe463 | 37 | BLED=BLEDLevel.read(); //sets the brightness |
| JakBlackburn | 3:00933efbe463 | 38 | if(timerFlag) { |
| JakBlackburn | 3:00933efbe463 | 39 | |
| JakBlackburn | 1:7f151ab172cb | 40 | timerFlag = 0; //resets flag |
| JakBlackburn | 1:7f151ab172cb | 41 | time_t seconds = time(NULL); // get current time |
| JakBlackburn | 1:7f151ab172cb | 42 | // format time into a string (time and date) |
| JakBlackburn | 1:7f151ab172cb | 43 | strftime(buffer, 30 , "%d/%m/%y %R", localtime(&seconds)); |
| JakBlackburn | 3:00933efbe463 | 44 | float dist = getDistance()*unitX; //reads the distance and sets it to a float value. |
| JakBlackburn | 1:7f151ab172cb | 45 | //prints the value to the serial port. |
| JakBlackburn | 3:00933efbe463 | 46 | if(state==1) { |
| JakBlackburn | 3:00933efbe463 | 47 | pc.printf("%s , Distance = %.2f %s \n",buffer,dist,units); //prints the value to the serial port. |
| JakBlackburn | 3:00933efbe463 | 48 | } |
| JakBlackburn | 3:00933efbe463 | 49 | else if(state !=1) { |
| JakBlackburn | 3:00933efbe463 | 50 | pc.printf("%s , Distance = %.0f %s \n",buffer,dist,units); //prints the value to the serial port. |
| JakBlackburn | 3:00933efbe463 | 51 | } |
| JakBlackburn | 3:00933efbe463 | 52 | logging(buffer,distance); |
| JakBlackburn | 3:00933efbe463 | 53 | if(visual==0) { |
| JakBlackburn | 3:00933efbe463 | 54 | LCDVis0(); |
| JakBlackburn | 3:00933efbe463 | 55 | } |
| JakBlackburn | 3:00933efbe463 | 56 | else if(visual==1) { |
| JakBlackburn | 3:00933efbe463 | 57 | LCDVis1(); |
| JakBlackburn | 3:00933efbe463 | 58 | } |
| JakBlackburn | 3:00933efbe463 | 59 | else if(visual==2) { |
| JakBlackburn | 3:00933efbe463 | 60 | LCDVis2(); |
| JakBlackburn | 3:00933efbe463 | 61 | } |
| JakBlackburn | 3:00933efbe463 | 62 | else{ error(2);} |
| JakBlackburn | 3:00933efbe463 | 63 | |
| JakBlackburn | 3:00933efbe463 | 64 | } |
| JakBlackburn | 3:00933efbe463 | 65 | if (setTimeFlag) { // if updated time has been sent |
| JakBlackburn | 1:7f151ab172cb | 66 | setTimeFlag = 0; // clear flag |
| JakBlackburn | 1:7f151ab172cb | 67 | setTime(); // update time |
| JakBlackburn | 1:7f151ab172cb | 68 | } |
| JakBlackburn | 2:a1eaa4d74b63 | 69 | Sleep(); |
| JakBlackburn | 0:73bfbe8729d4 | 70 | } |
| JakBlackburn | 0:73bfbe8729d4 | 71 | } |
| JakBlackburn | 0:73bfbe8729d4 | 72 | |
| JakBlackburn | 3:00933efbe463 | 73 | void timerExpired() |
| JakBlackburn | 3:00933efbe463 | 74 | { |
| JakBlackburn | 3:00933efbe463 | 75 | timerFlag=1; |
| JakBlackburn | 0:73bfbe8729d4 | 76 | } |
| JakBlackburn | 0:73bfbe8729d4 | 77 | |
| JakBlackburn | 0:73bfbe8729d4 | 78 | |
| JakBlackburn | 3:00933efbe463 | 79 | void warnings() |
| JakBlackburn | 3:00933efbe463 | 80 | { |
| JakBlackburn | 0:73bfbe8729d4 | 81 | WLED=1; |
| JakBlackburn | 0:73bfbe8729d4 | 82 | volume= BuzVol.read(); |
| JakBlackburn | 3:00933efbe463 | 83 | Buzzer.PlayNote(1000.0, 0.1, volume); |
| JakBlackburn | 3:00933efbe463 | 84 | WLED=0; |
| JakBlackburn | 0:73bfbe8729d4 | 85 | } |
| JakBlackburn | 3:00933efbe463 | 86 | float getDistance() |
| JakBlackburn | 3:00933efbe463 | 87 | { |
| JakBlackburn | 0:73bfbe8729d4 | 88 | int dist0 = sensor.getDistanceCm(); |
| JakBlackburn | 1:7f151ab172cb | 89 | wait(0.1*scanSpeed); |
| JakBlackburn | 0:73bfbe8729d4 | 90 | int dist1 = sensor.getDistanceCm(); |
| JakBlackburn | 1:7f151ab172cb | 91 | wait(0.1*scanSpeed); |
| JakBlackburn | 0:73bfbe8729d4 | 92 | int dist2 = sensor.getDistanceCm(); |
| JakBlackburn | 1:7f151ab172cb | 93 | wait(0.1*scanSpeed); |
| JakBlackburn | 0:73bfbe8729d4 | 94 | int dist3 = sensor.getDistanceCm(); |
| JakBlackburn | 1:7f151ab172cb | 95 | wait(0.1*scanSpeed); |
| JakBlackburn | 0:73bfbe8729d4 | 96 | int dist4 = sensor.getDistanceCm(); |
| JakBlackburn | 1:7f151ab172cb | 97 | wait(0.1*scanSpeed); |
| JakBlackburn | 0:73bfbe8729d4 | 98 | int dist5 = sensor.getDistanceCm(); |
| JakBlackburn | 1:7f151ab172cb | 99 | wait(0.1*scanSpeed); |
| JakBlackburn | 0:73bfbe8729d4 | 100 | int dist6 = sensor.getDistanceCm(); |
| JakBlackburn | 1:7f151ab172cb | 101 | wait(0.1*scanSpeed); |
| JakBlackburn | 0:73bfbe8729d4 | 102 | int dist7 = sensor.getDistanceCm(); |
| JakBlackburn | 1:7f151ab172cb | 103 | wait(0.1*scanSpeed); |
| JakBlackburn | 0:73bfbe8729d4 | 104 | int dist8 = sensor.getDistanceCm(); |
| JakBlackburn | 1:7f151ab172cb | 105 | wait(0.1*scanSpeed); |
| JakBlackburn | 0:73bfbe8729d4 | 106 | int dist9 = sensor.getDistanceCm(); |
| JakBlackburn | 3:00933efbe463 | 107 | distance=(dist0+dist1+dist2+dist3+dist4+dist5+dist6+dist7+dist8+dist9)/10; |
| JakBlackburn | 1:7f151ab172cb | 108 | setScanSpeed(); |
| JakBlackburn | 0:73bfbe8729d4 | 109 | warnings(); |
| JakBlackburn | 1:7f151ab172cb | 110 | return distance; |
| JakBlackburn | 0:73bfbe8729d4 | 111 | } |
| JakBlackburn | 0:73bfbe8729d4 | 112 | |
| JakBlackburn | 3:00933efbe463 | 113 | void unitToggle() |
| JakBlackburn | 3:00933efbe463 | 114 | { |
| JakBlackburn | 1:7f151ab172cb | 115 | state = fsm[state].nextState[UnitTog]; // read input and update current state |
| JakBlackburn | 0:73bfbe8729d4 | 116 | unitX = fsm[state].unitMultiple; // set output depending on current state |
| JakBlackburn | 3:00933efbe463 | 117 | units= fsm[state].Unit; // |
| JakBlackburn | 1:7f151ab172cb | 118 | wait(0.2); |
| JakBlackburn | 1:7f151ab172cb | 119 | pc.printf("unit multiple = %.2f \n",unitX); |
| JakBlackburn | 2:a1eaa4d74b63 | 120 | pc.printf("Units = %s \n",units); |
| JakBlackburn | 1:7f151ab172cb | 121 | } |
| JakBlackburn | 1:7f151ab172cb | 122 | |
| JakBlackburn | 3:00933efbe463 | 123 | void setScanSpeed() |
| JakBlackburn | 3:00933efbe463 | 124 | { |
| JakBlackburn | 3:00933efbe463 | 125 | if(distance>=100) { |
| JakBlackburn | 3:00933efbe463 | 126 | scanSpeed=2; // sets the speed to normal |
| JakBlackburn | 3:00933efbe463 | 127 | } else if(distance>=25) { |
| JakBlackburn | 3:00933efbe463 | 128 | scanSpeed=1; // double speed |
| JakBlackburn | 3:00933efbe463 | 129 | } else if(distance<25) { |
| JakBlackburn | 3:00933efbe463 | 130 | scanSpeed=0.25; // quad speed |
| JakBlackburn | 3:00933efbe463 | 131 | } else{ error(1);} |
| JakBlackburn | 1:7f151ab172cb | 132 | } |
| JakBlackburn | 3:00933efbe463 | 133 | void error(int E) //up to 14. IF 15 shown it is a ack bit error for the SRF02 |
| JakBlackburn | 3:00933efbe463 | 134 | { |
| JakBlackburn | 3:00933efbe463 | 135 | while(1) { |
| JakBlackburn | 1:7f151ab172cb | 136 | leds=0; |
| JakBlackburn | 1:7f151ab172cb | 137 | wait(0.2); |
| JakBlackburn | 1:7f151ab172cb | 138 | leds=E; |
| JakBlackburn | 1:7f151ab172cb | 139 | wait(0.2); |
| JakBlackburn | 1:7f151ab172cb | 140 | } |
| JakBlackburn | 0:73bfbe8729d4 | 141 | } |
| JakBlackburn | 0:73bfbe8729d4 | 142 | |
| JakBlackburn | 1:7f151ab172cb | 143 | void logButtonPressed() |
| JakBlackburn | 1:7f151ab172cb | 144 | { |
| JakBlackburn | 1:7f151ab172cb | 145 | logButtonFlag = !logButtonFlag; //flips the flag |
| JakBlackburn | 1:7f151ab172cb | 146 | if(logButtonFlag) { |
| JakBlackburn | 1:7f151ab172cb | 147 | LLED=1; // Logging LED will be on if the device is logging |
| JakBlackburn | 1:7f151ab172cb | 148 | pc.printf("-------\n Data Logging\n\r"); |
| JakBlackburn | 1:7f151ab172cb | 149 | } else { |
| JakBlackburn | 1:7f151ab172cb | 150 | LLED=0; // Logging LED will be off if the device isn't logging |
| JakBlackburn | 1:7f151ab172cb | 151 | pc.printf("-------\n Stopped Logging Data\n\r"); |
| JakBlackburn | 0:73bfbe8729d4 | 152 | } |
| JakBlackburn | 1:7f151ab172cb | 153 | wait(0.2); |
| JakBlackburn | 1:7f151ab172cb | 154 | } |
| JakBlackburn | 1:7f151ab172cb | 155 | |
| JakBlackburn | 1:7f151ab172cb | 156 | void logging(char* data,float data1) |
| JakBlackburn | 1:7f151ab172cb | 157 | { |
| JakBlackburn | 1:7f151ab172cb | 158 | if(logButtonFlag) { |
| JakBlackburn | 1:7f151ab172cb | 159 | FILE *fp = fopen("/local/log.csv", "a"); // open 'log.csv' for appending |
| JakBlackburn | 1:7f151ab172cb | 160 | // if the file doesn't exist it is created, if it exists, data is appended to the end |
| JakBlackburn | 1:7f151ab172cb | 161 | fprintf(fp," %s , %.2f\n ",data,data1); // print string to file |
| JakBlackburn | 1:7f151ab172cb | 162 | fclose(fp); // close file |
| JakBlackburn | 1:7f151ab172cb | 163 | pc.printf("Data Logged\n\r"); |
| JakBlackburn | 1:7f151ab172cb | 164 | LLED=1; //keeps the led on if it is logging |
| JakBlackburn | 1:7f151ab172cb | 165 | } else { |
| JakBlackburn | 1:7f151ab172cb | 166 | pc.printf("WARNING : Unlogged Data\n\r"); |
| JakBlackburn | 1:7f151ab172cb | 167 | LLED=0; |
| JakBlackburn | 0:73bfbe8729d4 | 168 | } |
| JakBlackburn | 1:7f151ab172cb | 169 | } |
| JakBlackburn | 1:7f151ab172cb | 170 | |
| JakBlackburn | 1:7f151ab172cb | 171 | void setTime() |
| JakBlackburn | 1:7f151ab172cb | 172 | { |
| JakBlackburn | 1:7f151ab172cb | 173 | // print time for debugging |
| JakBlackburn | 1:7f151ab172cb | 174 | pc.printf("set time - %s",rxString); |
| JakBlackburn | 1:7f151ab172cb | 175 | // atoi() converts a string to an integer |
| JakBlackburn | 1:7f151ab172cb | 176 | int time = atoi(rxString); |
| JakBlackburn | 1:7f151ab172cb | 177 | // update the time |
| JakBlackburn | 1:7f151ab172cb | 178 | set_time(time); |
| JakBlackburn | 3:00933efbe463 | 179 | pc.printf("set time - %d",time); |
| JakBlackburn | 1:7f151ab172cb | 180 | } |
| JakBlackburn | 1:7f151ab172cb | 181 | void serialISR() |
| JakBlackburn | 1:7f151ab172cb | 182 | { |
| JakBlackburn | 1:7f151ab172cb | 183 | // when a serial interrupt occurs, read rx string into buffer |
| JakBlackburn | 1:7f151ab172cb | 184 | pc.gets(rxString,16); |
| JakBlackburn | 1:7f151ab172cb | 185 | // set flag |
| JakBlackburn | 1:7f151ab172cb | 186 | setTimeFlag = 1; |
| JakBlackburn | 2:a1eaa4d74b63 | 187 | } |
| JakBlackburn | 2:a1eaa4d74b63 | 188 | |
| JakBlackburn | 2:a1eaa4d74b63 | 189 | void introTune() |
| JakBlackburn | 2:a1eaa4d74b63 | 190 | { |
| JakBlackburn | 2:a1eaa4d74b63 | 191 | Buzzer.PlayNote(1319.0,0.084,1.0); |
| JakBlackburn | 2:a1eaa4d74b63 | 192 | wait(0.01); |
| JakBlackburn | 2:a1eaa4d74b63 | 193 | Buzzer.PlayNote(1319.0,0.084,1.0); |
| JakBlackburn | 2:a1eaa4d74b63 | 194 | wait(0.094); |
| JakBlackburn | 2:a1eaa4d74b63 | 195 | Buzzer.PlayNote(1319.0,0.084,1.0); |
| JakBlackburn | 2:a1eaa4d74b63 | 196 | wait(0.094); |
| JakBlackburn | 2:a1eaa4d74b63 | 197 | Buzzer.PlayNote(1047.0,0.084,1.0); |
| JakBlackburn | 2:a1eaa4d74b63 | 198 | wait(0.01); |
| JakBlackburn | 2:a1eaa4d74b63 | 199 | Buzzer.PlayNote(1319.0,0.084,1.0); |
| JakBlackburn | 2:a1eaa4d74b63 | 200 | wait(0.094); |
| JakBlackburn | 2:a1eaa4d74b63 | 201 | Buzzer.PlayNote(1568.0,0.084,1.0); |
| JakBlackburn | 2:a1eaa4d74b63 | 202 | wait(0.26); |
| JakBlackburn | 2:a1eaa4d74b63 | 203 | Buzzer.PlayNote(784.0,0.084,1.0); |
| JakBlackburn | 2:a1eaa4d74b63 | 204 | } |
| JakBlackburn | 2:a1eaa4d74b63 | 205 | |
| JakBlackburn | 2:a1eaa4d74b63 | 206 | void checkerBoard() // creates a checked pattern on the lcd |
| JakBlackburn | 2:a1eaa4d74b63 | 207 | { |
| JakBlackburn | 2:a1eaa4d74b63 | 208 | for(int i=0; i<84; i+=2) { |
| JakBlackburn | 2:a1eaa4d74b63 | 209 | for(int j=0; j<48; j+=2) { |
| JakBlackburn | 2:a1eaa4d74b63 | 210 | lcd.setPixel(i,j); |
| JakBlackburn | 2:a1eaa4d74b63 | 211 | } |
| JakBlackburn | 2:a1eaa4d74b63 | 212 | } |
| JakBlackburn | 2:a1eaa4d74b63 | 213 | lcd.refresh(); |
| JakBlackburn | 3:00933efbe463 | 214 | } |
| JakBlackburn | 3:00933efbe463 | 215 | |
| JakBlackburn | 3:00933efbe463 | 216 | void LCDVis0() //the max range is 249 (according to the data sheet) and there are 84 pixels wide on the LCD so this creates the amount of cm for each pixel |
| JakBlackburn | 3:00933efbe463 | 217 | { |
| JakBlackburn | 3:00933efbe463 | 218 | lcd.clear(); |
| JakBlackburn | 3:00933efbe463 | 219 | int I = distance*0.337; //and then multiplies the current distance by that value as (84/249) =0.337... |
| JakBlackburn | 3:00933efbe463 | 220 | pc.printf("bar width - %d pixels \n",I); |
| JakBlackburn | 3:00933efbe463 | 221 | for(int j=0; j<48; j++) { |
| JakBlackburn | 3:00933efbe463 | 222 | for(int i=0; i<I; i++) { |
| JakBlackburn | 3:00933efbe463 | 223 | lcd.setPixel(i,j); |
| JakBlackburn | 3:00933efbe463 | 224 | } |
| JakBlackburn | 3:00933efbe463 | 225 | } |
| JakBlackburn | 3:00933efbe463 | 226 | lcd.refresh(); |
| JakBlackburn | 3:00933efbe463 | 227 | } |
| JakBlackburn | 3:00933efbe463 | 228 | |
| JakBlackburn | 3:00933efbe463 | 229 | void LCDVis1() //the max range is 249 (according to the data sheet) and there are 48 pixels high on the LCD so this creates the amount of cm for each pixel |
| JakBlackburn | 3:00933efbe463 | 230 | { |
| JakBlackburn | 3:00933efbe463 | 231 | lcd.clear(); |
| JakBlackburn | 3:00933efbe463 | 232 | int J = distance*0.19; //and then multiplies the current distance by that value as (48/249) = 0.19.. |
| JakBlackburn | 3:00933efbe463 | 233 | pc.printf("bar height - %d pixels \n",J); |
| JakBlackburn | 3:00933efbe463 | 234 | for(int i=0; i<84; i++) { |
| JakBlackburn | 3:00933efbe463 | 235 | for(int j=0; j<J; j++) { |
| JakBlackburn | 3:00933efbe463 | 236 | lcd.setPixel(i,48-j); //using 48-j here makes the bar fill from the bottom rather than from the top as pixel(0,0) is the top left corner |
| JakBlackburn | 3:00933efbe463 | 237 | |
| JakBlackburn | 3:00933efbe463 | 238 | } |
| JakBlackburn | 3:00933efbe463 | 239 | } |
| JakBlackburn | 3:00933efbe463 | 240 | lcd.refresh(); |
| JakBlackburn | 3:00933efbe463 | 241 | } |
| JakBlackburn | 3:00933efbe463 | 242 | |
| JakBlackburn | 3:00933efbe463 | 243 | void LCDVis2(){ |
| JakBlackburn | 3:00933efbe463 | 244 | for(int i=0; i<84; i++) { |
| JakBlackburn | 3:00933efbe463 | 245 | for(int j=0; j<48; j++) { |
| JakBlackburn | 3:00933efbe463 | 246 | lcd.setPixel(i,j); |
| JakBlackburn | 3:00933efbe463 | 247 | } |
| JakBlackburn | 3:00933efbe463 | 248 | } |
| JakBlackburn | 3:00933efbe463 | 249 | lcd.refresh(); |
| JakBlackburn | 3:00933efbe463 | 250 | } |
| JakBlackburn | 3:00933efbe463 | 251 | |
| JakBlackburn | 3:00933efbe463 | 252 | void visToggle() |
| JakBlackburn | 3:00933efbe463 | 253 | { |
| JakBlackburn | 3:00933efbe463 | 254 | Vstate = Vfsm[Vstate].nextState[VisTog]; // read input and update current state |
| JakBlackburn | 3:00933efbe463 | 255 | visual = Vfsm[Vstate].visual; // set output depending on current state |
| JakBlackburn | 3:00933efbe463 | 256 | wait(0.2); |
| JakBlackburn | 3:00933efbe463 | 257 | if(visual==0) { |
| JakBlackburn | 3:00933efbe463 | 258 | pc.printf("----Left to Right----\n\r"); |
| JakBlackburn | 3:00933efbe463 | 259 | } |
| JakBlackburn | 3:00933efbe463 | 260 | if(visual==1) { |
| JakBlackburn | 3:00933efbe463 | 261 | pc.printf("----Up to Down----\n\r"); |
| JakBlackburn | 3:00933efbe463 | 262 | } |
| JakBlackburn | 3:00933efbe463 | 263 | if(visual==2) { |
| JakBlackburn | 3:00933efbe463 | 264 | pc.printf("----Other----\n\r"); |
| JakBlackburn | 3:00933efbe463 | 265 | } |
| JakBlackburn | 0:73bfbe8729d4 | 266 | } |