TRR 2018 / Mbed 2 deprecated biniou-TRR2019-DLVV

Dependencies:   mbed MPU6050

chassis_mode.cpp

Committer:
GaspardD
Date:
2019-10-02
Revision:
8:f23601373e8b
Parent:
6:ab9f3695633f
Child:
9:1b54bac6d9a7

File content as of revision 8:f23601373e8b:

#include "chassis_mode.h"

DigitalIn b_CHASSIS_Mode(PE_11);
bool b_CHASSIS_with_pushbutton;
double d_CHASSIS_dist_one_step_odom;

void init_chassis_mode()
{
    b_CHASSIS_Mode.mode(PullUp);
    if(b_CHASSIS_Mode.read()) {
        b_CHASSIS_with_pushbutton = false;
        d_CHASSIS_dist_one_step_odom = 0.08;
    } else {
        b_CHASSIS_with_pushbutton = true;
        d_CHASSIS_dist_one_step_odom = 0.066;
    }
    return;
}