cleanup main.cpp, split platform code into a Platform object

This commit is contained in:
2021-03-31 11:50:00 -07:00
parent a6534bcb20
commit 10bbcd6786
21 changed files with 768 additions and 408 deletions

View File

@@ -1,11 +1,13 @@
#include "./Buttons.h"
#include "../Static.h"
void
Buttons::onStart()
{
for(int i = 0; i < 3; i++) {
//Log.info("Bound pin %d to button %d", 2 + i, i);
m_buttons[i].attach(2 + i, INPUT_PULLDOWN);
//m_buttons[i].attach(2 + i, INPUT_PULLDOWN);
m_buttons[i].attach(2 + i, INPUT_PULLUP);
m_buttons[i].interval(15);
}
}
@@ -35,3 +37,5 @@ Buttons::read()
}
return InputEvent{};
}
STATIC_ALLOC(Buttons);