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.
Diff: main.cpp
- Revision:
- 40:9acc1341456a
- Parent:
- 39:9cce8f2c50b6
- Child:
- 41:4fa6aa29d1ed
diff -r 9cce8f2c50b6 -r 9acc1341456a main.cpp --- a/main.cpp Thu Jun 14 13:16:31 2018 +0000 +++ b/main.cpp Thu Jun 14 13:19:52 2018 +0000 @@ -159,7 +159,6 @@ vector<Position> positions; -<<<<<<< local //.....DCC TRAIN COMMAND VARS //typical out of box default engine DCC address is 3 (at least for Bachmann trains) @@ -192,8 +191,7 @@ const unsigned int SWBflip_3 = 0x84; //Flip SW3 const unsigned int SWBflip_4 = 0x88; //Flip SW4 -======= ->>>>>>> other + //Starting position and orientation of the trains int DR_train_pos = D4; bool DR_cw = true; @@ -337,20 +335,9 @@ void update_train_pos(int sensor){ bool found_DR = false; bool found_LR = false; - - -<<<<<<< local - Position pos = positions[sensor]; - - lcd.cls(); - lcd.printf("D%d DR:%d",pos.get_pos(),DR_train_pos); - //wait(1); - for(int i = 0; i<pos.get_prev_cw().size();i++){ -======= Position pos = positions[sensor]; for(int i = 0; i<pos.get_prev_cw().size();i++){ ->>>>>>> other int prev = pos.get_prev_cw()[i]; if(DR_train_pos == prev){ @@ -372,17 +359,9 @@ } if(found_LR){ -<<<<<<< local - //doBuzz(); -======= ->>>>>>> other + lcd.cls(); -<<<<<<< local - lcd.printf("LR is at D%d",LR_train_pos); - -======= lcd.printf("LR is at D%d",LR_train_pos); ->>>>>>> other } if(!found_DR && !found_LR){ lcd.cls();