direct call compute

This commit is contained in:
MichaelDvP
2026-07-09 19:41:13 +02:00
parent fae0f9fb49
commit f6cb695635
3 changed files with 2 additions and 7 deletions

View File

@@ -30,7 +30,7 @@
#include <HTTPClient.h>
#include <map>
#include "shuntingYard.h" // for compute() used by the message
#include "EMSESP_Version.h"
#if defined(EMSESP_TEST)
@@ -222,7 +222,7 @@ bool System::command_message(const char * value, const int8_t id, JsonObject out
LOG_WARNING("Message is empty");
return false; // must have a string value
}
std::string computed_value = EMSESP::webSchedulerService.compute_value(value);
std::string computed_value = compute(value);
LOG_INFO("Message: %s", computed_value.c_str()); // send to log
Mqtt::queue_publish(F_(message), computed_value); // send to MQTT if enabled
output["api_data"] = computed_value; // send to API

View File

@@ -472,10 +472,6 @@ void WebSchedulerService::condition() {
}
}
std::string WebSchedulerService::compute_value(const char * value) {
return compute(value);
}
// process any scheduled jobs
void WebSchedulerService::loop() {
// initialize static value on startup

View File

@@ -89,7 +89,6 @@ class WebSchedulerService : public StatefulService<WebScheduler> {
bool onChange(const char * cmd);
std::string get_metrics_prometheus();
std::string compute_value(const char * value);
#if defined(EMSESP_TEST)
void load_test_data();