🐍 Makes sveltekit run arduino task loop
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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
@@ -13,4 +13,4 @@ void setup() {
|
||||
spot.begin();
|
||||
}
|
||||
|
||||
void loop() { vTaskDelete(NULL); }
|
||||
void loop() { spot.loop(); }
|
||||
|
||||
Reference in New Issue
Block a user