Revision 19a69797

View differences:

components/MotorControl.cpp
542 542

  
543 543

  
544 544
void MotorControl::setMotorEnable(bool enable){
545
  this->accumulatedErrorV = 0;
546
  this->accumulatedErrorW = 0;
547
  this->motorEnable = enable;
545
  if (this->motorEnable != enable){
546
    this->accumulatedErrorV = 0;
547
    this->accumulatedErrorW = 0;
548
    this->motorEnable = enable;
549
  }
550

  
548 551
}
549 552

  
550 553
bool MotorControl::getMotorEnable(){
include/amiro/Constants.h
35 35

  
36 36
namespace amiro {
37 37

  
38
    // Control the FSM for line following
39
  // enum msg_content : uint8_t{
40
  //     STOP = 0, 
41
  //     START = 1,
42
  //     EDGE_LEFT = 2,
43
  //     EDGE_RIGHT = 3,
44
  //     FUZZY = 4,
45
  //     DOCK = 5,
46
  //     UNDOCK = 6,
47
  //     CHARGE = 7
48
  //   };
49

  
38 50
namespace CAN {
39 51

  
40 52
  const uint32_t UPDATE_PERIOD        = US2ST(10000);  // 100 Hz
......
193 205
    WHEEL_L = 0, WHEEL_LEFT = 0, LEFT_WHEEL = 0,
194 206
    WHEEL_R = 1, WHEEL_RIGHT = 1, RIGHT_WHEEL = 1,
195 207
  };
208

  
209

  
196 210
}
197 211

  
212

  
213

  
198 214
namespace PowerManagement {
199 215

  
200 216
  /** \brief Index of the proximity sensors

Also available in: Unified diff