Fix scaledFanSpeed

This commit is contained in:
Scott Lahteine 2019-06-28 21:24:31 -05:00
parent 946f6bdeaa
commit c9a8db33c3

View file

@ -472,11 +472,11 @@ class Temperature {
static constexpr uint8_t fan_speed_scaler[FAN_COUNT] = ARRAY_N(FAN_COUNT, 128, 128, 128, 128, 128, 128);
#endif
static inline uint8_t scaledFanSpeed(const uint8_t target) {
static inline uint8_t scaledFanSpeed(const uint8_t target, const uint8_t fs) {
return (fs * uint16_t(fan_speed_scaler[target])) >> 7;
}
static inline uint8_t scaledFanSpeed(const uint8_t target, const uint8_t fs) {
static inline uint8_t scaledFanSpeed(const uint8_t target) {
return scaledFanSpeed(target, fan_speed[target]);
}