From c5dd9dd65469f87d2b50d738e9fef5a8f443982a Mon Sep 17 00:00:00 2001 From: PavelSindler Date: Sat, 2 Dec 2017 00:19:47 +0100 Subject: [PATCH 1/2] gitignore --- .gitignore | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..6ff03e18 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +################################################################################ +# This .gitignore file was automatically created by Microsoft(R) Visual Studio. +################################################################################ + +/Firmware/Firmware.vcxproj From 79449a8eafd5c9e8a669827cf5103b83501b9f02 Mon Sep 17 00:00:00 2001 From: Robert Pelnar Date: Fri, 1 Feb 2019 13:29:50 +0100 Subject: [PATCH 2/2] Conditional translation for fan control (FAN_SOFT_PWM), temporary disabled lcd backlight control --- Firmware/pins_Einsy_1_0.h | 2 +- Firmware/temperature.cpp | 7 ++++++- Firmware/ultralcd.cpp | 14 +++++++++++++- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/Firmware/pins_Einsy_1_0.h b/Firmware/pins_Einsy_1_0.h index 005683c0..33363388 100644 --- a/Firmware/pins_Einsy_1_0.h +++ b/Firmware/pins_Einsy_1_0.h @@ -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) diff --git a/Firmware/temperature.cpp b/Firmware/temperature.cpp index a4e08945..8b2d973f 100644 --- a/Firmware/temperature.cpp +++ b/Firmware/temperature.cpp @@ -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); } diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index eac434ad..ad05909a 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -7260,7 +7260,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); @@ -7285,7 +7290,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; } @@ -7318,8 +7327,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();