firmware recovery 1.3RC
This commit is contained in:
@@ -63,11 +63,11 @@ bool anyButtonChanged(void)
|
||||
|
||||
bool allButtons(void)
|
||||
{
|
||||
for( auto&& thisbutton : buttonlist)
|
||||
for (auto &&thisbutton : buttonlist)
|
||||
{
|
||||
if(thisbutton->getType() == type_switch)
|
||||
if (thisbutton->getType() == type_switch)
|
||||
{
|
||||
if(!thisbutton->isPressed())
|
||||
if (!thisbutton->isPressed())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -151,4 +151,20 @@ c_button *getButton(e_ledcolor color)
|
||||
std::vector<c_button *> *getButtonlist(void)
|
||||
{
|
||||
return &buttonlist;
|
||||
}
|
||||
|
||||
uint8_t buttonPressedCount(void)
|
||||
{
|
||||
uint8_t count = 0;
|
||||
for (auto &&button : buttonlist)
|
||||
{
|
||||
if (!button == NULL)
|
||||
{
|
||||
if (button->isPressed())
|
||||
{
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
Reference in New Issue
Block a user