mirror of
https://github.com/letscontrolit/ESPEasy.git
synced 2026-07-27 19:57:38 +00:00
[ESP32-C5] Minor tweaks formatting used WiFi protocol
This commit is contained in:
@@ -57,3 +57,32 @@ build_flags = ${esp32c6_common_LittleFS.build_flags}
|
||||
extra_scripts = ${esp32c6_common_LittleFS.extra_scripts}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[esp32c5_common_LittleFS]
|
||||
extends = esp32_base_idf5
|
||||
build_flags = ${esp32_base_idf5.build_flags}
|
||||
-DFEATURE_ARDUINO_OTA=1
|
||||
-DUSE_LITTLEFS
|
||||
-DESP32C5
|
||||
extra_scripts = ${esp32_base_idf5.extra_scripts}
|
||||
build_unflags = ${esp32_base_idf5.build_unflags}
|
||||
-fexceptions
|
||||
board_build.filesystem = littlefs
|
||||
lib_ignore = ${esp32_base_idf5.lib_ignore}
|
||||
board = esp32c5cdc
|
||||
|
||||
|
||||
[env:max_ESP32c5_8M1M_LittleFS_CDC_ETH]
|
||||
extends = esp32c5_common_LittleFS
|
||||
board = esp32c5cdc-8M
|
||||
build_flags = ${esp32c5_common_LittleFS.build_flags}
|
||||
-DFEATURE_ETHERNET=1
|
||||
-DFEATURE_ARDUINO_OTA=1
|
||||
-DPLUGIN_BUILD_MAX_ESP32
|
||||
-DPLUGIN_BUILD_IR_EXTENDED
|
||||
-D ST7789_EXTRA_INIT=1
|
||||
-D P116_EXTRA_ST7789=1
|
||||
extra_scripts = ${esp32c5_common_LittleFS.extra_scripts}
|
||||
|
||||
|
||||
@@ -297,13 +297,32 @@ String WiFi_AP_Candidate::toString(const String& separator) const {
|
||||
|
||||
if (phy_known()) {
|
||||
String phy_str;
|
||||
// Order of items is kinda in order of age, oldest first.
|
||||
|
||||
// first 2.4 GHz version
|
||||
// Later called "Wi-Fi 1"
|
||||
if (bits.phy_11b) { phy_str += 'b'; }
|
||||
|
||||
// 2nd 2.4 GHz version to adopt the same 54 Mbps bandwidth as used in 802.11a
|
||||
// Later called "Wi-Fi 3"
|
||||
if (bits.phy_11g) { phy_str += 'g'; }
|
||||
|
||||
// 3rd iteration for 2.4 GHz
|
||||
// Also used for 5 GHz to make it even more confusing
|
||||
// To top the naming confusion even worse, this is later called "Wi-Fi 4"
|
||||
if (bits.phy_11n) { phy_str += 'n'; }
|
||||
#ifdef ESP32
|
||||
// Add 5 GHz WiFi types, oldest first.
|
||||
|
||||
// 802.11a was one of the first WiFi standards, using 5 GHz
|
||||
// Later called "Wi-Fi 2"
|
||||
if (bits.phy_11a) { phy_str += F("/a"); }
|
||||
|
||||
// 802.11ac was the significantly faster version for 5 GHz WiFi.
|
||||
// Later called "Wi-Fi 5"
|
||||
if (bits.phy_11ac) { phy_str += F("/ac"); }
|
||||
|
||||
// AX is WiFi-6, on both frequencies
|
||||
if (bits.phy_11ax) { phy_str += F("/ax"); }
|
||||
|
||||
if (bits.phy_lr) { phy_str += F("/lr"); }
|
||||
@@ -312,10 +331,6 @@ String WiFi_AP_Candidate::toString(const String& separator) const {
|
||||
|
||||
if (bits.ftm_responder) { phy_str += F("/FTM_r"); }
|
||||
|
||||
// Add 5 GHz WiFi types as last in the list.
|
||||
if (bits.phy_11a) { phy_str += F("/a"); }
|
||||
if (bits.phy_11ac) { phy_str += F("/ac"); }
|
||||
|
||||
#endif // ifdef ESP32
|
||||
|
||||
if (phy_str.length()) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "../DataTypes/WiFiConnectionProtocol.h"
|
||||
|
||||
#ifdef ESP8266
|
||||
|
||||
const __FlashStringHelper* toString(WiFiConnectionProtocol proto) {
|
||||
switch (proto)
|
||||
{
|
||||
@@ -7,29 +9,44 @@ const __FlashStringHelper* toString(WiFiConnectionProtocol proto) {
|
||||
return F("802.11b");
|
||||
case WiFiConnectionProtocol::WiFi_Protocol_11g:
|
||||
return F("802.11g");
|
||||
#ifdef ESP8266
|
||||
case WiFiConnectionProtocol::WiFi_Protocol_11n:
|
||||
return F("802.11n");
|
||||
#endif // ifdef ESP8266
|
||||
#ifdef ESP32
|
||||
case WiFiConnectionProtocol::WiFi_Protocol_HT20:
|
||||
return F("802.11n (HT20)");
|
||||
case WiFiConnectionProtocol::WiFi_Protocol_HT40:
|
||||
return F("802.11n (HT40)");
|
||||
case WiFiConnectionProtocol::WiFi_Protocol_HE20:
|
||||
return F("802.11ax (HE20)");
|
||||
# if ESP_IDF_VERSION > ESP_IDF_VERSION_VAL(5, 2, 0)
|
||||
case WiFiConnectionProtocol::WiFi_Protocol_11a:
|
||||
return F("802.11a");
|
||||
case WiFiConnectionProtocol::WiFi_Protocol_VHT20:
|
||||
return F("802.11ac (VHT20)");
|
||||
# endif // if ESP_IDF_VERSION > ESP_IDF_VERSION_VAL(5, 2, 0)
|
||||
case WiFiConnectionProtocol::WiFi_Protocol_LR:
|
||||
return F("802.11lr");
|
||||
|
||||
#endif // ifdef ESP32
|
||||
case WiFiConnectionProtocol::Unknown:
|
||||
break;
|
||||
}
|
||||
return F("-");
|
||||
}
|
||||
|
||||
#endif // ifdef ESP8266
|
||||
|
||||
#ifdef ESP32
|
||||
|
||||
const __FlashStringHelper* toString(WiFiConnectionProtocol proto) {
|
||||
switch (proto)
|
||||
{
|
||||
case WiFiConnectionProtocol::WiFi_Protocol_11b:
|
||||
return F("Wi-Fi 1: 802.11b");
|
||||
case WiFiConnectionProtocol::WiFi_Protocol_11g:
|
||||
return F("Wi-Fi 3: 802.11g");
|
||||
case WiFiConnectionProtocol::WiFi_Protocol_HT20:
|
||||
return F("Wi-Fi 4: 802.11n (HT20)");
|
||||
case WiFiConnectionProtocol::WiFi_Protocol_HT40:
|
||||
return F("Wi-Fi 4: 802.11n (HT40)");
|
||||
# if ESP_IDF_VERSION > ESP_IDF_VERSION_VAL(5, 2, 0)
|
||||
case WiFiConnectionProtocol::WiFi_Protocol_11a:
|
||||
return F("Wi-Fi 2: 802.11a");
|
||||
case WiFiConnectionProtocol::WiFi_Protocol_VHT20:
|
||||
return F("Wi-Fi 5: 802.11ac (VHT20)");
|
||||
# endif // if ESP_IDF_VERSION > ESP_IDF_VERSION_VAL(5, 2, 0)
|
||||
case WiFiConnectionProtocol::WiFi_Protocol_HE20:
|
||||
return F("Wi-Fi 6: 802.11ax (HE20)");
|
||||
case WiFiConnectionProtocol::WiFi_Protocol_LR:
|
||||
return F("802.11lr");
|
||||
|
||||
case WiFiConnectionProtocol::Unknown:
|
||||
break;
|
||||
}
|
||||
return F("-");
|
||||
}
|
||||
|
||||
#endif // ifdef ESP32
|
||||
|
||||
@@ -3,28 +3,38 @@
|
||||
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
#ifdef ESP8266
|
||||
|
||||
enum class WiFiConnectionProtocol {
|
||||
Unknown,
|
||||
WiFi_Protocol_11b,
|
||||
WiFi_Protocol_11g,
|
||||
#ifdef ESP8266
|
||||
WiFi_Protocol_11n
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef ESP32
|
||||
|
||||
enum class WiFiConnectionProtocol {
|
||||
Unknown,
|
||||
WiFi_Protocol_11b,
|
||||
WiFi_Protocol_11g,
|
||||
WiFi_Protocol_HT20,
|
||||
WiFi_Protocol_HT40,
|
||||
WiFi_Protocol_HE20, // WiFi 6
|
||||
# if ESP_IDF_VERSION > ESP_IDF_VERSION_VAL(5, \
|
||||
2, \
|
||||
0)
|
||||
WiFi_Protocol_11a, // traditional (old) 5 GHz
|
||||
WiFi_Protocol_VHT20, // 5 GHz WiFi 5, 802.11ac
|
||||
# endif // if ESP_IDF_VERSION > ESP_IDF_VERSION_VAL(5, 2, 0)
|
||||
WiFi_Protocol_HE20, // WiFi 6
|
||||
WiFi_Protocol_LR
|
||||
#endif // ifdef ESP32
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
const __FlashStringHelper* toString(WiFiConnectionProtocol proto);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user