code formatting
This commit is contained in:
parent
2dfd0e5ce7
commit
eab5fad539
@ -579,8 +579,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
|
|||||||
//#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
|
//#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
|
||||||
//#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
|
//#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
|
||||||
//#define ULTIPANEL //the UltiPanel as on Thingiverse
|
//#define ULTIPANEL //the UltiPanel as on Thingiverse
|
||||||
#define LCD_FEEDBACK_FREQUENCY_HZ 1000 // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
|
//#define LCD_FEEDBACK_FREQUENCY_HZ 1000 // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
|
||||||
#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
|
//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
|
||||||
// 0 to disable buzzer feedback
|
// 0 to disable buzzer feedback
|
||||||
|
|
||||||
// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
|
// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
|
||||||
|
@ -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
|
||||||
lcd_buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ);
|
#define LCD_FEEDBACK_FREQUENCY_HZ 100
|
||||||
#else
|
#endif
|
||||||
lcd_buzz(1000/6, 100);
|
#ifndef LCD_FEEDBACK_FREQUENCY_DURATION_MS
|
||||||
#endif
|
#define LCD_FEEDBACK_FREQUENCY_DURATION_MS (1000/6)
|
||||||
#elif defined(BEEPER) && BEEPER > -1
|
#endif
|
||||||
SET_OUTPUT(BEEPER);
|
lcd_buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ);
|
||||||
#if !defined(LCD_FEEDBACK_FREQUENCY_HZ) || !defined(LCD_FEEDBACK_FREQUENCY_DURATION_MS)
|
#elif defined(BEEPER) && BEEPER > -1
|
||||||
#define LCD_FEEDBACK_FREQUENCY_HZ 500
|
SET_OUTPUT(BEEPER);
|
||||||
#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 50
|
#ifndef LCD_FEEDBACK_FREQUENCY_HZ
|
||||||
#endif
|
#define LCD_FEEDBACK_FREQUENCY_HZ 500
|
||||||
const unsigned int delay = 1000000 / LCD_FEEDBACK_FREQUENCY_HZ / 2;
|
#endif
|
||||||
int8_t i = LCD_FEEDBACK_FREQUENCY_DURATION_MS * LCD_FEEDBACK_FREQUENCY_HZ / 1000;
|
#ifndef LCD_FEEDBACK_FREQUENCY_DURATION_MS
|
||||||
while (i--) {
|
#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 50
|
||||||
WRITE(BEEPER,HIGH);
|
#endif
|
||||||
delayMicroseconds(delay);
|
const unsigned int delay = 1000000 / LCD_FEEDBACK_FREQUENCY_HZ / 2;
|
||||||
WRITE(BEEPER,LOW);
|
int i = LCD_FEEDBACK_FREQUENCY_DURATION_MS * LCD_FEEDBACK_FREQUENCY_HZ / 1000;
|
||||||
delayMicroseconds(delay);
|
while (i--) {
|
||||||
}
|
WRITE(BEEPER,HIGH);
|
||||||
#endif
|
delayMicroseconds(delay);
|
||||||
|
WRITE(BEEPER,LOW);
|
||||||
|
delayMicroseconds(delay);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Menu action functions **/
|
/** Menu action functions **/
|
||||||
|
Loading…
Reference in New Issue
Block a user