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@9:1b54bac6d9a7, 2019-10-03 (annotated)
- Committer:
- GaspardD
- Date:
- Thu Oct 03 23:28:56 2019 +0000
- Revision:
- 9:1b54bac6d9a7
- Parent:
- 8:f23601373e8b
- Child:
- 15:0f89d1ff860d
a tester ;
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 | 9:1b54bac6d9a7 | 6 | double d_CHASSIS_inversion = 1.0; |
GaspardD | 6:ab9f3695633f | 7 | |
GaspardD | 6:ab9f3695633f | 8 | void init_chassis_mode() |
GaspardD | 6:ab9f3695633f | 9 | { |
GaspardD | 8:f23601373e8b | 10 | b_CHASSIS_Mode.mode(PullUp); |
GaspardD | 8:f23601373e8b | 11 | if(b_CHASSIS_Mode.read()) { |
GaspardD | 8:f23601373e8b | 12 | b_CHASSIS_with_pushbutton = false; |
GaspardD | 9:1b54bac6d9a7 | 13 | d_CHASSIS_inversion = -1.0; |
GaspardD | 9:1b54bac6d9a7 | 14 | d_CHASSIS_dist_one_step_odom = 0.066; |
GaspardD | 6:ab9f3695633f | 15 | } else { |
GaspardD | 8:f23601373e8b | 16 | b_CHASSIS_with_pushbutton = true; |
GaspardD | 9:1b54bac6d9a7 | 17 | d_CHASSIS_inversion = 1.0; |
GaspardD | 8:f23601373e8b | 18 | d_CHASSIS_dist_one_step_odom = 0.066; |
GaspardD | 6:ab9f3695633f | 19 | } |
GaspardD | 6:ab9f3695633f | 20 | return; |
GaspardD | 6:ab9f3695633f | 21 | } |