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
Problem reported by Max on nxt-python mailing list: when the color
sensor is reset, because of a program start or stop for example, it
takes the NXT firmware some time to return a valid value.
Add a new get_valid_input_values to retry reading when value is not
valid. Raise an nxt.sensor.analog.InvalidSensorReading on timeout.
Use this new method for all "analog" sensors.
Unrelated change: use dataclass for nxt.sensor.analog.RawReading class
and rename mode to sensor_mode for coherency. This should not have any
impact on user code as this is used mostly internally, and standard
usage stay unchanged.
0 commit comments