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

This commit is contained in:
PavelSindler 2017-03-23 14:38:18 +01:00
parent 65a2700b97
commit 7daf6b2efd
4 changed files with 7 additions and 12 deletions

View File

@ -5,7 +5,7 @@
#include "Configuration_prusa.h" #include "Configuration_prusa.h"
// Firmware version // 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 "PRUSA3DFW"
#define FW_PRUSA3D_MAGIC_LEN 10 #define FW_PRUSA3D_MAGIC_LEN 10

View File

@ -1028,7 +1028,7 @@ void setup()
SERIAL_ECHO(freeMemory()); SERIAL_ECHO(freeMemory());
SERIAL_ECHORPGM(MSG_PLANNER_BUFFER_BYTES); SERIAL_ECHORPGM(MSG_PLANNER_BUFFER_BYTES);
SERIAL_ECHOLN((int)sizeof(block_t)*BLOCK_BUFFER_SIZE); 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) // loads data from EEPROM if available else uses defaults (and resets step acceleration rate)
Config_RetrieveSettings(); Config_RetrieveSettings();
SdFatUtil::set_stack_guard(); //writes magic number at the end of static variables to protect against overwriting static memory by stack SdFatUtil::set_stack_guard(); //writes magic number at the end of static variables to protect against overwriting static memory by stack
@ -1166,16 +1166,14 @@ void setup()
eeprom_update_word((uint16_t*)EEPROM_BABYSTEP_Z, 0); eeprom_update_word((uint16_t*)EEPROM_BABYSTEP_Z, 0);
// Show the message. // Show the message.
lcd_show_fullscreen_message_and_wait_P(MSG_FOLLOW_CALIBRATION_FLOW); lcd_show_fullscreen_message_and_wait_P(MSG_FOLLOW_CALIBRATION_FLOW);
lcd_update_enable(true);
} else if (calibration_status() == CALIBRATION_STATUS_LIVE_ADJUST) { } else if (calibration_status() == CALIBRATION_STATUS_LIVE_ADJUST) {
// Show the message. // Show the message.
lcd_show_fullscreen_message_and_wait_P(MSG_BABYSTEP_Z_NOT_SET); lcd_show_fullscreen_message_and_wait_P(MSG_BABYSTEP_Z_NOT_SET);
lcd_update_enable(true);
} else if (calibration_status() == CALIBRATION_STATUS_Z_CALIBRATION) { } else if (calibration_status() == CALIBRATION_STATUS_Z_CALIBRATION) {
// Show the message. // Show the message.
lcd_show_fullscreen_message_and_wait_P(MSG_FOLLOW_CALIBRATION_FLOW); 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, // 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. // so the next time the firmware gets updated, it will know from which version it has been updated.

View File

@ -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. volatile uint8_t slow_buttons;//Contains the bits of the currently pressed buttons.
#endif #endif
uint8_t currentMenuViewOffset; /* scroll offset in the current menu */ uint8_t currentMenuViewOffset; /* scroll offset in the current menu */
uint32_t blocking_enc;
uint8_t lastEncoderBits; uint8_t lastEncoderBits;
uint32_t encoderPosition; uint32_t encoderPosition;
uint32_t savedEncoderPosition; 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() static void lcd_quick_feedback()
{ {
lcdDrawUpdate = 2; lcdDrawUpdate = 2;
blocking_enc = millis() + 500;
button_pressed = false; button_pressed = false;
lcd_implementation_quick_feedback(); lcd_implementation_quick_feedback();
} }
@ -4329,6 +4326,7 @@ static void menu_action_setting_edit_callback_bool(const char* pstr, bool* ptr,
#endif//ULTIPANEL #endif//ULTIPANEL
/** LCD API **/ /** LCD API **/
void lcd_init() void lcd_init()
{ {
lcd_implementation_init(); lcd_implementation_init();

View File

@ -230,7 +230,6 @@ void lcd_farm_sdcard_menu_w();
void lcd_wait_for_cool_down(); void lcd_wait_for_cool_down();
void adjust_bed_reset(); void adjust_bed_reset();
void lcd_extr_cal_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; union MenuData;