mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2025-12-17 07:43:06 +01:00
added claiming for task interface
This commit is contained in:
@@ -110,4 +110,14 @@ void handleButtons(GwApi *api){
|
||||
}
|
||||
vTaskDelete(NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
void initButtons(GwApi *api){
|
||||
#ifndef GWBUTTON_PIN
|
||||
api->getLogger()->logDebug(GwLog::LOG,"no buttons defined, no button task");
|
||||
return;
|
||||
#endif
|
||||
const String taskname("buttonTask");
|
||||
api->addUserTask(handleButtons,taskname);
|
||||
api->taskInterfaces()->claim<IButtonTask>(taskname);
|
||||
}
|
||||
Reference in New Issue
Block a user