We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 761e635 + 80af98a commit 19e72dbCopy full SHA for 19e72db
components/button/iot_button.c
@@ -191,13 +191,7 @@ static void button_handler(button_dev_t *btn)
191
/** Calling the callbacks for MULTIPLE BUTTON CLICKS */
192
for (int i = 0; i < btn->size[btn->event]; i++) {
193
if (btn->repeat == btn->cb_info[btn->event][i].event_args.multiple_clicks.clicks) {
194
- do {
195
- btn->cb_info[btn->event][i].cb(btn, btn->cb_info[btn->event][i].usr_data);
196
- i++;
197
- if (i >= btn->size[btn->event]) {
198
- break;
199
- }
200
- } while (btn->cb_info[btn->event][i].event_args.multiple_clicks.clicks == btn->repeat);
+ btn->cb_info[btn->event][i].cb(btn, btn->cb_info[btn->event][i].usr_data);
201
}
202
203
0 commit comments