Fixed button hold handling
This commit is contained in:
@ -110,6 +110,7 @@ void buttonReleasedCommon(espgui::Button button)
|
||||
|
||||
void BobbyButtons::rawButtonPressed(uint8_t button)
|
||||
{
|
||||
ESP_LOGI(TAG, "%hhu", button);
|
||||
//Base::rawButtonPressed(button);
|
||||
if (const auto translated = translateRawButton(button))
|
||||
buttonPressed(*translated);
|
||||
@ -117,6 +118,7 @@ void BobbyButtons::rawButtonPressed(uint8_t button)
|
||||
|
||||
void BobbyButtons::rawButtonReleased(uint8_t button)
|
||||
{
|
||||
ESP_LOGI(TAG, "%hhu", button);
|
||||
//Base::rawButtonReleased(button);
|
||||
if (const auto translated = translateRawButton(button))
|
||||
buttonReleased(*translated);
|
||||
|
@ -48,5 +48,6 @@ void BobbyChangeValueDisplay<Tvalue>::buttonPressed(espgui::Button button)
|
||||
template<typename Tvalue>
|
||||
void BobbyChangeValueDisplay<Tvalue>::buttonReleased(espgui::Button button)
|
||||
{
|
||||
//Base::buttonReleased(button);
|
||||
Base::buttonReleased(button);
|
||||
buttonReleasedCommon(button);
|
||||
}
|
||||
|
@ -26,4 +26,5 @@ void BobbyDisplayWithTitle::buttonPressed(espgui::Button button)
|
||||
void BobbyDisplayWithTitle::buttonReleased(espgui::Button button)
|
||||
{
|
||||
//Base::buttonReleased(button);
|
||||
buttonReleasedCommon(button);
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ void BobbyGraphDisplay<COUNT>::rawButtonReleased(uint8_t button)
|
||||
template<size_t COUNT>
|
||||
void BobbyGraphDisplay<COUNT>::buttonPressed(espgui::Button button)
|
||||
{
|
||||
Base::buttonPressed(button);
|
||||
//Base::buttonPressed(button);
|
||||
buttonPressedCommon(button);
|
||||
}
|
||||
|
||||
@ -46,4 +46,5 @@ template<size_t COUNT>
|
||||
void BobbyGraphDisplay<COUNT>::buttonReleased(espgui::Button button)
|
||||
{
|
||||
//Base::buttonReleased(button);
|
||||
buttonReleasedCommon(button);
|
||||
}
|
||||
|
@ -26,6 +26,6 @@ void BobbyMenuDisplay::buttonPressed(espgui::Button button)
|
||||
|
||||
void BobbyMenuDisplay::buttonReleased(espgui::Button button)
|
||||
{
|
||||
//Base::buttonReleased(button);
|
||||
Base::buttonReleased(button);
|
||||
buttonReleasedCommon(button);
|
||||
}
|
||||
|
@ -26,4 +26,5 @@ void BobbyPopupDisplay::buttonPressed(espgui::Button button)
|
||||
void BobbyPopupDisplay::buttonReleased(espgui::Button button)
|
||||
{
|
||||
//Base::buttonReleased(button);
|
||||
buttonReleasedCommon(button);
|
||||
}
|
||||
|
@ -46,5 +46,6 @@ template<std::size_t COUNT0, std::size_t COUNT1>
|
||||
void BobbySplitGraphDisplay<COUNT0, COUNT1>::buttonReleased(espgui::Button button)
|
||||
{
|
||||
//Base::buttonReleased(button);
|
||||
buttonReleasedCommon(button);
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,9 @@
|
||||
// system includes
|
||||
#include <array>
|
||||
|
||||
// esp-idf includes
|
||||
#include <esp_log.h>
|
||||
|
||||
// Arduino includes
|
||||
#include <esp32-hal-gpio.h>
|
||||
#include <esp32-hal-misc.h>
|
||||
@ -19,6 +22,8 @@
|
||||
#include "bobbybuttons.h"
|
||||
|
||||
namespace {
|
||||
static const constexpr char TAG[] = "DPAD";
|
||||
|
||||
template<pin_t OUT, pin_t IN1, pin_t IN2, pin_t IN3, pin_t IN4>
|
||||
class Helper
|
||||
{
|
||||
|
Reference in New Issue
Block a user