2017_Bteam_beta_master_ashi
Dependencies: Alpha_Movements BoolProcess DataCaller_beta MD_PID mbed
Fork of 2017_Bteam_beta_master by
Diff: main.cpp
- Revision:
- 12:dbff655e398e
- Parent:
- 11:adb0e189fe90
- Child:
- 14:b2569bdcd716
diff -r adb0e189fe90 -r dbff655e398e main.cpp --- a/main.cpp Tue Sep 19 05:27:08 2017 +0000 +++ b/main.cpp Wed Sep 27 06:52:21 2017 +0000 @@ -20,8 +20,8 @@ master = new I2C(SDA, SCL); beta = new AlphaTransporter(master); - Omni.Drive(0, 0, 0); - float x, y, t; + Omni.Drive(0, 0, 0, 0); + float a, x, y, t; while(1) { beta->set(); @@ -30,11 +30,8 @@ y = beta->read(1) / 128.00 * -1.00; t = beta->read(2) / 128.00 * -1.00; - if(x == 0.00 && y == 0.00){ - Omni.Drive(x, y, 1.50 * t); - }else{ - Omni.Drive(x, y, t / 4.00); - } + Omni.Drive(a, x, y, t); + wait(0.01); } }