Fixup map access in fan util
All checks were successful
continuous-integration/drone/tag Build is passing
All checks were successful
continuous-integration/drone/tag Build is passing
This commit is contained in:
parent
3ca4b66304
commit
be7c3e63a2
|
@ -25,10 +25,10 @@ func main() {
|
||||||
// Get the various fan related config options as local variables
|
// Get the various fan related config options as local variables
|
||||||
speedMap := pfConfig.Float64Map(config.CONFIG_KEY_FAN_SPEEDS)
|
speedMap := pfConfig.Float64Map(config.CONFIG_KEY_FAN_SPEEDS)
|
||||||
POLL_INTERVAL := pfConfig.String(config.CONFIG_KEY_FAN_POLL_INTERVAL)
|
POLL_INTERVAL := pfConfig.String(config.CONFIG_KEY_FAN_POLL_INTERVAL)
|
||||||
SPEED_FULL_TEMP := speedMap[pfConfig.String(config.CONFIG_MAP_KEY_FAN_SPEED_100)]
|
SPEED_FULL_TEMP := speedMap[config.CONFIG_MAP_KEY_FAN_SPEED_100]
|
||||||
SPEED_SEVENTY_FIVE_PERCENT_TEMP := speedMap[pfConfig.String(config.CONFIG_MAP_KEY_FAN_SPEED_75)]
|
SPEED_SEVENTY_FIVE_PERCENT_TEMP := speedMap[config.CONFIG_MAP_KEY_FAN_SPEED_75]
|
||||||
SPEED_FIFTY_PERCENT_TEMP := speedMap[pfConfig.String(config.CONFIG_MAP_KEY_FAN_SPEED_50)]
|
SPEED_FIFTY_PERCENT_TEMP := speedMap[config.CONFIG_MAP_KEY_FAN_SPEED_50]
|
||||||
SPEED_TWENTY_FIVE_PERCENT_TEMP := speedMap[pfConfig.String(config.CONFIG_MAP_KEY_FAN_SPEED_25)]
|
SPEED_TWENTY_FIVE_PERCENT_TEMP := speedMap[config.CONFIG_MAP_KEY_FAN_SPEED_25]
|
||||||
SPEED_MINIMUM := pfConfig.Int(config.CONFIG_KEY_FAN_MIN_SPEED)
|
SPEED_MINIMUM := pfConfig.Int(config.CONFIG_KEY_FAN_MIN_SPEED)
|
||||||
|
|
||||||
// Setup fan and bail if we can't see it
|
// Setup fan and bail if we can't see it
|
||||||
|
|
Loading…
Reference in a new issue