Skip to content

Commit

Permalink
don't apply undervolt if omitted from config (fix #241)
Browse files Browse the repository at this point in the history
  • Loading branch information
erpalma committed Mar 19, 2021
1 parent fa66ea1 commit 0b21989
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lenovo_fix.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0b21989

Please sign in to comment.