Hi,
I'm overhauling my indicator system in my scooter. It has two buttons for indication.
I cycle through modes by tapping both indicators at the same time. However, I need to process combination taps but ignore it if either is long pressed. Rather than keep my own state tracker, why not make isLongPressed() public?
if (eventType == AceButton::kEventPressed) {
if (left.isPressedRaw() && right.isPressedRaw()) { // If both bottons are pressed
if (!left.isLongPressed() && !right.isLongPressed()) { // Skip if either button is long pressed, taps only
Serial.println("Both");
}
}
}
Hi, I'm overhauling my indicator system in my scooter. It has two buttons for indication.
I cycle through modes by tapping both indicators at the same time. However, I need to process combination taps but ignore it if either is long pressed. Rather than keep my own state tracker, why not make
isLongPressed()
public?