File tree Expand file tree Collapse file tree 3 files changed +0
-95
lines changed
examples/Modulino_Buttons/Buttons_Basic Expand file tree Collapse file tree 3 files changed +0
-95
lines changed Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -127,17 +127,6 @@ class ModulinoButtons : public Module {
127127 PinStatus isPressed (int index) {
128128 return last_status[index] ? HIGH : LOW;
129129 }
130- PinStatus isPressed (char button) {
131- int index = buttonToIndex (button);
132- if (index < 0 ) return LOW;
133- return isPressed (index);
134- }
135- PinStatus isPressed (const char *button) {
136- if (button == nullptr || button[0 ] == ' \0 ' || button[1 ] != ' \0 ' ) {
137- return LOW;
138- }
139- return isPressed (button[0 ]);
140- }
141130 bool update () {
142131 uint8_t buf[3 ];
143132 auto res = read ((uint8_t *)buf, 3 );
@@ -165,14 +154,6 @@ class ModulinoButtons : public Module {
165154 }
166155private:
167156 bool last_status[3 ];
168- int buttonToIndex (char button) {
169- switch (toupper (button)) {
170- case ' A' : return 0 ;
171- case ' B' : return 1 ;
172- case ' C' : return 2 ;
173- default : return -1 ;
174- }
175- }
176157protected:
177158 uint8_t match[1 ] = { 0x7C }; // same as fw main.c
178159};
You can’t perform that action at this time.
0 commit comments