mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-09 17:29:50 +03:00
alpha 0.2 - add solar, mixing, heatpump
This commit is contained in:
@@ -79,10 +79,17 @@ void Commands::add_command(unsigned int context,
|
||||
}
|
||||
|
||||
// added by proddy
|
||||
void Commands::remove_context_commands(unsigned int context) {
|
||||
commands_.erase(context);
|
||||
/*
|
||||
// note we should really iterate and free up the lambda code and any flashstrings
|
||||
void Commands::remove_all_commands() {
|
||||
commands_.clear();
|
||||
}
|
||||
|
||||
// added by proddy
|
||||
// note we should really iterate and free up the lambda code and any flashstrings
|
||||
void Commands::remove_context_commands(unsigned int context) {
|
||||
commands_.erase(context);
|
||||
|
||||
/*
|
||||
auto commands = commands_.equal_range(context);
|
||||
for (auto command_it = commands.first; command_it != commands.second; command_it++) {
|
||||
shell.printf("Got: ");
|
||||
|
||||
@@ -57,9 +57,8 @@ Shell::~Shell() {
|
||||
}
|
||||
|
||||
void Shell::start() {
|
||||
// Added by proddy - default log level
|
||||
#ifdef EMSESP_DEBUG
|
||||
uuid::log::Logger::register_handler(this, uuid::log::Level::NOTICE); // was debug
|
||||
uuid::log::Logger::register_handler(this, uuid::log::Level::DEBUG); // added by proddy
|
||||
#else
|
||||
uuid::log::Logger::register_handler(this, uuid::log::Level::NOTICE);
|
||||
#endif
|
||||
|
||||
@@ -128,7 +128,6 @@ void Shell::print_all_available_commands() {
|
||||
command_line.escape_initial_parameters(name.size());
|
||||
name.clear();
|
||||
arguments.clear();
|
||||
print(" "); // added by proddy
|
||||
println(command_line.to_string(maximum_command_line_length()));
|
||||
});
|
||||
*/
|
||||
|
||||
@@ -1313,6 +1313,7 @@ class Commands {
|
||||
void for_each_available_command(Shell & shell, apply_function f) const;
|
||||
|
||||
void remove_context_commands(unsigned int context); // added by proddy
|
||||
void remove_all_commands(); // added by proddy
|
||||
|
||||
private:
|
||||
/**
|
||||
|
||||
@@ -66,35 +66,12 @@ namespace uuid {
|
||||
#define COLOR_BRIGHT_CYAN "\x1B[0;96m"
|
||||
#define COLOR_BRIGHT_WHITE "\x1B[0;97m"
|
||||
#define COLOR_UNDERLINE "\x1B[4m"
|
||||
|
||||
/*
|
||||
Background Black: \u001b[40m
|
||||
Background Red: \u001b[41m
|
||||
Background Green: \u001b[42m
|
||||
Background Yellow: \u001b[43m
|
||||
Background Blue: \u001b[44m
|
||||
Background Magenta: \u001b[45m
|
||||
Background Cyan: \u001b[46m
|
||||
Background White: \u001b[47m
|
||||
With the bright versions being:
|
||||
|
||||
Background Bright Black: \u001b[40;1m
|
||||
Background Bright Red: \u001b[41;1m
|
||||
Background Bright Green: \u001b[42;1m
|
||||
Background Bright Yellow: \u001b[43;1m
|
||||
Background Bright Blue: \u001b[44;1m
|
||||
Background Bright Magenta: \u001b[45;1m
|
||||
Background Bright Cyan: \u001b[46;1m
|
||||
Background Bright White: \u001b[47;1m
|
||||
*/
|
||||
|
||||
#define COLOR_BRIGHT_RED_BACKGROUND "\x1B[41;1m"
|
||||
|
||||
|
||||
namespace log {
|
||||
|
||||
/**
|
||||
* Severity level of log messages. Proddy added a VERBOSE
|
||||
* Severity level of log messages. Proddy switches trace & debug
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@@ -340,7 +317,7 @@ class Logger {
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
static constexpr size_t MAX_LOG_LENGTH = 255; // proddy note, kept at 255
|
||||
static constexpr size_t MAX_LOG_LENGTH = 255;
|
||||
|
||||
/**
|
||||
* Create a new logger with the given name and logging facility.
|
||||
|
||||
Reference in New Issue
Block a user