斑马线: 3f去抖/-1衰减/3s停车/赛道外忽略/丢线忽略/reject日志; 起步弹射2x/0.7s; 斑马线后delay1.5s改foresee=35/5s; PWM构造先归零防瞬动
This commit is contained in:
@@ -7,6 +7,7 @@ MotorController::MotorController(int pwmchip, int pwmnum, int gpioNum, unsigned
|
||||
: pwmController(pwmchip, pwmnum), directionGPIO(gpioNum)
|
||||
{
|
||||
pwmController.setPeriod(period_ns);
|
||||
pwmController.setDutyCycle(0); // 先归零再使能, 防止 sysfs 残留值导致电机瞬动
|
||||
directionGPIO.setDirection("out");
|
||||
pwmController.enable();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user