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.
chassis_mode.cpp@8:f23601373e8b, 2019-10-02 (annotated)
- Committer:
- GaspardD
- Date:
- Wed Oct 02 22:25:12 2019 +0000
- Revision:
- 8:f23601373e8b
- Parent:
- 6:ab9f3695633f
- Child:
- 9:1b54bac6d9a7
angle correction working
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
GaspardD | 6:ab9f3695633f | 1 | #include "chassis_mode.h" |
GaspardD | 6:ab9f3695633f | 2 | |
GaspardD | 8:f23601373e8b | 3 | DigitalIn b_CHASSIS_Mode(PE_11); |
GaspardD | 8:f23601373e8b | 4 | bool b_CHASSIS_with_pushbutton; |
GaspardD | 8:f23601373e8b | 5 | double d_CHASSIS_dist_one_step_odom; |
GaspardD | 6:ab9f3695633f | 6 | |
GaspardD | 6:ab9f3695633f | 7 | void init_chassis_mode() |
GaspardD | 6:ab9f3695633f | 8 | { |
GaspardD | 8:f23601373e8b | 9 | b_CHASSIS_Mode.mode(PullUp); |
GaspardD | 8:f23601373e8b | 10 | if(b_CHASSIS_Mode.read()) { |
GaspardD | 8:f23601373e8b | 11 | b_CHASSIS_with_pushbutton = false; |
GaspardD | 8:f23601373e8b | 12 | d_CHASSIS_dist_one_step_odom = 0.08; |
GaspardD | 6:ab9f3695633f | 13 | } else { |
GaspardD | 8:f23601373e8b | 14 | b_CHASSIS_with_pushbutton = true; |
GaspardD | 8:f23601373e8b | 15 | d_CHASSIS_dist_one_step_odom = 0.066; |
GaspardD | 6:ab9f3695633f | 16 | } |
GaspardD | 6:ab9f3695633f | 17 | return; |
GaspardD | 6:ab9f3695633f | 18 | } |