Command uses flash fullname instead of custom, to save on heap

This commit is contained in:
Proddy
2022-09-10 17:18:43 +02:00
parent 4cd655fb36
commit cc44bc9d7f
9 changed files with 42 additions and 58 deletions

View File

@@ -50,12 +50,12 @@ void DallasSensor::start() {
EMSdevice::DeviceType::DALLASSENSOR,
F_(info),
[&](const char * value, const int8_t id, JsonObject & output) { return command_info(value, id, output); },
uuid::read_flash_string(F_(info_cmd)));
F_(info_cmd));
Command::add(
EMSdevice::DeviceType::DALLASSENSOR,
F_(commands),
[&](const char * value, const int8_t id, JsonObject & output) { return command_commands(value, id, output); },
uuid::read_flash_string(F_(commands_cmd)));
F_(commands_cmd));
Mqtt::subscribe(EMSdevice::DeviceType::DALLASSENSOR, "dallasssensor/#", nullptr); // use empty function callback
}