浏览代码

dont use blocking encoder for button press, lcd_update(false) added to setup function

PavelSindler 8 年之前
父节点
当前提交
7daf6b2efd
共有 4 个文件被更改,包括 7 次插入12 次删除
  1. 1 1
      Firmware/Configuration.h
  2. 3 5
      Firmware/Marlin_main.cpp
  3. 3 5
      Firmware/ultralcd.cpp
  4. 0 1
      Firmware/ultralcd.h

+ 1 - 1
Firmware/Configuration.h

@@ -5,7 +5,7 @@
 #include "Configuration_prusa.h"
 
 // Firmware version
-#define FW_version "3.0.10-7"
+#define FW_version "3.0.10-8"
 
 #define FW_PRUSA3D_MAGIC "PRUSA3DFW"
 #define FW_PRUSA3D_MAGIC_LEN 10

+ 3 - 5
Firmware/Marlin_main.cpp

@@ -1028,7 +1028,7 @@ void setup()
   SERIAL_ECHO(freeMemory());
   SERIAL_ECHORPGM(MSG_PLANNER_BUFFER_BYTES);
   SERIAL_ECHOLN((int)sizeof(block_t)*BLOCK_BUFFER_SIZE);
-  
+  lcd_update_enable(false);
   // loads data from EEPROM if available else uses defaults (and resets step acceleration rate)
   Config_RetrieveSettings();
   SdFatUtil::set_stack_guard(); //writes magic number at the end of static variables to protect against overwriting static memory by stack
@@ -1041,7 +1041,7 @@ void setup()
   // Reset the machine correction matrix.
   // It does not make sense to load the correction matrix until the machine is homed.
   world2machine_reset();
-
+  
   lcd_init();
   if (!READ(BTN_ENC))
   {
@@ -1166,16 +1166,14 @@ void setup()
       eeprom_update_word((uint16_t*)EEPROM_BABYSTEP_Z, 0);
       // Show the message.
       lcd_show_fullscreen_message_and_wait_P(MSG_FOLLOW_CALIBRATION_FLOW);
-      lcd_update_enable(true);
   } else if (calibration_status() == CALIBRATION_STATUS_LIVE_ADJUST) {
       // Show the message.
       lcd_show_fullscreen_message_and_wait_P(MSG_BABYSTEP_Z_NOT_SET);
-      lcd_update_enable(true);
   } else if (calibration_status() == CALIBRATION_STATUS_Z_CALIBRATION) {
       // Show the message.
       lcd_show_fullscreen_message_and_wait_P(MSG_FOLLOW_CALIBRATION_FLOW);
-      lcd_update_enable(true);
   }
+  lcd_update_enable(true);
 
   // Store the currently running firmware into an eeprom,
   // so the next time the firmware gets updated, it will know from which version it has been updated.

+ 3 - 5
Firmware/ultralcd.cpp

@@ -269,7 +269,6 @@ volatile uint8_t buttons_reprapworld_keypad; // to store the reprapworld_keypad
 volatile uint8_t slow_buttons;//Contains the bits of the currently pressed buttons.
 #endif
 uint8_t currentMenuViewOffset;              /* scroll offset in the current menu */
-uint32_t blocking_enc;
 uint8_t lastEncoderBits;
 uint32_t encoderPosition;
 uint32_t savedEncoderPosition;
@@ -4276,8 +4275,6 @@ static void lcd_selftest_screen_step(int _row, int _col, int _state, const char
 static void lcd_quick_feedback()
 {
   lcdDrawUpdate = 2;
-  blocking_enc = millis() + 500;
-
   button_pressed = false;
   lcd_implementation_quick_feedback();
 }
@@ -4329,6 +4326,7 @@ static void menu_action_setting_edit_callback_bool(const char* pstr, bool* ptr,
 #endif//ULTIPANEL
 
 /** LCD API **/
+
 void lcd_init()
 {
   lcd_implementation_init();
@@ -4657,7 +4655,7 @@ void lcd_buttons_update()
 					  //return to previously active menu and previous encoder position
 					  lcd_goto_menu(savedMenu, savedEncoderPosition);
 				  }
-				  else {					  
+				  else {
 					  newbutton |= EN_C;
 				  }
 			  }
@@ -4670,7 +4668,7 @@ void lcd_buttons_update()
   }
   else { //we are in modal mode
 	  if (READ(BTN_ENC) == 0)
-		  newbutton |= EN_C;
+		  newbutton |= EN_C; 
   }
   
 #endif  

+ 0 - 1
Firmware/ultralcd.h

@@ -230,7 +230,6 @@ void lcd_farm_sdcard_menu_w();
 void lcd_wait_for_cool_down();
 void adjust_bed_reset();
 void lcd_extr_cal_reset();
-//static void _lcd_move(const char *name, int axis, int min, int max, bool called_from_move_menu = true);
 
 union MenuData;