NHK2017Ateamかにろぼ
Dependencies: 2017NHKpin_config mbed FEP HMC6352 MotorDriverController PID QEI omni
\ ̄\ / ̄/ /l \ \ / / lヽ | ヽ ヽ | | / / | \ ` ‐ヽ ヽ ● ● / / ‐ / \ __ l | ||___|| / l __ / \ \ / \/ /\| 人__人 |/\ //\| |/\\ //\| |/\\ / . \_____/ \ ┏┓ ┏━┓┏┓ ┏┓ ┏┓┏┓ ┏┓ ┏┓┗┛ ┏┓ ┗┓┃┗┛ ┏┛┗━┓ ┃┃┃┃ ┃┃┏━┛┗┓┏┓┏┛┗━┓┃┃┏┓┏┓┏━━━┓ ┗┓┏━┛ ┃┃┗┛ ┃┃┗━┓┏┛┗┛┗┓┏┓┃┗┛┗┛┃┃┗━━━┛ ┏┛┃┏━┓┃┗━━┓┃┃┏━┛┗┓ ┏┛┃┃┃ ┃┃ ┃┏┛┗━┛┗━━┓┃┃┃┃┏┓┏┛ ┗━┛┃┃ ┃┃┏┓ ┃┃┏━━┓┏━━┛┃┃┃┃┗┛┃ ┏┛┃ ┃┃┃┗━━┓ ┗┛┗━━┛┗━━━┛┗┛┗━━┛ ┗━┛ ┗┛┗━━━┛
bot/bot.cpp@1:269914e0aa07, 2017-08-22 (annotated)
- Committer:
- UCHITAKE
- Date:
- Tue Aug 22 05:07:57 2017 +0000
- Revision:
- 1:269914e0aa07
- Parent:
- 0:757e9800c103
- Child:
- 2:ea151e05033a
?????
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
UCHITAKE | 0:757e9800c103 | 1 | #include "bot.h" |
UCHITAKE | 0:757e9800c103 | 2 | |
UCHITAKE | 0:757e9800c103 | 3 | Bot::Bot() : Controller(), MotorDriver() |
UCHITAKE | 0:757e9800c103 | 4 | { |
UCHITAKE | 1:269914e0aa07 | 5 | } |
UCHITAKE | 1:269914e0aa07 | 6 | |
UCHITAKE | 1:269914e0aa07 | 7 | void Bot::confirmAll() |
UCHITAKE | 1:269914e0aa07 | 8 | { |
UCHITAKE | 1:269914e0aa07 | 9 | receiveState(); |
UCHITAKE | 1:269914e0aa07 | 10 | |
UCHITAKE | 1:269914e0aa07 | 11 | } |
UCHITAKE | 1:269914e0aa07 | 12 | |
UCHITAKE | 1:269914e0aa07 | 13 | void Bot::controllDrive() |
UCHITAKE | 1:269914e0aa07 | 14 | { |
UCHITAKE | 1:269914e0aa07 | 15 | goPolar(vector, stick[2]); |
UCHITAKE | 1:269914e0aa07 | 16 | } |
UCHITAKE | 1:269914e0aa07 | 17 | |
UCHITAKE | 1:269914e0aa07 | 18 | void Bot::controllMech() |
UCHITAKE | 1:269914e0aa07 | 19 | { |
UCHITAKE | 1:269914e0aa07 | 20 | if(!Button1[0]) moveSlider(ARM_MAX_SPEED); |
UCHITAKE | 1:269914e0aa07 | 21 | if(!Button1[1]) moveSlider(-ARM_MAX_SPEED); |
UCHITAKE | 1:269914e0aa07 | 22 | if(Button1[0] && Button1[1]) moveSlider(0); |
UCHITAKE | 1:269914e0aa07 | 23 | |
UCHITAKE | 1:269914e0aa07 | 24 | if(!Button1[2]) { |
UCHITAKE | 1:269914e0aa07 | 25 | destroy(DESTROY_MAX_SPEED); |
UCHITAKE | 1:269914e0aa07 | 26 | } else { |
UCHITAKE | 1:269914e0aa07 | 27 | destroy(0); |
UCHITAKE | 1:269914e0aa07 | 28 | } |
UCHITAKE | 0:757e9800c103 | 29 | } |