Browse Source

Merge pull request #5972 from thinkyhead/rc_cooldown_before

Fix preheat menu formatting
pull/1/head
Scott Lahteine 8 years ago
committed by GitHub
parent
commit
a9a1971295
  1. 9
      Marlin/language_en.h
  2. 2
      Marlin/stepper.cpp
  3. 28
      Marlin/temperature.cpp
  4. 24
      Marlin/ultralcd.cpp

9
Marlin/language_en.h

@ -105,6 +105,9 @@
#ifndef MSG_PREHEAT_1_ALL #ifndef MSG_PREHEAT_1_ALL
#define MSG_PREHEAT_1_ALL MSG_PREHEAT_1 _UxGT(" All") #define MSG_PREHEAT_1_ALL MSG_PREHEAT_1 _UxGT(" All")
#endif #endif
#ifndef MSG_PREHEAT_1_END
#define MSG_PREHEAT_1_END MSG_PREHEAT_1 _UxGT(" End")
#endif
#ifndef MSG_PREHEAT_1_BEDONLY #ifndef MSG_PREHEAT_1_BEDONLY
#define MSG_PREHEAT_1_BEDONLY MSG_PREHEAT_1 _UxGT(" Bed") #define MSG_PREHEAT_1_BEDONLY MSG_PREHEAT_1 _UxGT(" Bed")
#endif #endif
@ -120,6 +123,9 @@
#ifndef MSG_PREHEAT_2_ALL #ifndef MSG_PREHEAT_2_ALL
#define MSG_PREHEAT_2_ALL MSG_PREHEAT_2 _UxGT(" All") #define MSG_PREHEAT_2_ALL MSG_PREHEAT_2 _UxGT(" All")
#endif #endif
#ifndef MSG_PREHEAT_2_END
#define MSG_PREHEAT_2_END MSG_PREHEAT_2 _UxGT(" End")
#endif
#ifndef MSG_PREHEAT_2_BEDONLY #ifndef MSG_PREHEAT_2_BEDONLY
#define MSG_PREHEAT_2_BEDONLY MSG_PREHEAT_2 _UxGT(" Bed") #define MSG_PREHEAT_2_BEDONLY MSG_PREHEAT_2 _UxGT(" Bed")
#endif #endif
@ -129,9 +135,6 @@
#ifndef MSG_COOLDOWN #ifndef MSG_COOLDOWN
#define MSG_COOLDOWN _UxGT("Cooldown") #define MSG_COOLDOWN _UxGT("Cooldown")
#endif #endif
#ifndef MSG_HOTEND
#define MSG_HOTEND _UxGT("Hotend")
#endif
#ifndef MSG_SWITCH_PS_ON #ifndef MSG_SWITCH_PS_ON
#define MSG_SWITCH_PS_ON _UxGT("Switch power on") #define MSG_SWITCH_PS_ON _UxGT("Switch power on")
#endif #endif

2
Marlin/stepper.cpp

@ -451,7 +451,7 @@ void Stepper::isr() {
#if ENABLED(ENDSTOP_INTERRUPTS_FEATURE) #if ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
if (ENDSTOPS_ENABLED && e_hit) { if (e_hit && ENDSTOPS_ENABLED) {
endstops.update(); endstops.update();
e_hit--; e_hit--;
} }

28
Marlin/temperature.cpp

@ -1477,9 +1477,11 @@ void Temperature::set_current_temp_raw() {
* in OCR0B above (128 or halfway between OVFs). * in OCR0B above (128 or halfway between OVFs).
* *
* - Manage PWM to all the heaters and fan * - Manage PWM to all the heaters and fan
* - Update the raw temperature values * - Prepare or Measure one of the raw ADC sensor values
* - Check new temperature values for MIN/MAX errors * - Check new temperature values for MIN/MAX errors (kill on error)
* - Step the babysteps value for each axis towards 0 * - Step the babysteps value for each axis towards 0
* - For PINS_DEBUGGING, monitor and report endstop pins
* - For ENDSTOP_INTERRUPTS_FEATURE check endstops if flagged
*/ */
ISR(TIMER0_COMPB_vect) { Temperature::isr(); } ISR(TIMER0_COMPB_vect) { Temperature::isr(); }
@ -1535,37 +1537,37 @@ void Temperature::isr() {
*/ */
if (pwm_count == 0) { if (pwm_count == 0) {
soft_pwm_0 = soft_pwm[0]; soft_pwm_0 = soft_pwm[0];
WRITE_HEATER_0(soft_pwm_0 > 0 ? 1 : 0); WRITE_HEATER_0(soft_pwm_0 > 0 ? HIGH : LOW);
#if HOTENDS > 1 #if HOTENDS > 1
soft_pwm_1 = soft_pwm[1]; soft_pwm_1 = soft_pwm[1];
WRITE_HEATER_1(soft_pwm_1 > 0 ? 1 : 0); WRITE_HEATER_1(soft_pwm_1 > 0 ? HIGH : LOW);
#if HOTENDS > 2 #if HOTENDS > 2
soft_pwm_2 = soft_pwm[2]; soft_pwm_2 = soft_pwm[2];
WRITE_HEATER_2(soft_pwm_2 > 0 ? 1 : 0); WRITE_HEATER_2(soft_pwm_2 > 0 ? HIGH : LOW);
#if HOTENDS > 3 #if HOTENDS > 3
soft_pwm_3 = soft_pwm[3]; soft_pwm_3 = soft_pwm[3];
WRITE_HEATER_3(soft_pwm_3 > 0 ? 1 : 0); WRITE_HEATER_3(soft_pwm_3 > 0 ? HIGH : LOW);
#endif #endif
#endif #endif
#endif #endif
#if HAS_HEATER_BED #if HAS_HEATER_BED
soft_pwm_BED = soft_pwm_bed; soft_pwm_BED = soft_pwm_bed;
WRITE_HEATER_BED(soft_pwm_BED > 0 ? 1 : 0); WRITE_HEATER_BED(soft_pwm_BED > 0 ? HIGH : LOW);
#endif #endif
#if ENABLED(FAN_SOFT_PWM) #if ENABLED(FAN_SOFT_PWM)
#if HAS_FAN0 #if HAS_FAN0
soft_pwm_fan[0] = fanSpeedSoftPwm[0] >> 1; soft_pwm_fan[0] = fanSpeedSoftPwm[0] >> 1;
WRITE_FAN(soft_pwm_fan[0] > 0 ? 1 : 0); WRITE_FAN(soft_pwm_fan[0] > 0 ? HIGH : LOW);
#endif #endif
#if HAS_FAN1 #if HAS_FAN1
soft_pwm_fan[1] = fanSpeedSoftPwm[1] >> 1; soft_pwm_fan[1] = fanSpeedSoftPwm[1] >> 1;
WRITE_FAN1(soft_pwm_fan[1] > 0 ? 1 : 0); WRITE_FAN1(soft_pwm_fan[1] > 0 ? HIGH : LOW);
#endif #endif
#if HAS_FAN2 #if HAS_FAN2
soft_pwm_fan[2] = fanSpeedSoftPwm[2] >> 1; soft_pwm_fan[2] = fanSpeedSoftPwm[2] >> 1;
WRITE_FAN2(soft_pwm_fan[2] > 0 ? 1 : 0); WRITE_FAN2(soft_pwm_fan[2] > 0 ? HIGH : LOW);
#endif #endif
#endif #endif
} }
@ -1683,15 +1685,15 @@ void Temperature::isr() {
if (pwm_count == 0) { if (pwm_count == 0) {
#if HAS_FAN0 #if HAS_FAN0
soft_pwm_fan[0] = fanSpeedSoftPwm[0] >> 1; soft_pwm_fan[0] = fanSpeedSoftPwm[0] >> 1;
WRITE_FAN(soft_pwm_fan[0] > 0 ? 1 : 0); WRITE_FAN(soft_pwm_fan[0] > 0 ? HIGH : LOW);
#endif #endif
#if HAS_FAN1 #if HAS_FAN1
soft_pwm_fan[1] = fanSpeedSoftPwm[1] >> 1; soft_pwm_fan[1] = fanSpeedSoftPwm[1] >> 1;
WRITE_FAN1(soft_pwm_fan[1] > 0 ? 1 : 0); WRITE_FAN1(soft_pwm_fan[1] > 0 ? HIGH : LOW);
#endif #endif
#if HAS_FAN2 #if HAS_FAN2
soft_pwm_fan[2] = fanSpeedSoftPwm[2] >> 1; soft_pwm_fan[2] = fanSpeedSoftPwm[2] >> 1;
WRITE_FAN2(soft_pwm_fan[2] > 0 ? 1 : 0); WRITE_FAN2(soft_pwm_fan[2] > 0 ? HIGH : LOW);
#endif #endif
} }
#if HAS_FAN0 #if HAS_FAN0

24
Marlin/ultralcd.cpp

@ -763,6 +763,7 @@ void kill_screen(const char* lcd_msg) {
* *
*/ */
#if DISABLED(NO_WORKSPACE_OFFSETS)
/** /**
* Set the home offset based on the current_position * Set the home offset based on the current_position
*/ */
@ -771,6 +772,7 @@ void kill_screen(const char* lcd_msg) {
enqueue_and_echo_commands_P(PSTR("M428")); enqueue_and_echo_commands_P(PSTR("M428"));
lcd_return_to_status(); lcd_return_to_status();
} }
#endif
#if ENABLED(BABYSTEPPING) #if ENABLED(BABYSTEPPING)
@ -1106,16 +1108,16 @@ void kill_screen(const char* lcd_msg) {
#if HOTENDS == 1 #if HOTENDS == 1
#if TEMP_SENSOR_BED != 0 #if TEMP_SENSOR_BED != 0
MENU_ITEM(function, MSG_PREHEAT_1, lcd_preheat_m1_e0); MENU_ITEM(function, MSG_PREHEAT_1, lcd_preheat_m1_e0);
MENU_ITEM(function, MSG_PREHEAT_1 MSG_HOTEND, lcd_preheat_m1_e0_only); MENU_ITEM(function, MSG_PREHEAT_1_END, lcd_preheat_m1_e0_only);
#else #else
MENU_ITEM(function, MSG_PREHEAT_1, lcd_preheat_m1_e0_only); MENU_ITEM(function, MSG_PREHEAT_1, lcd_preheat_m1_e0_only);
#endif #endif
#else #else
#if TEMP_SENSOR_BED != 0 #if TEMP_SENSOR_BED != 0
MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H1, lcd_preheat_m1_e0); MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H1, lcd_preheat_m1_e0);
MENU_ITEM(function, MSG_PREHEAT_1_N MSG_HOTEND " " MSG_E1, lcd_preheat_m1_e0_only); MENU_ITEM(function, MSG_PREHEAT_1_END " " MSG_E1, lcd_preheat_m1_e0_only);
MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H2, lcd_preheat_m1_e1); MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H2, lcd_preheat_m1_e1);
MENU_ITEM(function, MSG_PREHEAT_1_N MSG_HOTEND " " MSG_E2, lcd_preheat_m1_e1_only); MENU_ITEM(function, MSG_PREHEAT_1_END " " MSG_E2, lcd_preheat_m1_e1_only);
#else #else
MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H1, lcd_preheat_m1_e0_only); MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H1, lcd_preheat_m1_e0_only);
MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H2, lcd_preheat_m1_e1_only); MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H2, lcd_preheat_m1_e1_only);
@ -1124,14 +1126,14 @@ void kill_screen(const char* lcd_msg) {
MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H3, lcd_preheat_m1_e2_only); MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H3, lcd_preheat_m1_e2_only);
#if TEMP_SENSOR_BED != 0 #if TEMP_SENSOR_BED != 0
MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H3, lcd_preheat_m1_e2); MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H3, lcd_preheat_m1_e2);
MENU_ITEM(function, MSG_PREHEAT_1_N MSG_HOTEND " " MSG_E3, lcd_preheat_m1_e2_only); MENU_ITEM(function, MSG_PREHEAT_1_END " " MSG_E3, lcd_preheat_m1_e2_only);
#else #else
MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H3, lcd_preheat_m1_e2_only); MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H3, lcd_preheat_m1_e2_only);
#endif #endif
#if HOTENDS > 3 #if HOTENDS > 3
#if TEMP_SENSOR_BED != 0 #if TEMP_SENSOR_BED != 0
MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H4, lcd_preheat_m1_e3); MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H4, lcd_preheat_m1_e3);
MENU_ITEM(function, MSG_PREHEAT_1_N MSG_HOTEND " " MSG_E4, lcd_preheat_m1_e3_only); MENU_ITEM(function, MSG_PREHEAT_1_END " " MSG_E4, lcd_preheat_m1_e3_only);
#else #else
MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H4, lcd_preheat_m1_e3_only); MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H4, lcd_preheat_m1_e3_only);
#endif #endif
@ -1151,16 +1153,16 @@ void kill_screen(const char* lcd_msg) {
#if HOTENDS == 1 #if HOTENDS == 1
#if TEMP_SENSOR_BED != 0 #if TEMP_SENSOR_BED != 0
MENU_ITEM(function, MSG_PREHEAT_2, lcd_preheat_m2_e0); MENU_ITEM(function, MSG_PREHEAT_2, lcd_preheat_m2_e0);
MENU_ITEM(function, MSG_PREHEAT_2 MSG_HOTEND, lcd_preheat_m2_e0_only); MENU_ITEM(function, MSG_PREHEAT_2_END, lcd_preheat_m2_e0_only);
#else #else
MENU_ITEM(function, MSG_PREHEAT_2, lcd_preheat_m2_e0_only); MENU_ITEM(function, MSG_PREHEAT_2, lcd_preheat_m2_e0_only);
#endif #endif
#else #else
#if TEMP_SENSOR_BED != 0 #if TEMP_SENSOR_BED != 0
MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H1, lcd_preheat_m2_e0); MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H1, lcd_preheat_m2_e0);
MENU_ITEM(function, MSG_PREHEAT_2_N MSG_HOTEND " " MSG_E1, lcd_preheat_m2_e0_only); MENU_ITEM(function, MSG_PREHEAT_2_END " " MSG_E1, lcd_preheat_m2_e0_only);
MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H2, lcd_preheat_m2_e1); MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H2, lcd_preheat_m2_e1);
MENU_ITEM(function, MSG_PREHEAT_2_N MSG_HOTEND " " MSG_E2, lcd_preheat_m2_e1_only); MENU_ITEM(function, MSG_PREHEAT_2_END " " MSG_E2, lcd_preheat_m2_e1_only);
#else #else
MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H1, lcd_preheat_m2_e0_only); MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H1, lcd_preheat_m2_e0_only);
MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H2, lcd_preheat_m2_e1_only); MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H2, lcd_preheat_m2_e1_only);
@ -1169,14 +1171,14 @@ void kill_screen(const char* lcd_msg) {
MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H3, lcd_preheat_m2_e2_only); MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H3, lcd_preheat_m2_e2_only);
#if TEMP_SENSOR_BED != 0 #if TEMP_SENSOR_BED != 0
MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H3, lcd_preheat_m2_e2); MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H3, lcd_preheat_m2_e2);
MENU_ITEM(function, MSG_PREHEAT_2_N MSG_HOTEND " " MSG_E3, lcd_preheat_m2_e2_only); MENU_ITEM(function, MSG_PREHEAT_2_END " " MSG_E3, lcd_preheat_m2_e2_only);
#else #else
MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H3, lcd_preheat_m2_e2_only); MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H3, lcd_preheat_m2_e2_only);
#endif #endif
#if HOTENDS > 3 #if HOTENDS > 3
#if TEMP_SENSOR_BED != 0 #if TEMP_SENSOR_BED != 0
MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H4, lcd_preheat_m2_e3); MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H4, lcd_preheat_m2_e3);
MENU_ITEM(function, MSG_PREHEAT_2_N MSG_HOTEND " " MSG_E4, lcd_preheat_m2_e3_only); MENU_ITEM(function, MSG_PREHEAT_2_END " " MSG_E4, lcd_preheat_m2_e3_only);
#else #else
MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H4, lcd_preheat_m2_e3_only); MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H4, lcd_preheat_m2_e3_only);
#endif #endif
@ -1427,11 +1429,13 @@ KeepDrawing:
MENU_ITEM(submenu, MSG_LEVEL_BED, lcd_level_bed); MENU_ITEM(submenu, MSG_LEVEL_BED, lcd_level_bed);
#endif #endif
#if DISABLED(NO_WORKSPACE_OFFSETS)
// //
// Set Home Offsets // Set Home Offsets
// //
MENU_ITEM(function, MSG_SET_HOME_OFFSETS, lcd_set_home_offsets); MENU_ITEM(function, MSG_SET_HOME_OFFSETS, lcd_set_home_offsets);
//MENU_ITEM(gcode, MSG_SET_ORIGIN, PSTR("G92 X0 Y0 Z0")); //MENU_ITEM(gcode, MSG_SET_ORIGIN, PSTR("G92 X0 Y0 Z0"));
#endif
// //
// Disable Steppers // Disable Steppers

Loading…
Cancel
Save