You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
wait_until_angle_changed_by(delta) is not direction-sensitive #534
4.14.61-ev3dev-2.2.2-ev3
ii python3-ev3dev 1.2.0 all Python language bindings for ev3d
ii python3-ev3dev 2.0.0~beta2 all Python language bindings for ev3d
wait_until_angle_changed_by(delta): Wait until angle has changed by specified amount.
It's not clear from the above description whether this is direction-sensitive. For example, if I have delta = +90° (clockwise rotation) and the sensor is turned 100° counterclockwise, does that mean the angle has changed by delta?
My tests make me think that the direction does NOT matter, but quite often users will be looking for a turn in a specific direction, so I'm surprised the function cannot handle that. Maybe the function can be made direction-sensitive?
@dwalton76 I think Nigel is suggesting that it would be useful to make it direction-sensitive. It seems reasonable to me that we could add an argument which skipped the abs call to enable that scenario.
Activity
dwalton76 commentedon Oct 26, 2018
The code is using the abs() of the delta so the direction does not matter.
WasabiFan commentedon Oct 27, 2018
@dwalton76 I think Nigel is suggesting that it would be useful to make it direction-sensitive. It seems reasonable to me that we could add an argument which skipped the
abscall to enable that scenario.GyroSensor wait_until_angle_changed_by added direction_sensitive opti…