From 3ddbac6056ed874fcae18d2a9e0a0a27eb29454f Mon Sep 17 00:00:00 2001 From: Robert Pelnar Date: Thu, 21 Dec 2017 01:00:49 +0100 Subject: [PATCH] LCD_PWM removed (will be solved other way) --- Firmware/Marlin.h | 4 ---- Firmware/Marlin_main.cpp | 3 --- Firmware/pins_Einy_0_4.h | 4 ++-- Firmware/temperature.cpp | 38 -------------------------------------- 4 files changed, 2 insertions(+), 47 deletions(-) diff --git a/Firmware/Marlin.h b/Firmware/Marlin.h index f81565a1..4d04b144 100644 --- a/Firmware/Marlin.h +++ b/Firmware/Marlin.h @@ -274,10 +274,6 @@ extern void homeaxis(int axis); extern unsigned char fanSpeedSoftPwm; #endif -#if defined(LCD_PWM_PIN) && (LCD_PWM_PIN > -1) -extern unsigned char lcdSoftPwm; -extern unsigned char lcdBlinkDelay; -#endif #ifdef FILAMENT_SENSOR extern float filament_width_nominal; //holds the theoretical filament diameter ie., 3.00 or 1.75 diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index cbd5e295..77b718be 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -1008,9 +1008,6 @@ void setup() SET_OUTPUT(CONTROLLERFAN_PIN); //Set pin used for driver cooling fan #endif -#if defined(LCD_PWM_PIN) && (LCD_PWM_PIN > -1) - SET_OUTPUT(LCD_PWM_PIN); //Set pin used for driver cooling fan -#endif #ifdef DIGIPOT_I2C digipot_i2c_init(); diff --git a/Firmware/pins_Einy_0_4.h b/Firmware/pins_Einy_0_4.h index b6fc6e6d..b41ead82 100644 --- a/Firmware/pins_Einy_0_4.h +++ b/Firmware/pins_Einy_0_4.h @@ -103,8 +103,8 @@ #ifdef NEWPANEL -#define LCD_PWM_PIN -1//32 // lcd backlight brightnes pwm control pin -#define LCD_PWM_MAX 0x0f // lcd pwm maximum value (0x07=64Hz, 0x0f=32Hz, 0x1f=16Hz) +//#define LCD_PWM_PIN -1//32 // lcd backlight brightnes pwm control pin +//#define LCD_PWM_MAX 0x0f // lcd pwm maximum value (0x07=64Hz, 0x0f=32Hz, 0x1f=16Hz) #define BEEPER 84 // Beeper on AUX-4 #define LCD_PINS_RS 82 diff --git a/Firmware/temperature.cpp b/Firmware/temperature.cpp index e8031e1d..420511a6 100644 --- a/Firmware/temperature.cpp +++ b/Firmware/temperature.cpp @@ -97,10 +97,6 @@ float current_temperature_bed = 0.0; unsigned char fanSpeedSoftPwm; #endif -#if defined(LCD_PWM_PIN) && (LCD_PWM_PIN > -1) - unsigned char lcdSoftPwm = (LCD_PWM_MAX * 2 + 1); //set default value to maximum - unsigned char lcdBlinkDelay = 0; //lcd blinking delay (0 = no blink) -#endif unsigned char soft_pwm_bed; @@ -156,11 +152,6 @@ static volatile bool temp_meas_ready = false; static unsigned long extruder_autofan_last_check; #endif -#if defined(LCD_PWM_PIN) && (LCD_PWM_PIN > -1) - static unsigned char soft_pwm_lcd = 0; - static unsigned char lcd_blink_delay = 0; - static bool lcd_blink_on = false; -#endif #if EXTRUDERS > 3 # error Unsupported number of extruders @@ -1056,11 +1047,6 @@ void tp_init() #endif #ifdef FAN_SOFT_PWM soft_pwm_fan = fanSpeedSoftPwm / 2; - #endif - #if defined(LCD_PWM_PIN) && (LCD_PWM_PIN > -1) - soft_pwm_lcd = lcdSoftPwm / 2; - lcd_blink_delay = lcdBlinkDelay; - lcd_blink_on = true; #endif #endif @@ -1631,27 +1617,6 @@ ISR(TIMER0_COMPB_vect) WRITE(HEATER_1_PIN,0); #endif } -#if defined(LCD_PWM_PIN) && (LCD_PWM_PIN > -1) - if ((pwm_count & LCD_PWM_MAX) == 0) - { - if (lcd_blink_delay) - { - lcd_blink_delay--; - if (lcd_blink_delay == 0) - { - lcd_blink_delay = lcdBlinkDelay; - lcd_blink_on = !lcd_blink_on; - } - } - else - { - lcd_blink_delay = lcdBlinkDelay; - lcd_blink_on = true; - } - soft_pwm_lcd = (lcd_blink_on) ? (lcdSoftPwm / 2) : 0; - if (soft_pwm_lcd > 0) WRITE(LCD_PWM_PIN,1); else WRITE(LCD_PWM_PIN,0); - } -#endif #if EXTRUDERS > 1 if(soft_pwm_1 < pwm_count) WRITE(HEATER_1_PIN,0); @@ -1665,9 +1630,6 @@ ISR(TIMER0_COMPB_vect) #ifdef FAN_SOFT_PWM if(soft_pwm_fan < pwm_count) WRITE(FAN_PIN,0); #endif -#if defined(LCD_PWM_PIN) && (LCD_PWM_PIN > -1) - if (soft_pwm_lcd < (pwm_count & LCD_PWM_MAX)) WRITE(LCD_PWM_PIN,0); -#endif pwm_count += (1 << SOFT_PWM_SCALE); pwm_count &= 0x7f;