Leistungsvorgabe jetzt in Schritten und nicht mehr in Prozent
This commit is contained in:
8
io/io.c
8
io/io.c
@@ -197,22 +197,22 @@ void IO_DoCyclic()
|
||||
{
|
||||
mylog(LOG_INFO, "IO: KEY-Plus: Start motor.");
|
||||
Can_SetMotorGear(0, 1);
|
||||
Can_SetMotorPower(0, MOTOR_PWR_MIN_PCT);
|
||||
Can_SetMotorPower(0, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
mylog(LOG_INFO, "IO: KEY-Plus: Increase power.");
|
||||
Can_SetMotorPower(0, motctrl[0].iMotorPowerPct + MOTOR_PWR_STEP);
|
||||
Can_SetMotorPower(0, motctrl[0].iMotorPowerSteps + 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (gpioKeyPwrDown.iKeyRisingEdge)
|
||||
{
|
||||
// minus key is pressed -> decrease power
|
||||
if (motctrl[0].iMotorPowerPct > MOTOR_PWR_MIN_PCT)
|
||||
if (motctrl[0].iMotorPowerSteps > 1)
|
||||
{
|
||||
mylog(LOG_INFO, "IO: KEY-Minus: Decrease power.");
|
||||
Can_SetMotorPower(0, motctrl[0].iMotorPowerPct - MOTOR_PWR_STEP);
|
||||
Can_SetMotorPower(0, motctrl[0].iMotorPowerSteps - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user