diff --git a/lib_standalone/Arduino.h b/lib_standalone/Arduino.h index fbefdc5f7..e8884db05 100644 --- a/lib_standalone/Arduino.h +++ b/lib_standalone/Arduino.h @@ -39,7 +39,9 @@ #define LOW 0 #define HIGH 1 +#ifndef NAN #define NAN 0 +#endif #define INPUT 0 #define OUTPUT 1 diff --git a/src/command.cpp b/src/command.cpp index 8f985e098..10f07226c 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -44,9 +44,8 @@ bool Command::call(const uint8_t device_type, const char * cmd, const char * val if (!cmdfunctions_.empty()) { for (const auto & cf : cmdfunctions_) { if (cf.device_type_ == device_type) { - const char * cf_cmd = uuid::read_flash_string(cf.cmd_).c_str(); // find a matching command and call it - if (strcmp(cf_cmd, cmd) == 0) { + if (uuid::read_flash_string(cf.cmd_) == cmd) { if (cf.cmdfunction_json_) { // check if json object is empty, if so quit if (output.isNull()) {