Skip to content

Commit 9a2a9cf

Browse files
committed
Fix: 🔥
1 parent e53f803 commit 9a2a9cf

File tree

3 files changed

+0
-95
lines changed

3 files changed

+0
-95
lines changed

.gitignore

-28
This file was deleted.

examples/Modulino_Buttons/Buttons_Basic/Buttons_Basic.ino

-48
This file was deleted.

src/Modulino.h

-19
Original file line numberDiff line numberDiff 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
}
166155
private:
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-
}
176157
protected:
177158
uint8_t match[1] = { 0x7C }; // same as fw main.c
178159
};

0 commit comments

Comments
 (0)