Ejemplo n.º 1
0
void MOT_Init(void) {
  motorL.DirPutVal = DirLPutVal;
  motorR.DirPutVal = DirRPutVal;
  motorL.SetRatio16 = PWMLSetRatio16;
  motorR.SetRatio16 = PWMRSetRatio16;
  MOT_SetSpeedPercent(MOT_MOTOR_LEFT, 0);
  MOT_SetSpeedPercent(MOT_MOTOR_RIGHT, 0);
  PWML_Enable();
  PWMR_Enable();
}
Ejemplo n.º 2
0
void MOT_Init(void) {
#if PL_HAS_MOTOR_BRAKE
  motorL.BrakePutVal = BrakeLPutVal;
  motorR.BrakePutVal = BrakeRPutVal;
#endif
  motorL.DirPutVal = DirLPutVal;
  motorR.DirPutVal = DirRPutVal;
  motorL.SetRatio16 = PWMLSetRatio16;
  motorR.SetRatio16 = PWMRSetRatio16;
  MOT_SetSpeedPercent(&motorL, 0);
  MOT_SetSpeedPercent(&motorR, 0);
  PWML_Enable();
  PWMR_Enable();
}
Ejemplo n.º 3
0
void MOT_Init(void) {
#if MOTOR_HAS_INVERT
  motorL.inverted = FALSE;
  motorR.inverted = FALSE;
#endif
  motorL.DirPutVal = DirLPutVal;
  motorR.DirPutVal = DirRPutVal;
  motorL.SetRatio16 = PWMLSetRatio16;
  motorR.SetRatio16 = PWMRSetRatio16;
  MOT_SetSpeedPercent(&motorL, 0);
  MOT_SetSpeedPercent(&motorR, 0);
  (void)PWML_Enable();
  (void)PWMR_Enable();
}