github: add LOLIN-C3-mini compatibility

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
This commit is contained in:
Álvaro Fernández Rojas 2023-05-31 13:17:31 +02:00
parent 3ee5bb45c8
commit a048e77d71
2 changed files with 6 additions and 1 deletions

View file

@ -61,6 +61,11 @@ jobs:
flash_size: 4MB
fqbn: esp32:esp32:esp32
name: ESP32
- board: lolin_c3_mini
chip: ESP32-C3
flash_size: 4MB
fqbn: esp32:esp32:lolin_c3_mini
name: LOLIN-C3-mini
- board: lolin_s2_mini
chip: ESP32-S2
flash_size: 4MB

View file

@ -329,7 +329,7 @@ uint32_t Network::getChipId() {
return chipId;
}
int Network::getStrengthBySSID(const char *ssid) {
int strength = -100;
int32_t strength = -100;
int n = WiFi.scanNetworks(false, true);
for(int i = 0; i < n; i++) {
if(WiFi.SSID(i).compareTo(ssid) == 0) strength = max(WiFi.RSSI(i), strength);