mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
remove flash
This commit is contained in:
@@ -54,19 +54,19 @@ using cmd_json_function_p = std::function<bool(const char * data, const int8_t i
|
||||
class Command {
|
||||
public:
|
||||
struct CmdFunction {
|
||||
uint8_t device_type_; // DeviceType::
|
||||
uint8_t flags_; // mqtt flags for command subscriptions
|
||||
const __FlashStringHelper * cmd_;
|
||||
const cmd_function_p cmdfunction_;
|
||||
const cmd_json_function_p cmdfunction_json_;
|
||||
const __FlashStringHelper * description_;
|
||||
uint8_t device_type_; // DeviceType::
|
||||
uint8_t flags_; // mqtt flags for command subscriptions
|
||||
const char * cmd_;
|
||||
const cmd_function_p cmdfunction_;
|
||||
const cmd_json_function_p cmdfunction_json_;
|
||||
const char * description_;
|
||||
|
||||
CmdFunction(const uint8_t device_type,
|
||||
const uint8_t flags,
|
||||
const __FlashStringHelper * cmd,
|
||||
const cmd_function_p cmdfunction,
|
||||
const cmd_json_function_p cmdfunction_json,
|
||||
const __FlashStringHelper * description)
|
||||
CmdFunction(const uint8_t device_type,
|
||||
const uint8_t flags,
|
||||
const char * cmd,
|
||||
const cmd_function_p cmdfunction,
|
||||
const cmd_json_function_p cmdfunction_json,
|
||||
const char * description)
|
||||
: device_type_(device_type)
|
||||
, flags_(flags)
|
||||
, cmd_(cmd)
|
||||
@@ -99,18 +99,12 @@ class Command {
|
||||
static uint8_t call(const uint8_t device_type, const char * cmd, const char * value);
|
||||
|
||||
// with normal call back function taking a value and id
|
||||
static void add(const uint8_t device_type,
|
||||
const __FlashStringHelper * cmd,
|
||||
const cmd_function_p cb,
|
||||
const __FlashStringHelper * description,
|
||||
uint8_t flags = CommandFlag::MQTT_SUB_FLAG_DEFAULT);
|
||||
static void
|
||||
add(const uint8_t device_type, const char * cmd, const cmd_function_p cb, const char * description, uint8_t flags = CommandFlag::MQTT_SUB_FLAG_DEFAULT);
|
||||
|
||||
// callback function taking value, id and a json object for its output
|
||||
static void add(const uint8_t device_type,
|
||||
const __FlashStringHelper * cmd,
|
||||
const cmd_json_function_p cb,
|
||||
const __FlashStringHelper * description,
|
||||
uint8_t flags = CommandFlag::MQTT_SUB_FLAG_DEFAULT);
|
||||
static void
|
||||
add(const uint8_t device_type, const char * cmd, const cmd_json_function_p cb, const char * description, uint8_t flags = CommandFlag::MQTT_SUB_FLAG_DEFAULT);
|
||||
|
||||
static void show_all(uuid::console::Shell & shell);
|
||||
static Command::CmdFunction * find_command(const uint8_t device_type, const char * cmd);
|
||||
|
||||
Reference in New Issue
Block a user