mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-07-29 01:52:51 +00:00
direct call compute
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user