Browse Source

move engaged from lcd console refreshes power off timeout

pull/1/head
Josef Pavlik 11 years ago
parent
commit
477b6fa1df
  1. 2
      Marlin/Marlin.h
  2. 4
      Marlin/Marlin_main.cpp
  3. 3
      Marlin/ultralcd.cpp

2
Marlin/Marlin.h

@ -189,6 +189,8 @@ void enquecommand_P(const char *cmd); //put an ascii command at the end of the c
void prepare_arc_move(char isclockwise); void prepare_arc_move(char isclockwise);
void clamp_to_software_endstops(float target[3]); void clamp_to_software_endstops(float target[3]);
void refresh_cmd_timeout(void);
#ifdef FAST_PWM_FAN #ifdef FAST_PWM_FAN
void setPwmFrequency(uint8_t pin, int val); void setPwmFrequency(uint8_t pin, int val);
#endif #endif

4
Marlin/Marlin_main.cpp

@ -1046,6 +1046,10 @@ static void homeaxis(int axis) {
} }
} }
#define HOMEAXIS(LETTER) homeaxis(LETTER##_AXIS) #define HOMEAXIS(LETTER) homeaxis(LETTER##_AXIS)
+void refresh_cmd_timeout(void)
{
previous_millis_cmd = millis();
}
void process_commands() void process_commands()
{ {

3
Marlin/ultralcd.cpp

@ -460,6 +460,7 @@ static void lcd_move_x()
{ {
if (encoderPosition != 0) if (encoderPosition != 0)
{ {
refresh_cmd_timeout();
current_position[X_AXIS] += float((int)encoderPosition) * move_menu_scale; current_position[X_AXIS] += float((int)encoderPosition) * move_menu_scale;
if (min_software_endstops && current_position[X_AXIS] < X_MIN_POS) if (min_software_endstops && current_position[X_AXIS] < X_MIN_POS)
current_position[X_AXIS] = X_MIN_POS; current_position[X_AXIS] = X_MIN_POS;
@ -489,6 +490,7 @@ static void lcd_move_y()
{ {
if (encoderPosition != 0) if (encoderPosition != 0)
{ {
refresh_cmd_timeout();
current_position[Y_AXIS] += float((int)encoderPosition) * move_menu_scale; current_position[Y_AXIS] += float((int)encoderPosition) * move_menu_scale;
if (min_software_endstops && current_position[Y_AXIS] < Y_MIN_POS) if (min_software_endstops && current_position[Y_AXIS] < Y_MIN_POS)
current_position[Y_AXIS] = Y_MIN_POS; current_position[Y_AXIS] = Y_MIN_POS;
@ -518,6 +520,7 @@ static void lcd_move_z()
{ {
if (encoderPosition != 0) if (encoderPosition != 0)
{ {
refresh_cmd_timeout();
current_position[Z_AXIS] += float((int)encoderPosition) * move_menu_scale; current_position[Z_AXIS] += float((int)encoderPosition) * move_menu_scale;
if (min_software_endstops && current_position[Z_AXIS] < Z_MIN_POS) if (min_software_endstops && current_position[Z_AXIS] < Z_MIN_POS)
current_position[Z_AXIS] = Z_MIN_POS; current_position[Z_AXIS] = Z_MIN_POS;

Loading…
Cancel
Save