🐍 Makes sveltekit run arduino task loop
This commit is contained in:
@@ -83,8 +83,6 @@ void ESP32SvelteKit::begin() {
|
|||||||
startServices();
|
startServices();
|
||||||
|
|
||||||
ESP_LOGV("ESP32SvelteKit", "Starting loop task");
|
ESP_LOGV("ESP32SvelteKit", "Starting loop task");
|
||||||
_taskManager.createTask(this->_loopImpl, "Spot main", 4096, this, (tskIDLE_PRIORITY + 1), NULL,
|
|
||||||
ESP32SVELTEKIT_RUNNING_CORE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ESP32SvelteKit::setupServer() {
|
void ESP32SvelteKit::setupServer() {
|
||||||
@@ -204,7 +202,7 @@ void ESP32SvelteKit::startServices() {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void IRAM_ATTR ESP32SvelteKit::_loop() {
|
void IRAM_ATTR ESP32SvelteKit::loop() {
|
||||||
while (1) {
|
while (1) {
|
||||||
_wifiSettingsService.loop();
|
_wifiSettingsService.loop();
|
||||||
_apSettingsService.loop();
|
_apSettingsService.loop();
|
||||||
|
|||||||
@@ -128,6 +128,8 @@ class ESP32SvelteKit {
|
|||||||
|
|
||||||
void recoveryMode() { _apSettingsService.recoveryMode(); }
|
void recoveryMode() { _apSettingsService.recoveryMode(); }
|
||||||
|
|
||||||
|
void loop();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
PsychicHttpServer *_server;
|
PsychicHttpServer *_server;
|
||||||
unsigned int _numberEndpoints;
|
unsigned int _numberEndpoints;
|
||||||
@@ -184,8 +186,6 @@ class ESP32SvelteKit {
|
|||||||
String _appName = APP_NAME;
|
String _appName = APP_NAME;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
static void _loopImpl(void *_this) { static_cast<ESP32SvelteKit *>(_this)->_loop(); }
|
|
||||||
void _loop();
|
|
||||||
void setupServer();
|
void setupServer();
|
||||||
void setupMDNS();
|
void setupMDNS();
|
||||||
void startServices();
|
void startServices();
|
||||||
|
|||||||
+1
-1
@@ -13,4 +13,4 @@ void setup() {
|
|||||||
spot.begin();
|
spot.begin();
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop() { vTaskDelete(NULL); }
|
void loop() { spot.loop(); }
|
||||||
|
|||||||
Reference in New Issue
Block a user