SMDH is sending a DC power monitoring solution.
We imagine in the field that the user may change the machine name.
We think it most likely that new machines will have a 12V DC power supply so want to set the voltage to 12 for all unnamed machines.
Hence, as seen in branch backup, the 230s had to be swapped out for 12s in user unfriendly places. See not just module_config.toml but electrical.py
In the voltage / power factor case, a default is sensible. When moving the system between machines, they will probably share a power supply. But - could that default be defined in analysis/user_config.toml? More than just available in the user config to overwrite the module config, could the user config be the single source of truth for this variable?
On the wider question - I'm uncomfortable with the style of always having defaults and overwriting them in cases where the user really should be aware of the variable and know what it is set to. Whilst having a live / functional value for almost every setting is handy for quick start, it does get confusing. E.g. I've seen users change the CT ratio but not uncomment the line, then wonder why their data is a factor of 3 out. In many cases I would rather raise a NotConfiguredError or similar?
SMDH is sending a DC power monitoring solution. We imagine in the field that the user may change the machine name. We think it most likely that new machines will have a 12V DC power supply so want to set the voltage to 12 for all unnamed machines. Hence, as seen in branch
backup
, the230
s had to be swapped out for12
s in user unfriendly places. See not justmodule_config.toml
butelectrical.py
In the voltage / power factor case, a default is sensible. When moving the system between machines, they will probably share a power supply. But - could that default be defined in
analysis/user_config.toml
? More than just available in the user config to overwrite the module config, could the user config be the single source of truth for this variable?On the wider question - I'm uncomfortable with the style of always having defaults and overwriting them in cases where the user really should be aware of the variable and know what it is set to. Whilst having a live / functional value for almost every setting is handy for quick start, it does get confusing. E.g. I've seen users change the CT ratio but not uncomment the line, then wonder why their data is a factor of 3 out. In many cases I would rather raise a
NotConfiguredError
or similar?