|
@ -1138,27 +1138,31 @@ static void lcd_quick_feedback() { |
|
|
lcdDrawUpdate = 2; |
|
|
lcdDrawUpdate = 2; |
|
|
blocking_enc = millis() + 500; |
|
|
blocking_enc = millis() + 500; |
|
|
|
|
|
|
|
|
#ifdef LCD_USE_I2C_BUZZER |
|
|
#ifdef LCD_USE_I2C_BUZZER |
|
|
#if defined(LCD_FEEDBACK_FREQUENCY_DURATION_MS) && defined(LCD_FEEDBACK_FREQUENCY_HZ) |
|
|
#ifndef LCD_FEEDBACK_FREQUENCY_HZ |
|
|
|
|
|
#define LCD_FEEDBACK_FREQUENCY_HZ 100 |
|
|
|
|
|
#endif |
|
|
|
|
|
#ifndef LCD_FEEDBACK_FREQUENCY_DURATION_MS |
|
|
|
|
|
#define LCD_FEEDBACK_FREQUENCY_DURATION_MS (1000/6) |
|
|
|
|
|
#endif |
|
|
lcd_buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ); |
|
|
lcd_buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ); |
|
|
#else |
|
|
#elif defined(BEEPER) && BEEPER > -1 |
|
|
lcd_buzz(1000/6, 100); |
|
|
|
|
|
#endif |
|
|
|
|
|
#elif defined(BEEPER) && BEEPER > -1 |
|
|
|
|
|
SET_OUTPUT(BEEPER); |
|
|
SET_OUTPUT(BEEPER); |
|
|
#if !defined(LCD_FEEDBACK_FREQUENCY_HZ) || !defined(LCD_FEEDBACK_FREQUENCY_DURATION_MS) |
|
|
#ifndef LCD_FEEDBACK_FREQUENCY_HZ |
|
|
#define LCD_FEEDBACK_FREQUENCY_HZ 500 |
|
|
#define LCD_FEEDBACK_FREQUENCY_HZ 500 |
|
|
#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 50 |
|
|
#endif |
|
|
#endif |
|
|
#ifndef LCD_FEEDBACK_FREQUENCY_DURATION_MS |
|
|
|
|
|
#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 50 |
|
|
|
|
|
#endif |
|
|
const unsigned int delay = 1000000 / LCD_FEEDBACK_FREQUENCY_HZ / 2; |
|
|
const unsigned int delay = 1000000 / LCD_FEEDBACK_FREQUENCY_HZ / 2; |
|
|
int8_t i = LCD_FEEDBACK_FREQUENCY_DURATION_MS * LCD_FEEDBACK_FREQUENCY_HZ / 1000; |
|
|
int i = LCD_FEEDBACK_FREQUENCY_DURATION_MS * LCD_FEEDBACK_FREQUENCY_HZ / 1000; |
|
|
while (i--) { |
|
|
while (i--) { |
|
|
WRITE(BEEPER,HIGH); |
|
|
WRITE(BEEPER,HIGH); |
|
|
delayMicroseconds(delay); |
|
|
delayMicroseconds(delay); |
|
|
WRITE(BEEPER,LOW); |
|
|
WRITE(BEEPER,LOW); |
|
|
delayMicroseconds(delay); |
|
|
delayMicroseconds(delay); |
|
|
} |
|
|
} |
|
|
#endif |
|
|
#endif |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** Menu action functions **/ |
|
|
/** Menu action functions **/ |
|
|