firmware recovery 1.3RC

This commit is contained in:
2021-06-14 08:19:45 +02:00
parent d32deb73b5
commit f4e23386ef
15 changed files with 237 additions and 203 deletions

View File

@@ -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;
}