Kaynağa Gözat

move engaged from lcd console refreshes power off timeout

Josef Pavlik 11 yıl önce
ebeveyn
işleme
477b6fa1df
3 değiştirilmiş dosya ile 9 ekleme ve 0 silme
  1. 2
    0
      Marlin/Marlin.h
  2. 4
    0
      Marlin/Marlin_main.cpp
  3. 3
    0
      Marlin/ultralcd.cpp

+ 2
- 0
Marlin/Marlin.h Dosyayı Görüntüle

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

+ 4
- 0
Marlin/Marlin_main.cpp Dosyayı Görüntüle

@@ -1046,6 +1046,10 @@ static void homeaxis(int axis) {
1046 1046
   }
1047 1047
 }
1048 1048
 #define HOMEAXIS(LETTER) homeaxis(LETTER##_AXIS)
1049
++void refresh_cmd_timeout(void)
1050
+{
1051
+  previous_millis_cmd = millis();
1052
+}
1049 1053
 
1050 1054
 void process_commands()
1051 1055
 {

+ 3
- 0
Marlin/ultralcd.cpp Dosyayı Görüntüle

@@ -460,6 +460,7 @@ static void lcd_move_x()
460 460
 {
461 461
     if (encoderPosition != 0)
462 462
     {
463
+        refresh_cmd_timeout();
463 464
         current_position[X_AXIS] += float((int)encoderPosition) * move_menu_scale;
464 465
         if (min_software_endstops && current_position[X_AXIS] < X_MIN_POS)
465 466
             current_position[X_AXIS] = X_MIN_POS;
@@ -489,6 +490,7 @@ static void lcd_move_y()
489 490
 {
490 491
     if (encoderPosition != 0)
491 492
     {
493
+        refresh_cmd_timeout();
492 494
         current_position[Y_AXIS] += float((int)encoderPosition) * move_menu_scale;
493 495
         if (min_software_endstops && current_position[Y_AXIS] < Y_MIN_POS)
494 496
             current_position[Y_AXIS] = Y_MIN_POS;
@@ -518,6 +520,7 @@ static void lcd_move_z()
518 520
 {
519 521
     if (encoderPosition != 0)
520 522
     {
523
+        refresh_cmd_timeout();
521 524
         current_position[Z_AXIS] += float((int)encoderPosition) * move_menu_scale;
522 525
         if (min_software_endstops && current_position[Z_AXIS] < Z_MIN_POS)
523 526
             current_position[Z_AXIS] = Z_MIN_POS;

Loading…
İptal
Kaydet