formatting, remove wemos from board profile, fix olimex

This commit is contained in:
proddy
2021-03-28 16:27:26 +02:00
parent 7c3b8954fe
commit 942d062506

View File

@@ -299,9 +299,9 @@ void System::button_init(bool refresh) {
if (is_valid_gpio(pbutton_gpio_)) { if (is_valid_gpio(pbutton_gpio_)) {
if (!myPButton_.init(pbutton_gpio_, HIGH)) { if (!myPButton_.init(pbutton_gpio_, HIGH)) {
LOG_INFO(F("External multi-functional button not detected")); LOG_INFO(F("Multi-functional button not detected"));
} else { } else {
LOG_INFO(F("External multi-functional button enabled")); LOG_INFO(F("Multi-functional button enabled"));
} }
} else { } else {
LOG_WARNING(F("Invalid button GPIO. Check config.")); LOG_WARNING(F("Invalid button GPIO. Check config."));
@@ -827,7 +827,7 @@ void System::console_commands(Shell & shell, unsigned int context) {
return StateUpdateResult::CHANGED; return StateUpdateResult::CHANGED;
}, },
"local"); "local");
shell.printfln("Loaded board profile %s with %d,%d,%d,%d,%d", board_profile.c_str(), data[0], data[1], data[2], data[3], data[4]); shell.printfln("Loaded board profile %s (%d,%d,%d,%d,%d)", board_profile.c_str(), data[0], data[1], data[2], data[3], data[4]);
EMSESP::system_.network_init(true); EMSESP::system_.network_init(true);
}); });
@@ -1023,19 +1023,17 @@ bool System::command_test(const char * value, const int8_t id) {
// returns false if profile is not found // returns false if profile is not found
bool System::load_board_profile(std::vector<uint8_t> & data, const std::string & board_profile) { bool System::load_board_profile(std::vector<uint8_t> & data, const std::string & board_profile) {
if (board_profile == "S32") { if (board_profile == "S32") {
data = {2, 3, 23, 5, 0}; // Gateway S32 data = {2, 3, 23, 5, 0}; // BBQKees Gateway S32
} else if (board_profile == "E32") { } else if (board_profile == "E32") {
data = {2, 4, 5, 17, 33}; // Gateway E32 data = {2, 4, 5, 17, 33}; // BBQKees Gateway E32
} else if (board_profile == "MT-ET") { } else if (board_profile == "MT-ET") {
data = {2, 18, 23, 5, 0}; // MT-ET Live D1 Mini data = {2, 18, 23, 5, 0}; // MT-ET Live D1 Mini
} else if (board_profile == "NODEMCU") { } else if (board_profile == "NODEMCU") {
data = {2, 18, 23, 5, 0}; // NodeMCU 32S data = {2, 18, 23, 5, 0}; // NodeMCU 32S
} else if (board_profile == "LOLIN") { } else if (board_profile == "LOLIN") {
data = {2, 18, 17, 16, 0}; // Lolin D32 data = {2, 18, 17, 16, 0}; // Lolin D32
} else if (board_profile == "WEMOS") {
data = {2, 18, 17, 16, 0}; // Wemos Mini D1 ESP32
} else if (board_profile == "OLIMEX") { } else if (board_profile == "OLIMEX") {
data = {0, 4, 5, 17, 34}; // Olimex ESP32-EVB data = {0, 0, 36, 4, 34}; // Olimex ESP32-EVB (uses U1TXD/U1RXD/BUTTON, no LED or Dallas)
} else if (board_profile == "TLK110") { } else if (board_profile == "TLK110") {
data = {2, 4, 5, 17, 33}; // Generic Ethernet (TLK110) data = {2, 4, 5, 17, 33}; // Generic Ethernet (TLK110)
} else if (board_profile == "LAN8720") { } else if (board_profile == "LAN8720") {