Unify buzz methods as MarlinUI::buzz (#14803)
This commit is contained in:
@ -360,6 +360,33 @@ void MarlinUI::init_lcd() {
|
||||
lcd.clear();
|
||||
}
|
||||
|
||||
bool MarlinUI::detected() {
|
||||
return true
|
||||
#if EITHER(LCD_I2C_TYPE_MCP23017, LCD_I2C_TYPE_MCP23008) && defined(DETECT_DEVICE)
|
||||
&& lcd.LcdDetected() == 1
|
||||
#endif
|
||||
;
|
||||
}
|
||||
|
||||
#if HAS_SLOW_BUTTONS
|
||||
uint8_t MarlinUI::read_slow_buttons() {
|
||||
#if ENABLED(LCD_I2C_TYPE_MCP23017)
|
||||
// Reading these buttons this is likely to be too slow to call inside interrupt context
|
||||
// so they are called during normal lcd_update
|
||||
uint8_t slow_bits = lcd.readButtons()
|
||||
#if !BUTTON_EXISTS(ENC)
|
||||
<< B_I2C_BTN_OFFSET
|
||||
#endif
|
||||
;
|
||||
#if ENABLED(LCD_I2C_VIKI)
|
||||
if ((slow_bits & (B_MI | B_RI)) && PENDING(millis(), next_button_update_ms)) // LCD clicked
|
||||
slow_bits &= ~(B_MI | B_RI); // Disable LCD clicked buttons if screen is updated
|
||||
#endif // LCD_I2C_VIKI
|
||||
return slow_bits;
|
||||
#endif // LCD_I2C_TYPE_MCP23017
|
||||
}
|
||||
#endif
|
||||
|
||||
void MarlinUI::clear_lcd() { lcd.clear(); }
|
||||
|
||||
#if ENABLED(SHOW_BOOTSCREEN)
|
||||
@ -1063,7 +1090,7 @@ void MarlinUI::draw_status_screen() {
|
||||
|
||||
#if ENABLED(LCD_HAS_STATUS_INDICATORS)
|
||||
|
||||
static void MarlinUI::update_indicators() {
|
||||
void MarlinUI::update_indicators() {
|
||||
// Set the LEDS - referred to as backlights by the LiquidTWI2 library
|
||||
static uint8_t ledsprev = 0;
|
||||
uint8_t leds = 0;
|
||||
|
Reference in New Issue
Block a user