File tree 3 files changed +0
-95
lines changed
examples/Modulino_Buttons/Buttons_Basic
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 {
127
127
PinStatus isPressed (int index) {
128
128
return last_status[index ] ? HIGH : LOW;
129
129
}
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
- }
141
130
bool update () {
142
131
uint8_t buf[3 ];
143
132
auto res = read ((uint8_t *)buf, 3 );
@@ -165,14 +154,6 @@ class ModulinoButtons : public Module {
165
154
}
166
155
private:
167
156
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
- }
176
157
protected:
177
158
uint8_t match[1 ] = { 0x7C }; // same as fw main.c
178
159
};
You can’t perform that action at this time.
0 commit comments