2017ロボコンはやとブーメランプログラム
Dependencies: PID QEI ikarashiMDC recieveController omni
Diff: Spiral.cpp
- Revision:
- 18:4b629221c215
- Parent:
- 17:311aed3cad15
- Child:
- 20:d052a0679309
- Child:
- 21:aad4a4adc18c
- Child:
- 22:d7c3bd1ce8f8
diff -r 311aed3cad15 -r 4b629221c215 Spiral.cpp --- a/Spiral.cpp Sun Oct 15 13:42:12 2017 +0900 +++ b/Spiral.cpp Thu Nov 02 20:40:13 2017 +0900 @@ -17,8 +17,8 @@ { if(rotating) return 1; - spiralSpeed=0.4; - spiralMotor->setSpeed(0.4); + spiralSpeed=1; + spiralMotor->setSpeed(1); rotating = true; firing = true; return false; @@ -29,11 +29,15 @@ if (!rotating)return; spiralSpeed=0; spiralMotor->setSpeed(0); - beltSpeed=-0.8; rotating = false; - beltTime.attach(callback(this,&Spiral::beltStop),0.6); + beltTime.attach(callback(this,&Spiral::beltStart),0.1); } +void Spiral::beltStart() +{ + beltSpeed=-1; + beltTime.attach(callback(this,&Spiral::beltStop),0.1); +} void Spiral::beltStop(){ beltSpeed=0; firing = false;