Fix formatting and comments
This commit is contained in:
parent
25af275fb0
commit
78aae1cb6c
9
pwm.py
9
pwm.py
@ -2,6 +2,8 @@
|
|||||||
import run_cmd
|
import run_cmd
|
||||||
import argparse
|
import argparse
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
# Variables to determine bounds
|
||||||
MAXFAN = 6
|
MAXFAN = 6
|
||||||
MINSPEED = 35
|
MINSPEED = 35
|
||||||
MAXSPEED = 100
|
MAXSPEED = 100
|
||||||
@ -11,8 +13,6 @@ MAXTEMP = 65
|
|||||||
parser = argparse.ArgumentParser(description='Read information about and control fans on ASRock boards with IPMI.', prog='asrock-pwm-ipmi')
|
parser = argparse.ArgumentParser(description='Read information about and control fans on ASRock boards with IPMI.', prog='asrock-pwm-ipmi')
|
||||||
parser.add_argument('fanplusspeed', nargs='*', metavar='FAN:SPEED',
|
parser.add_argument('fanplusspeed', nargs='*', metavar='FAN:SPEED',
|
||||||
help='Fan to change the speed of, and the speed, separated by \':\'. Set to 0 for auto.')
|
help='Fan to change the speed of, and the speed, separated by \':\'. Set to 0 for auto.')
|
||||||
#parser.add_argument('SPEED', type=int, nargs='+',
|
|
||||||
# help='Speed to set FAN to')
|
|
||||||
parser.add_argument('-i', '--info', action="store_true", default=False,
|
parser.add_argument('-i', '--info', action="store_true", default=False,
|
||||||
help='Read fan information')
|
help='Read fan information')
|
||||||
parser.add_argument('-a', '--auto', action="store_true", default=False,
|
parser.add_argument('-a', '--auto', action="store_true", default=False,
|
||||||
@ -20,9 +20,9 @@ parser.add_argument('-a', '--auto', action="store_true", default=False,
|
|||||||
parser.add_argument('-q', '--quiet', action="store_true", default=False,
|
parser.add_argument('-q', '--quiet', action="store_true", default=False,
|
||||||
help='Hide output')
|
help='Hide output')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
#print(args.info)
|
|
||||||
#print(args)
|
#print(args)
|
||||||
#print(args.fanplusspeed)
|
|
||||||
fanChanged = False
|
fanChanged = False
|
||||||
|
|
||||||
def iterateFans(info):
|
def iterateFans(info):
|
||||||
@ -39,7 +39,6 @@ def iterateFans(info):
|
|||||||
else:
|
else:
|
||||||
print("Set speed of FAN" + fan + " to " + speed + "%.")
|
print("Set speed of FAN" + fan + " to " + speed + "%.")
|
||||||
|
|
||||||
|
|
||||||
while args.auto is True:
|
while args.auto is True:
|
||||||
temp = run_cmd.getTemp()
|
temp = run_cmd.getTemp()
|
||||||
speeds = []
|
speeds = []
|
||||||
|
Loading…
x
Reference in New Issue
Block a user