Patches for compiler warnings/errors
This commit is contained in:
parent
98efc18f2c
commit
91baca6abb
@ -45,7 +45,6 @@ void GcodeSuite::M106() {
|
|||||||
if (p < FAN_COUNT) {
|
if (p < FAN_COUNT) {
|
||||||
#if ENABLED(EXTRA_FAN_SPEED)
|
#if ENABLED(EXTRA_FAN_SPEED)
|
||||||
const int16_t t = parser.intval('T');
|
const int16_t t = parser.intval('T');
|
||||||
NOMORE(t, 255);
|
|
||||||
if (t > 0) {
|
if (t > 0) {
|
||||||
switch (t) {
|
switch (t) {
|
||||||
case 1:
|
case 1:
|
||||||
@ -56,7 +55,7 @@ void GcodeSuite::M106() {
|
|||||||
fanSpeeds[p] = new_fanSpeeds[p];
|
fanSpeeds[p] = new_fanSpeeds[p];
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
new_fanSpeeds[p] = t;
|
new_fanSpeeds[p] = min(t, 255);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
@ -1717,15 +1717,15 @@ void Temperature::isr() {
|
|||||||
|
|
||||||
#if ENABLED(FAN_SOFT_PWM)
|
#if ENABLED(FAN_SOFT_PWM)
|
||||||
#if HAS_FAN0
|
#if HAS_FAN0
|
||||||
soft_pwm_count_fan[0] = (soft_pwm_count_fan[0] & pwm_mask) + soft_pwm_amount_fan[0] >> 1;
|
soft_pwm_count_fan[0] = ((soft_pwm_count_fan[0] & pwm_mask) + soft_pwm_amount_fan[0]) >> 1;
|
||||||
WRITE_FAN(soft_pwm_count_fan[0] > pwm_mask ? HIGH : LOW);
|
WRITE_FAN(soft_pwm_count_fan[0] > pwm_mask ? HIGH : LOW);
|
||||||
#endif
|
#endif
|
||||||
#if HAS_FAN1
|
#if HAS_FAN1
|
||||||
soft_pwm_count_fan[1] = (soft_pwm_count_fan[1] & pwm_mask) + soft_pwm_amount_fan[1] >> 1;
|
soft_pwm_count_fan[1] = ((soft_pwm_count_fan[1] & pwm_mask) + soft_pwm_amount_fan[1]) >> 1;
|
||||||
WRITE_FAN1(soft_pwm_count_fan[1] > pwm_mask ? HIGH : LOW);
|
WRITE_FAN1(soft_pwm_count_fan[1] > pwm_mask ? HIGH : LOW);
|
||||||
#endif
|
#endif
|
||||||
#if HAS_FAN2
|
#if HAS_FAN2
|
||||||
soft_pwm_count_fan[2] = (soft_pwm_count_fan[2] & pwm_mask) + soft_pwm_amount_fan[2] >> 1;
|
soft_pwm_count_fan[2] = ((soft_pwm_count_fan[2] & pwm_mask) + soft_pwm_amount_fan[2]) >> 1;
|
||||||
WRITE_FAN2(soft_pwm_count_fan[2] > pwm_mask ? HIGH : LOW);
|
WRITE_FAN2(soft_pwm_count_fan[2] > pwm_mask ? HIGH : LOW);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user