add task for nuki

This commit is contained in:
technyon
2022-03-22 21:46:54 +01:00
parent 4c479d1710
commit 934f496bf8
2 changed files with 9 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
#include "Nuki.h"
#include <FreeRTOS.h>
Nuki::Nuki(const std::string& name, uint32_t id)
: _nukiBle(name, id)
@@ -31,5 +32,7 @@ void Nuki::update()
}
}
vTaskDelay( 1000 / portTICK_PERIOD_MS);
_nukiBle.updateKeyTurnerState();
}

View File

@@ -14,9 +14,15 @@ void networkTask(void *pvParameters)
network.update();
}
void nukiTask(void *pvParameters)
{
// nuki.update();
}
void setupTasks()
{
xTaskCreate(networkTask, "ntw", 1024, NULL, 1, NULL);
xTaskCreate(nukiTask, "nuki", 1024, NULL, 1, NULL);
}
void setup()