Deprecate auto_mode#382
Deprecate auto_mode#382dwalton76 merged 3 commits intoev3dev:developfrom dwalton76:ev3g-api-deprecate-auto-mode
Conversation
|
For issue #378 |
| """ | ||
|
|
||
| # If 'mode' is already set to 'value' there is nothing to do. | ||
| if value == self._mode_value: |
There was a problem hiding this comment.
Do we want a way to bypass this cache logic? Previously, the sysfs accessors were always guaranteed to perform a write operation, whereas now there's no way to handle the case where you intentionally want multiple processes interfacing with the same device. This is a result of the fact that caching was moved down a level from the friendly functions to the getters/setters.
There was a problem hiding this comment.
Part of me is wondering if we need it at all. We didn't have it before and I've never noticed any perf issues with setting the modes. We aren't setting the mode any more often with the deprecation of auto_mode (assuming nobody ever set this to false). Maybe we just chop the mode_value/caching part of this patch?
There was a problem hiding this comment.
@WasabiFan what say you on the mode_value...keep or chop? I'm leaning towards chop and address it as part of #365
There was a problem hiding this comment.
Agreed. I don't like the inconsistency this introduces, especially in light of cases such as the ultrasonic sensor where the only way to send a ping is to set the mode again. We should cut it from here and address it elsewhere.
…thon into ev3g-api-deprecate-auto-mode
|
Removed |
No description provided.