TRR 2018 / Mbed 2 deprecated biniou-TRR2019-DLVV

Dependencies:   mbed MPU6050

chassis_mode.cpp

Committer:
ohlimi2
Date:
2019-10-05
Revision:
15:0f89d1ff860d
Parent:
9:1b54bac6d9a7

File content as of revision 15:0f89d1ff860d:

#include "chassis_mode.h"

DigitalIn b_CHASSIS_Mode(PE_11);
bool b_CHASSIS_with_pushbutton;
double d_CHASSIS_dist_one_step_odom;
double d_CHASSIS_inversion = 1.0;

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