NHK2017Ateamかにろぼ
Dependencies: 2017NHKpin_config mbed FEP HMC6352 MotorDriverController PID QEI omni
\ ̄\ / ̄/ /l \ \ / / lヽ | ヽ ヽ | | / / | \ ` ‐ヽ ヽ ● ● / / ‐ / \ __ l | ||___|| / l __ / \ \ / \/ /\| 人__人 |/\ //\| |/\\ //\| |/\\ / . \_____/ \ ┏┓ ┏━┓┏┓ ┏┓ ┏┓┏┓ ┏┓ ┏┓┗┛ ┏┓ ┗┓┃┗┛ ┏┛┗━┓ ┃┃┃┃ ┃┃┏━┛┗┓┏┓┏┛┗━┓┃┃┏┓┏┓┏━━━┓ ┗┓┏━┛ ┃┃┗┛ ┃┃┗━┓┏┛┗┛┗┓┏┓┃┗┛┗┛┃┃┗━━━┛ ┏┛┃┏━┓┃┗━━┓┃┃┏━┛┗┓ ┏┛┃┃┃ ┃┃ ┃┏┛┗━┛┗━━┓┃┃┃┃┏┓┏┛ ┗━┛┃┃ ┃┃┏┓ ┃┃┏━━┓┏━━┛┃┃┃┃┗┛┃ ┏┛┃ ┃┃┃┗━━┓ ┗┛┗━━┛┗━━━┛┗┛┗━━┛ ┗━┛ ┗┛┗━━━┛
Diff: bot/bot.cpp
- Revision:
- 1:269914e0aa07
- Parent:
- 0:757e9800c103
- Child:
- 2:ea151e05033a
--- a/bot/bot.cpp Mon Aug 21 12:20:14 2017 +0000 +++ b/bot/bot.cpp Tue Aug 22 05:07:57 2017 +0000 @@ -2,4 +2,28 @@ Bot::Bot() : Controller(), MotorDriver() { +} + +void Bot::confirmAll() +{ + receiveState(); + +} + +void Bot::controllDrive() +{ + goPolar(vector, stick[2]); +} + +void Bot::controllMech() +{ + if(!Button1[0]) moveSlider(ARM_MAX_SPEED); + if(!Button1[1]) moveSlider(-ARM_MAX_SPEED); + if(Button1[0] && Button1[1]) moveSlider(0); + + if(!Button1[2]) { + destroy(DESTROY_MAX_SPEED); + } else { + destroy(0); + } } \ No newline at end of file