🐍 Makes sveltekit run arduino task loop

This commit is contained in:
Rune Harlyk
2024-07-11 21:28:54 +02:00
committed by Rune Harlyk
parent 6c257784ca
commit c432792300
3 changed files with 4 additions and 6 deletions
+1 -3
View File
@@ -83,8 +83,6 @@ void ESP32SvelteKit::begin() {
startServices();
ESP_LOGV("ESP32SvelteKit", "Starting loop task");
_taskManager.createTask(this->_loopImpl, "Spot main", 4096, this, (tskIDLE_PRIORITY + 1), NULL,
ESP32SVELTEKIT_RUNNING_CORE);
}
void ESP32SvelteKit::setupServer() {
@@ -204,7 +202,7 @@ void ESP32SvelteKit::startServices() {
#endif
}
void IRAM_ATTR ESP32SvelteKit::_loop() {
void IRAM_ATTR ESP32SvelteKit::loop() {
while (1) {
_wifiSettingsService.loop();
_apSettingsService.loop();
+2 -2
View File
@@ -128,6 +128,8 @@ class ESP32SvelteKit {
void recoveryMode() { _apSettingsService.recoveryMode(); }
void loop();
private:
PsychicHttpServer *_server;
unsigned int _numberEndpoints;
@@ -184,8 +186,6 @@ class ESP32SvelteKit {
String _appName = APP_NAME;
protected:
static void _loopImpl(void *_this) { static_cast<ESP32SvelteKit *>(_this)->_loop(); }
void _loop();
void setupServer();
void setupMDNS();
void startServices();
+1 -1
View File
@@ -13,4 +13,4 @@ void setup() {
spot.begin();
}
void loop() { vTaskDelete(NULL); }
void loop() { spot.loop(); }