Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two fixes for IPS120 driver. #1619

Merged
merged 4 commits into from
Jul 2, 2019
Merged

Two fixes for IPS120 driver. #1619

merged 4 commits into from
Jul 2, 2019

Conversation

spxtr
Copy link
Contributor

@spxtr spxtr commented Jun 25, 2019

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:

  1. leave persistent mode
  2. set a new magnetic field
  3. enter persistent mode
  4. do a sweep

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

The dictionary fix is obvious. The leave_persistent_mode fix is less
so. 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:
        1. leave persistent mode
        2. set a new magnetic field
        3. enter persistent mode
        4. do a sweep
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.
@codecov
Copy link

codecov bot commented Jun 25, 2019

Codecov Report

Merging #1619 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1619   +/-   ##
=======================================
  Coverage   70.55%   70.55%           
=======================================
  Files         123      123           
  Lines       14921    14921           
=======================================
  Hits        10528    10528           
  Misses       4393     4393

@astafan8
Copy link
Contributor

@spxtr I don't have experience with this instrument, so I am gonna just trust that you did the right choice. Can you confirm that this exact change has been tested on a real instrument?

@spxtr
Copy link
Contributor Author

spxtr commented Jun 26, 2019

Yes, tested on a real instrument.

@astafan8 astafan8 merged commit 2a30f5b into microsoft:master Jul 2, 2019
@spxtr spxtr deleted the ips120_fixes branch July 2, 2019 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants