Conditional translation for fan control (FAN_SOFT_PWM), temporary disabled lcd backlight control

This commit is contained in:
Robert Pelnar 2019-02-01 13:29:50 +01:00 committed by PavelSindler
parent 6bf8611afa
commit 3244c37435
3 changed files with 20 additions and 3 deletions

View File

@ -99,7 +99,7 @@
//#define KILL_PIN 32
#define LCD_BL_PIN 5 //backlight control pin
//#define LCD_BL_PIN 5 //backlight control pin
#define BEEPER 84 // Beeper on AUX-4
#define LCD_PINS_RS 82
#define LCD_PINS_ENABLE 61 // !!! changed from 18 (EINY03)

View File

@ -462,7 +462,7 @@ void setExtruderAutoFanState(int pin, bool state)
// this idiom allows both digital and PWM fan outputs (see M42 handling).
pinMode(pin, OUTPUT);
digitalWrite(pin, newFanSpeed);
analogWrite(pin, newFanSpeed);
//analogWrite(pin, newFanSpeed);
}
#if (defined(FANCHECK) && (((defined(TACH_0) && (TACH_0 >-1)) || (defined(TACH_1) && (TACH_1 > -1)))))
@ -1355,7 +1355,12 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE)||(eSoundMode
SET_OUTPUT(EXTRUDER_0_AUTO_FAN_PIN);
SET_OUTPUT(FAN_PIN);
WRITE(EXTRUDER_0_AUTO_FAN_PIN, 1);
#ifdef FAN_SOFT_PWM
fanSpeedSoftPwm = 255;
#else //FAN_SOFT_PWM
analogWrite(FAN_PIN, 255);
#endif //FAN_SOFT_PWM
fanSpeed = 255;
delayMicroseconds(2000);
}

View File

@ -7261,7 +7261,12 @@ static bool lcd_selftest_manual_fan_check(int _fan, bool check_opposite)
if (check_opposite == true) lcd_puts_P(_T(MSG_SELFTEST_EXTRUDER_FAN));
else lcd_puts_P(_T(MSG_SELFTEST_COOLING_FAN));
SET_OUTPUT(FAN_PIN);
#ifdef FAN_SOFT_PWM
fanSpeedSoftPwm = 255;
#else //FAN_SOFT_PWM
analogWrite(FAN_PIN, 255);
#endif //FAN_SOFT_PWM
break;
}
_delay(500);
@ -7286,7 +7291,11 @@ static bool lcd_selftest_manual_fan_check(int _fan, bool check_opposite)
case 1:
// object cooling fan
SET_OUTPUT(FAN_PIN);
#ifdef FAN_SOFT_PWM
fanSpeedSoftPwm = 255;
#else //FAN_SOFT_PWM
analogWrite(FAN_PIN, 255);
#endif //FAN_SOFT_PWM
break;
}
@ -7319,8 +7328,11 @@ static bool lcd_selftest_manual_fan_check(int _fan, bool check_opposite)
SET_OUTPUT(EXTRUDER_0_AUTO_FAN_PIN);
WRITE(EXTRUDER_0_AUTO_FAN_PIN, 0);
SET_OUTPUT(FAN_PIN);
#ifdef FAN_SOFT_PWM
fanSpeedSoftPwm = 0;
#else //FAN_SOFT_PWM
analogWrite(FAN_PIN, 0);
#endif //FAN_SOFT_PWM
fanSpeed = 0;
manage_heater();