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 }}
This repository has been archived by the owner on Jan 18, 2019. It is now read-only.
I can see the gamma / low_light properties and gamma_reset function are there but do nothing. I don't expect them to do anything as they're basically pointless in this use case. I would like there to be a warning message, even if it's just an in-line print statement, informing the user that these functions are included only for compatibility but have no effect on the emulated visual output.
I've also noticed you can't seem to use the reversed function on the gamma property.
@davidhoness you can't use reversed with gamma on the sense_hat library either; the property setter checks the length of the passed buffer (and generators don't have a length due to their lazy evaluation). Incidentally, it then goes on to check that all values are less than or equal to 31 (although it doesn't test they're also greater than or equal to 0) which, with a generator would immediately evaluate and exhaust the generator (generators won't "replay" later).
You could do the following currently:
sense.gamma=list(reversed(sense.gamma))
Which would construct a list from the generator and pass that to the setter. Alternatively, the setter could be fixed to take account of the generator case (by constructing its own list from whatever buffer is passed)
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I can see the gamma / low_light properties and gamma_reset function are there but do nothing. I don't expect them to do anything as they're basically pointless in this use case. I would like there to be a warning message, even if it's just an in-line print statement, informing the user that these functions are included only for compatibility but have no effect on the emulated visual output.
I've also noticed you can't seem to use the
reversed
function on the gamma property.TypeError: object of type '<invalid type>' has no len() on line 6 in main.py
The text was updated successfully, but these errors were encountered: