Revision ff7ad65b components/MotorControl.cpp

View differences:

components/MotorControl.cpp
434 434
    chprintf((BaseSequentialStream*)&SD1, "dGain %f\n", this->dGain );
435 435
}
436 436

  
437
void MotorControl::resetGains()
438
{
439
  // reset factors
440
  chSysLock();
441
  this->motorCalibrationFactor = 1.0f;
442
  this->pGain = 1000;
443
  this->iGain = 0.08f;
444
  this->dGain = 0.01f;
445
  chSysUnlock();
446

  
447
  // write reset factors to memory
448
  this->memory->setwheelfactor(this->motorCalibrationFactor);
449
  this->memory->setpGain(this->pGain);
450
  this->memory->setiGain(this->iGain);
451
  this->memory->setdGain(this->dGain);
452

  
453
  return;
454
}
455

  
437 456

  
438 457

  
439 458
void MotorControl::calcVelocity() {

Also available in: Unified diff