From 006b38df27f2c0b16eecf49ab90c0e91b4c639d6 Mon Sep 17 00:00:00 2001 From: proddy Date: Sun, 21 Jul 2024 12:58:42 +0200 Subject: [PATCH] make standalone compile --- src/web/WebSchedulerService.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/web/WebSchedulerService.cpp b/src/web/WebSchedulerService.cpp index 94843d067..c52613cf5 100644 --- a/src/web/WebSchedulerService.cpp +++ b/src/web/WebSchedulerService.cpp @@ -38,7 +38,9 @@ void WebSchedulerService::begin() { char topic[Mqtt::MQTT_TOPIC_MAX_SIZE]; snprintf(topic, sizeof(topic), "%s/#", F_(scheduler)); Mqtt::subscribe(EMSdevice::DeviceType::SCHEDULER, topic, nullptr); // use empty function callback +#ifndef EMSESP_STANDALONE xTaskCreate((TaskFunction_t)scheduler_task, "scheduler_task", 4096, NULL, 3, NULL); +#endif } // this creates the scheduler file, saving it to the FS @@ -529,7 +531,9 @@ void WebSchedulerService::scheduler_task(void * pvParameters) { EMSESP::webSchedulerService.loop(); } } +#ifndef EMSESP_STANDALONE vTaskDelete(NULL); +#endif } // hard coded tests @@ -600,7 +604,7 @@ void WebSchedulerService::test() { test_value = "(custom/seltemp - boiler/flowtempoffset) * 2.8 + 5"; command("test10", test_cmd.c_str(), compute(test_value).c_str()); - // TODO add some HTTP/URI tests + // TODO add some more HTTP/URI tests test_cmd = "{\"method\":\"POST\",\"url\":\"http://192.168.1.42:8123/api/services/script/test_notify2\", \"header\":{\"authorization\":\"Bearer " "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJhMmNlYWI5NDgzMmI0ODE2YWQ2NzU4MjkzZDE2YWMxZSIsImlhdCI6MTcyMTM5MTI0NCwiZXhwIjoyMDM2NzUxMjQ0fQ." "S5sago1tEI6lNhrDCO0dM_WsVQHkD_laAjcks8tWAqo\"}}";