mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
auto formatting
This commit is contained in:
@@ -262,32 +262,30 @@ void Shell::loop_normal() {
|
||||
} else if (esc_ == 1) { // pos1
|
||||
cursor_ = line_buffer_.length();
|
||||
} else if (esc_ == 11) { // F1
|
||||
|
||||
// TODO use flash here?
|
||||
set_command_str(("help"));
|
||||
set_command_str("help");
|
||||
} else if (esc_ == 12) { // F2
|
||||
set_command_str(("show"));
|
||||
set_command_str("show");
|
||||
} else if (esc_ == 13) { // F3
|
||||
set_command_str(("log notice"));
|
||||
set_command_str("log notice");
|
||||
} else if (esc_ == 14) { // F4
|
||||
set_command_str(("log info"));
|
||||
set_command_str("log info");
|
||||
} else if (esc_ == 15) { // F5
|
||||
set_command_str(("log debug"));
|
||||
set_command_str("log debug");
|
||||
} else if (esc_ == 17) { // F6
|
||||
set_command_str(("watch off"));
|
||||
set_command_str("watch off");
|
||||
} else if (esc_ == 18) { // F7
|
||||
set_command_str(("watch on"));
|
||||
set_command_str("watch on");
|
||||
} else if (esc_ == 19) { // F8
|
||||
set_command_str(("watch raw"));
|
||||
set_command_str("watch raw");
|
||||
} else if (esc_ == 20) { // F9
|
||||
set_command_str(("call system info"));
|
||||
set_command_str("call system info");
|
||||
} else if (esc_ == 21) { // F10
|
||||
set_command_str(("call system settings"));
|
||||
set_command_str("call system settings");
|
||||
} else if (esc_ == 23) { // F11
|
||||
line_buffer_ = (("call send \"0B \""));
|
||||
line_buffer_ = ("call send \"0B \"");
|
||||
cursor_ = 1;
|
||||
} else if (esc_ == 24) { // F12
|
||||
set_command_str(("log debug; watch raw"));
|
||||
set_command_str("log debug; watch raw");
|
||||
}
|
||||
esc_ = 0;
|
||||
} else if (c >= '0' && (c <= '9')) { // numbers
|
||||
|
||||
@@ -685,8 +685,8 @@ class Shell : public std::enable_shared_from_this<Shell>, public uuid::log::Hand
|
||||
PasswordData(const char * password_prompt, password_function && password_function);
|
||||
~PasswordData() override = default;
|
||||
|
||||
const char * password_prompt_; /*!< Prompt requesting password input. @since 0.1.0 */
|
||||
password_function password_function_; /*!< Function to execute after password entry. @since 0.1.0 */
|
||||
const char * password_prompt_; /*!< Prompt requesting password input. @since 0.1.0 */
|
||||
password_function password_function_; /*!< Function to execute after password entry. @since 0.1.0 */
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -761,7 +761,7 @@ class Shell : public std::enable_shared_from_this<Shell>, public uuid::log::Hand
|
||||
const std::shared_ptr<const uuid::log::Message> content_; /*!< Log message content. @since 0.1.0 */
|
||||
};
|
||||
|
||||
Shell(const Shell &) = delete;
|
||||
Shell(const Shell &) = delete;
|
||||
Shell & operator=(const Shell &) = delete;
|
||||
|
||||
/**
|
||||
@@ -906,7 +906,7 @@ class Shell : public std::enable_shared_from_this<Shell>, public uuid::log::Hand
|
||||
size_t maximum_log_messages_ = MAX_LOG_MESSAGES; /*!< Maximum command line length in bytes. @since 0.6.0 */
|
||||
std::string line_buffer_; /*!< Command line buffer. Limited to maximum_command_line_length() bytes. @since 0.1.0 */
|
||||
std::string line_old_[MAX_LINES]; /*!< old Command line buffer.*/
|
||||
uint8_t line_no_ = 0;
|
||||
uint8_t line_no_ = 0;
|
||||
size_t maximum_command_line_length_ = MAX_COMMAND_LINE_LENGTH; /*!< Maximum command line length in bytes. @since 0.6.0 */
|
||||
unsigned char previous_ = 0; /*!< Previous character that was entered on the command line. Used to detect CRLF line endings. @since 0.1.0 */
|
||||
uint8_t cursor_ = 0; /*!< cursor position from end of line */
|
||||
@@ -955,9 +955,9 @@ class CommandLine {
|
||||
~CommandLine() = default;
|
||||
|
||||
#ifdef UNIT_TEST
|
||||
CommandLine(CommandLine &&) = default;
|
||||
CommandLine & operator=(CommandLine &&) = default;
|
||||
CommandLine(const CommandLine &) __attribute__((deprecated)) = default;
|
||||
CommandLine(CommandLine &&) = default;
|
||||
CommandLine & operator=(CommandLine &&) = default;
|
||||
CommandLine(const CommandLine &) __attribute__((deprecated)) = default;
|
||||
CommandLine & operator=(const CommandLine &) __attribute__((deprecated)) = default;
|
||||
#endif
|
||||
|
||||
@@ -1279,8 +1279,8 @@ class Commands {
|
||||
*/
|
||||
void add_command(unsigned int context,
|
||||
unsigned int flags,
|
||||
const string_vector & name,
|
||||
const string_vector & arguments,
|
||||
const string_vector & name,
|
||||
const string_vector & arguments,
|
||||
command_function function,
|
||||
argument_completion_function arg_function);
|
||||
|
||||
@@ -1344,11 +1344,7 @@ class Commands {
|
||||
* completions for this command.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
Command(unsigned int flags,
|
||||
const string_vector name,
|
||||
const string_vector arguments,
|
||||
command_function function,
|
||||
argument_completion_function arg_function);
|
||||
Command(unsigned int flags, const string_vector name, const string_vector arguments, command_function function, argument_completion_function arg_function);
|
||||
~Command();
|
||||
|
||||
/**
|
||||
@@ -1372,13 +1368,13 @@ class Commands {
|
||||
}
|
||||
|
||||
unsigned int flags_; /*!< Shell flags that must be set for this command to be available. @since 0.1.0 */
|
||||
const string_vector name_; /*!< Name of the command as a std::vector of flash strings. @since 0.1.0 */
|
||||
const string_vector arguments_; /*!< Help text for arguments that the command accepts as a std::vector of flash strings. @since 0.1.0 */
|
||||
const string_vector name_; /*!< Name of the command as a std::vector of flash strings. @since 0.1.0 */
|
||||
const string_vector arguments_; /*!< Help text for arguments that the command accepts as a std::vector of flash strings. @since 0.1.0 */
|
||||
command_function function_; /*!< Function to be used when the command is executed. @since 0.1.0 */
|
||||
argument_completion_function arg_function_; /*!< Function to be used to perform argument completions for this command. @since 0.1.0 */
|
||||
|
||||
private:
|
||||
Command(const Command &) = delete;
|
||||
Command(const Command &) = delete;
|
||||
Command & operator=(const Command &) = delete;
|
||||
};
|
||||
|
||||
@@ -1487,7 +1483,7 @@ class StreamConsole : virtual public Shell {
|
||||
explicit StreamConsole(Stream & stream);
|
||||
|
||||
private:
|
||||
StreamConsole(const StreamConsole &) = delete;
|
||||
StreamConsole(const StreamConsole &) = delete;
|
||||
StreamConsole & operator=(const StreamConsole &) = delete;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user