예제 #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();
}
예제 #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();
}
예제 #3
0
파일: Motor.c 프로젝트: endru4/INTRO_AC_GIT
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();
}