HPInc / HP-Digital-Microfluidics

HP Digital Microfluidics Software Platform and Libraries
MIT License
2 stars 0 forks source link

Simplify FixedPowerSupply #177

Open EvanKirshenbaum opened 5 months ago

EvanKirshenbaum commented 5 months ago

I just noticed that FixedPowerSupply does work that could be done by PowerSupply (or BinaryComponent). Pretty much the only thing it should need to do is transform its voltage_level parameter into min_voltage and max_voltage. (It should also get all the rest of the constructor parameters.)

Arguably, PowerSupply._check_voltage_bounds() should print a different message if max and min are the same and we're trying to change to something different that isn't zero.

Migrated from internal repository. Originally created by @EvanKirshenbaum on Jun 17, 2022 at 9:51 AM PDT.