From 50a5ce1dc45c7f49a8fad261360ef3c625de31a2 Mon Sep 17 00:00:00 2001 From: Sergey Taranenko Date: Fri, 14 Dec 2012 15:37:05 +0400 Subject: [PATCH 1/4] deduplicate messages --- Marlin/language.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/Marlin/language.h b/Marlin/language.h index 2bfe2e9da7..9cc9268ff3 100644 --- a/Marlin/language.h +++ b/Marlin/language.h @@ -51,8 +51,6 @@ #define MSG_COOLDOWN "Cooldown" #define MSG_EXTRUDE "Extrude" #define MSG_RETRACT "Retract" - #define MSG_PREHEAT_PLA "Preheat PLA" - #define MSG_PREHEAT_ABS "Preheat ABS" #define MSG_MOVE_AXIS "Move Axis" #define MSG_SPEED "Speed" #define MSG_NOZZLE "Nozzle" From 58e806f3fa29d94d529188d09b99678dec130dd0 Mon Sep 17 00:00:00 2001 From: Sergey Taranenko Date: Fri, 14 Dec 2012 15:39:26 +0400 Subject: [PATCH 2/4] Fix the russial translation. --- Marlin/language.h | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/Marlin/language.h b/Marlin/language.h index 9cc9268ff3..c630217bfd 100644 --- a/Marlin/language.h +++ b/Marlin/language.h @@ -812,7 +812,7 @@ #if LANGUAGE_CHOICE == 6 // LCD Menu Messages -#define WELCOME_MSG MACHINE_NAME " Готов." +#define WELCOME_MSG MACHINE_NAME " Готов" #define MSG_SD_INSERTED "Карта вставлена" #define MSG_SD_REMOVED "Карта извлечена" #define MSG_MAIN " Меню \003" @@ -861,21 +861,16 @@ #define MSG_YSTEPS " Y шаг/mm:" #define MSG_ZSTEPS " Z шаг/mm:" #define MSG_ESTEPS " E шаг/mm:" -#define MSG_MAIN_WIDE " Меню \003" -#define MSG_RECTRACT_WIDE " Откат подачи \x7E" -#define MSG_TEMPERATURE_WIDE " Температура \x7E" -#define MSG_TEMPERATURE_RTN " Температура \003" -#define MSG_MOTION_WIDE " Скорости \x7E" +#define MSG_RECTRACT " Откат подачи \x7E" +#define MSG_TEMPERATURE " Температура \x7E" +#define MSG_MOTION " Скорости \x7E" #define MSG_STORE_EPROM " Сохранить настройки" #define MSG_LOAD_EPROM " Загрузить настройки" #define MSG_RESTORE_FAILSAFE " Сброс настроек " #define MSG_REFRESH "\004Обновить " #define MSG_WATCH " Обзор \003" #define MSG_PREPARE " Действия \x7E" -#define MSG_PREPARE_ALT " Действия \003" -#define MSG_CONTROL_ARROW " Настройки \x7E" -#define MSG_RETRACT_ARROW " Настройки отката \x7E" -#define MSG_TUNE " Tune \x7E" +#define MSG_TUNE " Настройки \x7E" #define MSG_PAUSE_PRINT " Пауза печати \x7E" #define MSG_RESUME_PRINT " Продолжить печать \x7E" #define MSG_STOP_PRINT " Остановить печать \x7E" @@ -887,7 +882,6 @@ #define MSG_PART_RELEASE " Извлечение принта " #define MSG_KILLED "УБИТО. " #define MSG_STOPPED "ОСТАНОВЛЕНО. " -#define MSG_STEPPER_RELEASED "Двигатели отключены." #define MSG_CONTROL_RETRACT " Откат mm:" #define MSG_CONTROL_RETRACTF " Откат F:" #define MSG_CONTROL_RETRACT_ZLIFT " Прыжок mm:" @@ -939,7 +933,9 @@ #define MSG_Y_MAX "y_max:" #define MSG_Z_MIN "z_min:" #define MSG_Z_MAX "z_max:" - +#define MSG_M119_REPORT "Статус концевиков" +#define MSG_ENDSTOP_HIT "Срабатывание концевика" +#define MSG_ENDSTOP_OPEN "Концевик освобожден" #define MSG_SD_CANT_OPEN_SUBDIR "Не открыть папку" #define MSG_SD_INIT_FAIL "Ошибка инициализации SD" #define MSG_SD_VOL_INIT_FAIL "Ошибка инициализации раздела" @@ -955,14 +951,10 @@ #define MSG_SD_NOT_PRINTING "нет SD печати" #define MSG_SD_ERR_WRITE_TO_FILE "ошибка записи в файл" #define MSG_SD_CANT_ENTER_SUBDIR "Не зайти в папку:" - #define MSG_STEPPER_TO_HIGH "Частота шагов очень высока : " #define MSG_ENDSTOPS_HIT "концевик сработал: " #define MSG_ERR_COLD_EXTRUDE_STOP " защита холодной экструзии" #define MSG_ERR_LONG_EXTRUDE_STOP " защита превышения длинны экструзии" -#define MSG_M119_REPORT "Статус концевиков" -#define MSG_ENDSTOP_HIT "Срабатывание концевика" -#define MSG_ENDSTOP_OPEN "Концевик освобожден" #endif From 5697451c72b2cbd27bd493aadfecf1191c7eb60d Mon Sep 17 00:00:00 2001 From: Sergey Taranenko Date: Fri, 14 Dec 2012 15:39:47 +0400 Subject: [PATCH 3/4] fix lcd class --- Marlin/ultralcd_implementation_hitachi_HD44780.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/ultralcd_implementation_hitachi_HD44780.h b/Marlin/ultralcd_implementation_hitachi_HD44780.h index 95f8914f39..27e8ba3b98 100644 --- a/Marlin/ultralcd_implementation_hitachi_HD44780.h +++ b/Marlin/ultralcd_implementation_hitachi_HD44780.h @@ -25,7 +25,7 @@ #define LCD_STR_CLOCK "\x07" #define LCD_STR_ARROW_RIGHT "\x7E" /* from the default character set */ -LiquidCrystal lcd(LCD_PINS_RS, LCD_PINS_ENABLE, LCD_PINS_D4, LCD_PINS_D5,LCD_PINS_D6,LCD_PINS_D7); //RS,Enable,D4,D5,D6,D7 +LCD_CLASS lcd(LCD_PINS_RS, LCD_PINS_ENABLE, LCD_PINS_D4, LCD_PINS_D5,LCD_PINS_D6,LCD_PINS_D7); //RS,Enable,D4,D5,D6,D7 static void lcd_implementation_init() { byte bedTemp[8] = From ab09fa4bbf5c360e20dfc6c029256e2f80c60663 Mon Sep 17 00:00:00 2001 From: oni303 Date: Sun, 16 Dec 2012 01:36:57 +0100 Subject: [PATCH 4/4] fixed pwm generation at pin D12 and D13 when one of them is used as FAN_PIN on Sanguino, added soft pwm entry for FAN_PIN in temperature.cpp --- Marlin/pins.h | 3 +++ Marlin/planner.cpp | 4 ++++ Marlin/temperature.cpp | 15 +++++++++++++++ 3 files changed, 22 insertions(+) diff --git a/Marlin/pins.h b/Marlin/pins.h index 480784bc06..b90401994b 100644 --- a/Marlin/pins.h +++ b/Marlin/pins.h @@ -709,6 +709,9 @@ #define LED_PIN -1 #define FAN_PIN -1 +#if FAN_PIN == 12 || FAN_PIN ==13 +#define FAN_SOFT_PWM +#endif #ifdef MELZI #define LED_PIN 28 diff --git a/Marlin/planner.cpp b/Marlin/planner.cpp index 5881aa5932..66809a10af 100644 --- a/Marlin/planner.cpp +++ b/Marlin/planner.cpp @@ -460,10 +460,12 @@ void check_axes_activity() else { #if FAN_PIN > -1 + #ifndef FAN_SOFT_PWM if (fanSpeed != 0){ analogWrite(FAN_PIN,fanSpeed); // If buffer is empty use current fan speed } #endif + #endif } if((DISABLE_X) && (x_active == 0)) disable_x(); if((DISABLE_Y) && (y_active == 0)) disable_y(); @@ -475,6 +477,7 @@ void check_axes_activity() disable_e2(); } #if FAN_PIN > -1 + #ifndef FAN_SOFT_PWM if((fanSpeed == 0) && (fan_speed ==0)) { analogWrite(FAN_PIN, 0); @@ -484,6 +487,7 @@ void check_axes_activity() { analogWrite(FAN_PIN,tail_fan_speed); } + #endif #endif #ifdef AUTOTEMP getHighESpeed(); diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index 6187672162..8a6997ad53 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -96,6 +96,11 @@ static volatile bool temp_meas_ready = false; #endif //PIDTEMPBED static unsigned char soft_pwm[EXTRUDERS]; static unsigned char soft_pwm_bed; +#ifdef FAN_SOFT_PWM + static unsigned char soft_pwm_fan; +#endif + + #if EXTRUDERS > 3 # error Unsupported number of extruders @@ -597,6 +602,9 @@ void tp_init() #ifdef FAST_PWM_FAN setPwmFrequency(FAN_PIN, 1); // No prescaling. Pwm frequency = F_CPU/256/8 #endif + #ifdef FAN_SOFT_PWM + soft_pwm_fan=(unsigned char)fanSpeed; + #endif #endif #ifdef HEATER_0_USES_MAX6675 @@ -929,6 +937,10 @@ ISR(TIMER0_COMPB_vect) soft_pwm_b = soft_pwm_bed; if(soft_pwm_b > 0) WRITE(HEATER_BED_PIN,1); #endif + #ifdef FAN_SOFT_PWM + soft_pwm_fan =(unsigned char) fanSpeed; + if(soft_pwm_fan > 0) WRITE(FAN_PIN,1); + #endif } if(soft_pwm_0 <= pwm_count) WRITE(HEATER_0_PIN,0); #if EXTRUDERS > 1 @@ -940,6 +952,9 @@ ISR(TIMER0_COMPB_vect) #if HEATER_BED_PIN > -1 if(soft_pwm_b <= pwm_count) WRITE(HEATER_BED_PIN,0); #endif + #ifdef FAN_SOFT_PWM + if(soft_pwm_fan <= pwm_count) WRITE(FAN_PIN,0); + #endif pwm_count++; pwm_count &= 0x7f;