ESP32-C3 and ESP32-S2, LED for C3-Mini

This commit is contained in:
MichaelDvP
2022-10-10 14:13:43 +02:00
parent b6d8e55b00
commit 6fd3e567cd
28 changed files with 4891 additions and 116 deletions

View File

@@ -49,12 +49,12 @@ void APSettingsService::startAP() {
WiFi.softAPConfig(_state.localIP, _state.gatewayIP, _state.subnetMask);
esp_wifi_set_bandwidth((wifi_interface_t)ESP_IF_WIFI_AP, WIFI_BW_HT20);
WiFi.softAP(_state.ssid.c_str(), _state.password.c_str(), _state.channel, _state.ssidHidden, _state.maxClients);
#ifdef ARDUINO_LOLIN_C3_MINI
#ifdef BOARD_C3_MINI_V1
WiFi.setTxPower(WIFI_POWER_8_5dBm); //https://www.wemos.cc/en/latest/c3/c3_mini.html#about-wifi
#endif
if (!_dnsServer) {
IPAddress apIp = WiFi.softAPIP();
emsesp::EMSESP::logger().info(F("Starting Access Point with captive portal on %s"), apIp.toString().c_str());
emsesp::EMSESP::logger().info("Starting Access Point with captive portal on %s", apIp.toString().c_str());
_dnsServer = new DNSServer;
_dnsServer->start(DNS_PORT, "*", apIp);
}
@@ -62,7 +62,7 @@ void APSettingsService::startAP() {
void APSettingsService::stopAP() {
if (_dnsServer) {
emsesp::EMSESP::logger().info(F("Stopping Access Point"));
emsesp::EMSESP::logger().info("Stopping Access Point");
_dnsServer->stop();
delete _dnsServer;
_dnsServer = nullptr;