Improve Zonestar keypad responsiveness (#14056)

This commit is contained in:
Pavel4e5
2019-05-19 06:52:55 +05:00
committed by Scott Lahteine
parent 402f1f7307
commit 3cd19a8ec0
2 changed files with 14 additions and 10 deletions

View File

@ -996,8 +996,8 @@ void MarlinUI::update() {
uint8_t get_ADC_keyValue(void) {
if (thermalManager.ADCKey_count >= 16) {
const uint16_t currentkpADCValue = thermalManager.current_ADCKey_raw >> 2;
thermalManager.current_ADCKey_raw = 0;
const uint16_t currentkpADCValue = thermalManager.current_ADCKey_raw << 2;
thermalManager.current_ADCKey_raw = 1024;
thermalManager.ADCKey_count = 0;
if (currentkpADCValue < 4000)
for (uint8_t i = 0; i < ADC_KEY_NUM; i++) {