mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-21 10:26:06 +03:00
Fix conflict with master branch.
- Avoid single character String concatenations done via String literals instead of char literals, as this is inefficient because of temporary String creations (#6571).
This commit is contained in:
parent
f8ec4f1c72
commit
7ca5a7e5bb
@ -372,7 +372,7 @@ transmission_status_t ESP8266WiFiMesh::exchangeInfo(WiFiClient &currClient)
|
|||||||
{
|
{
|
||||||
verboseModePrint("Transmitting"); // Not storing strings in flash (via F()) to avoid performance impacts when using the string.
|
verboseModePrint("Transmitting"); // Not storing strings in flash (via F()) to avoid performance impacts when using the string.
|
||||||
|
|
||||||
currClient.print(getMessage() + "\r");
|
currClient.print(getMessage() + '\r');
|
||||||
yield();
|
yield();
|
||||||
|
|
||||||
if (!waitForClientTransmission(currClient, _stationModeTimeoutMs))
|
if (!waitForClientTransmission(currClient, _stationModeTimeoutMs))
|
||||||
@ -585,11 +585,11 @@ void ESP8266WiFiMesh::attemptTransmission(const String &message, bool concluding
|
|||||||
|
|
||||||
if(_verboseMode) // Avoid string generation if not required
|
if(_verboseMode) // Avoid string generation if not required
|
||||||
{
|
{
|
||||||
verboseModePrint(String(F("AP acquired: ")) + currentSSID + String(F(", Ch:")) + String(currentWiFiChannel) + " ", false);
|
verboseModePrint(String(F("AP acquired: ")) + currentSSID + String(F(", Ch:")) + String(currentWiFiChannel) + ' ', false);
|
||||||
|
|
||||||
if(currentNetwork.networkIndex != NETWORK_INFO_DEFAULT_INT)
|
if(currentNetwork.networkIndex != NETWORK_INFO_DEFAULT_INT)
|
||||||
{
|
{
|
||||||
verboseModePrint("(" + String(WiFi.RSSI(currentNetwork.networkIndex)) + String(F("dBm) ")) +
|
verboseModePrint('(' + String(WiFi.RSSI(currentNetwork.networkIndex)) + String(F("dBm) ")) +
|
||||||
(WiFi.encryptionType(currentNetwork.networkIndex) == ENC_TYPE_NONE ? String(F("open")) : ""), false);
|
(WiFi.encryptionType(currentNetwork.networkIndex) == ENC_TYPE_NONE ? String(F("open")) : ""), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -665,7 +665,7 @@ void ESP8266WiFiMesh::acceptRequest()
|
|||||||
if (_client.connected())
|
if (_client.connected())
|
||||||
{
|
{
|
||||||
verboseModePrint("Responding"); // Not storing strings in flash (via F()) to avoid performance impacts when using the string.
|
verboseModePrint("Responding"); // Not storing strings in flash (via F()) to avoid performance impacts when using the string.
|
||||||
_client.print(response + "\r");
|
_client.print(response + '\r');
|
||||||
_client.flush();
|
_client.flush();
|
||||||
yield();
|
yield();
|
||||||
}
|
}
|
||||||
|
@ -165,7 +165,7 @@ bool EspnowMeshBackend::activateEspnow()
|
|||||||
warningPrint("Failed to set ESP-NOW role! Maybe ESP-NOW peers are already added?");
|
warningPrint("Failed to set ESP-NOW role! Maybe ESP-NOW peers are already added?");
|
||||||
|
|
||||||
verboseModePrint("ESP-NOW activated.");
|
verboseModePrint("ESP-NOW activated.");
|
||||||
verboseModePrint("My ESP-NOW STA MAC: " + WiFi.macAddress() + "\n"); // Get the station MAC address. The softAP MAC is different.
|
verboseModePrint("My ESP-NOW STA MAC: " + WiFi.macAddress() + '\n'); // Get the station MAC address. The softAP MAC is different.
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -282,11 +282,11 @@ void MeshBackendBase::printAPInfo(const NetworkInfoBase &apNetworkInfo)
|
|||||||
mainNetworkIdentifier = macToString(apNetworkInfo.BSSID());
|
mainNetworkIdentifier = macToString(apNetworkInfo.BSSID());
|
||||||
}
|
}
|
||||||
|
|
||||||
verboseModePrint(String(F("AP acquired: ")) + mainNetworkIdentifier + String(F(", Ch:")) + String(apNetworkInfo.wifiChannel()) + " ", false);
|
verboseModePrint(String(F("AP acquired: ")) + mainNetworkIdentifier + String(F(", Ch:")) + String(apNetworkInfo.wifiChannel()) + ' ', false);
|
||||||
|
|
||||||
if(apNetworkInfo.RSSI() != NetworkInfoBase::defaultRSSI)
|
if(apNetworkInfo.RSSI() != NetworkInfoBase::defaultRSSI)
|
||||||
{
|
{
|
||||||
verboseModePrint("(" + String(apNetworkInfo.RSSI()) + String(F("dBm) ")) +
|
verboseModePrint('(' + String(apNetworkInfo.RSSI()) + String(F("dBm) ")) +
|
||||||
(apNetworkInfo.encryptionType() == ENC_TYPE_NONE ? String(F("open")) : ""), false);
|
(apNetworkInfo.encryptionType() == ENC_TYPE_NONE ? String(F("open")) : ""), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -247,7 +247,7 @@ transmission_status_t TcpIpMeshBackend::exchangeInfo(WiFiClient &currClient)
|
|||||||
{
|
{
|
||||||
verboseModePrint("Transmitting"); // Not storing strings in flash (via F()) to avoid performance impacts when using the string.
|
verboseModePrint("Transmitting"); // Not storing strings in flash (via F()) to avoid performance impacts when using the string.
|
||||||
|
|
||||||
currClient.print(getCurrentMessage() + "\r");
|
currClient.print(getCurrentMessage() + '\r');
|
||||||
yield();
|
yield();
|
||||||
|
|
||||||
if (!waitForClientTransmission(currClient, _stationModeTimeoutMs))
|
if (!waitForClientTransmission(currClient, _stationModeTimeoutMs))
|
||||||
@ -550,7 +550,7 @@ void TcpIpMeshBackend::acceptRequests()
|
|||||||
if (_client.connected())
|
if (_client.connected())
|
||||||
{
|
{
|
||||||
verboseModePrint("Responding"); // Not storing strings in flash (via F()) to avoid performance impacts when using the string.
|
verboseModePrint("Responding"); // Not storing strings in flash (via F()) to avoid performance impacts when using the string.
|
||||||
_client.print(response + "\r");
|
_client.print(response + '\r');
|
||||||
_client.flush();
|
_client.flush();
|
||||||
yield();
|
yield();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user