Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The dictionary fix is obvious. It's just fallout from #1402.
The leave_persistent_mode fix is less obvious.
Before this change, if we set the field to 0 and then set the
magnet in persistent mode, it will do everything properly, however
the "persistent mode" light will not go on and the magnet will end in
the "zero field, heater off" state. Then, when you try to leave
persistent mode, it will do nothing, since there is no persistent
field. This is obnoxious, since we would like to do sweeps that
involve operations like this:
These will fail if you include 0 in your sweep. It will fail in an
annoying way: all future fields will just be 0.
This change fixes this problem. If the state is "heater off, field
at zero" then it just turns the heater on.
@jenshnielsen @astafan8