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

Simulator loses some manual component value changes #127

Closed
csatt opened this issue Oct 31, 2020 · 0 comments
Closed

Simulator loses some manual component value changes #127

csatt opened this issue Oct 31, 2020 · 0 comments
Assignees
Labels

Comments

@csatt
Copy link
Owner

csatt commented Oct 31, 2020

If the user manually changes one of the following "secondary" values, that change is lost if the "primary" value is one of the standard values and a simulation is run:

  • Shunt resistor power rating
  • Load capacitor voltage rating
  • Bleed resistor power rating
    For example. if the load capacitor capacitance is 1000uF and the user changes the voltage from 100V to 50V, the voltage flips back to 100V when the Simulate button is pressed and the simulation is performed with 100V.

A workaround would be for the user to very slightly change the primary value, e.g. use 1001uF instead of 1000uF. But this is easy to fix.

csatt added a commit that referenced this issue Oct 31, 2020
Changed code in shunt_ohms_widget_actions(), load_cap_widget_actions() and rb_widget_actions() to suppress changing the secondary value (shunt_wattage, load_cap_v, rb_wattage) when the primary value matches one of the standard values is the method was not called with an event. This keeps it from changing a manually enetered value. However, we still want to change the secondary value when the "Restore Defaults" button is called, so the restore_shunt_ohms_defaults(),  restore_load_cap_defaults() and restore_rb_defaults() methods call the shunt_ohms_widget_actions(), load_cap_widget_actions() and rb_widget_actions()  with a dummy event.

The update_all_widgets() method is also fixed so it updates the secondary values. Otherwise, if the user doesn't hit enter after changing one of these values, the new value isn't used.

This change was made to both the python and python file.
@csatt csatt closed this as completed Oct 31, 2020
@csatt csatt self-assigned this Nov 1, 2020
@csatt csatt added the bug label Nov 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant