mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
formatting
This commit is contained in:
@@ -33,11 +33,11 @@ bool Command::call(const uint8_t device_type, const char * cmd, const char * val
|
|||||||
#ifdef EMSESP_DEBUG
|
#ifdef EMSESP_DEBUG
|
||||||
std::string dname = EMSdevice::device_type_2_device_name(device_type);
|
std::string dname = EMSdevice::device_type_2_device_name(device_type);
|
||||||
if (value == nullptr) {
|
if (value == nullptr) {
|
||||||
LOG_DEBUG(F("[DEBUG] Calling command %s in %s"), cmd, dname.c_str());
|
LOG_DEBUG(F("[DEBUG] Calling %s command %s"), dname.c_str(), cmd);
|
||||||
} else if (id == -1) {
|
} else if (id == -1) {
|
||||||
LOG_DEBUG(F("[DEBUG] Calling command %s, value %s, id is default in %s"), cmd, value, dname.c_str());
|
LOG_DEBUG(F("[DEBUG] Calling %s command %s, value %s, id is default"), dname.c_str(), cmd, value);
|
||||||
} else {
|
} else {
|
||||||
LOG_DEBUG(F("[DEBUG] Calling command %s, value %s, id is %d in %s"), cmd, value, id, dname.c_str());
|
LOG_DEBUG(F("[DEBUG] Calling %s command %s, value %s, id is %d in %s"), dname.c_str(), cmd, value, id);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
bool ok = false;
|
bool ok = false;
|
||||||
@@ -46,6 +46,7 @@ bool Command::call(const uint8_t device_type, const char * cmd, const char * val
|
|||||||
if (cf.device_type_ == device_type) {
|
if (cf.device_type_ == device_type) {
|
||||||
// find a matching command and call it
|
// find a matching command and call it
|
||||||
if (uuid::read_flash_string(cf.cmd_) == cmd) {
|
if (uuid::read_flash_string(cf.cmd_) == cmd) {
|
||||||
|
// see if we this function wants to send its result to a json doc
|
||||||
if (cf.cmdfunction_json_) {
|
if (cf.cmdfunction_json_) {
|
||||||
// check if json object is empty, if so quit
|
// check if json object is empty, if so quit
|
||||||
if (json.isNull()) {
|
if (json.isNull()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user