cleanup and formatting

This commit is contained in:
MichaelDvP
2022-12-24 15:46:04 +01:00
parent 9d80c2cea7
commit 70cfbc3715
11 changed files with 117 additions and 95 deletions

View File

@@ -336,6 +336,11 @@ void Command::add(const uint8_t device_type, const uint8_t device_id, const char
cmdfunctions_.emplace_back(device_type, device_id, flags, cmd, cb, nullptr, description); // callback for json is nullptr
}
// same for system/dallas/analog devices with device_id 0
void Command::add(const uint8_t device_type, const char * cmd, const cmd_function_p cb, const char * const * description, uint8_t flags) {
add(device_type, 0, cmd, cb, description, flags);
}
// add a command to the list, which does return a json object as output
void Command::add(const uint8_t device_type, const char * cmd, const cmd_json_function_p cb, const char * const * description, uint8_t flags) {
// if the command already exists for that device type don't add it