To reproduce: call Core2ForAWS_Motor_SetStrength(0) when the motor is off.
What happens: The motor is turned on, with voltage at the lowest level. Note that the else if branch below is taken because the strength parameter is 0 and motor_state is false.
What I expect to happen: that this is a no-op and the motor remains off.
To reproduce: call
Core2ForAWS_Motor_SetStrength(0)
when the motor is off. What happens: The motor is turned on, with voltage at the lowest level. Note that theelse if
branch below is taken because thestrength
parameter is0
andmotor_state
isfalse
. What I expect to happen: that this is a no-op and the motor remains off.https://github.com/m5stack/Core2-for-AWS-IoT-EduKit/blob/ce8e83ad4222e510937b0cd9934f0d244aa25203/Blinky-Hello-World/components/core2forAWS/core2forAWS.c#L85-L99