don't apply undervolt if omitted from config (fix #241)

This commit is contained in:
erpalma 2021-03-19 19:35:28 +01:00
parent fa66ea1033
commit 0b219890d9

View file

@ -405,6 +405,8 @@ def get_undervolt(plane=None, convert=False):
def undervolt(config):
if 'UNDERVOLT.{:s}'.format(power['source']) not in config and 'UNDERVOLT' not in config:
return
for plane in VOLTAGE_PLANES:
write_offset_mv = config.getfloat(
'UNDERVOLT.{:s}'.format(power['source']), plane, fallback=config.getfloat('UNDERVOLT', plane, fallback=0.0)