Странное предупреждение при использовании ESP32 в PlatformIO - PullRequest
0 голосов
/ 07 ноября 2019

При попытке компилировать приведенный ниже код я получаю странное предупреждение. Я думаю, что это предупреждение относится только к PlatformIO, поскольку оно не отображается в Arduino IDE. предупреждение появляется после строки.

Компиляция .pio \ build \ esp32dev \ FrameworkArduino \ Esp.cpp.o

Насколько серьезно это предупреждение?

Код ESP32:

#include <Arduino.h>
#include "BluetoothSerial.h"
#include <WiFi.h>
#include <EEPROM.h>

BluetoothSerial SerialBT;


//const char* ssid = "INOMETRICS";
const char *passd =  "Innnnnnnnnnnnnometrics#";

void WiFiConfig() {

  char buffer[60];
  //strcpy_P(buffer, SSID_MEM);
  Serial.println(buffer);

  while (!SerialBT.available());       //Wait for config
  String ssid = SerialBT.readString(); 
  Serial.println(ssid);                //Debugging 
  Serial.println("SSID Received!");

  while (!SerialBT.available());       //Wait for config
  String pass = SerialBT.readString(); 
  Serial.println(pass);                //Debugging
  Serial.println("Password Received!");

  WiFi.begin((const char*)ssid.c_str(), (const char*)pass.c_str());                //Connect to Router

  while (WiFi.status() != WL_CONNECTED) {

    delay(1000);
    Serial.println("Establishing connection to WiFi..");

  }
  int len = strlen(passd);
  Serial.println(len);
}


void setup() {

  EEPROM.begin(512);
  Serial.begin(115200);
  SerialBT.begin("ESP32_INO"); 
  Serial.println("The device started, now you can pair it with bluetooth!");

  WiFiConfig();

  Serial.println("Connected to network");
  Serial.println(WiFi.macAddress());
  Serial.println(WiFi.localIP());        
}

void loop() {

  }

Предупреждения:

C:\.platformio\packages\framework-arduinoespressif32\libraries\BluetoothSerial\src\BluetoothSerial.cpp: In function 'void esp_bt_gap_cb(esp_bt_gap_cb_event_t, esp_bt_gap_cb_param_t*)':
C:\.platformio\packages\framework-arduinoespressif32\libraries\BluetoothSerial\src\BluetoothSerial.cpp:328:18: warning: unused variable
'bda_str' [-Wunused-variable]
             char bda_str[18];
                  ^
C:\.platformio\packages\framework-arduinoespressif32\libraries\BluetoothSerial\src\BluetoothSerial.cpp: At global scope:
C:\.platformio\packages\framework-arduinoespressif32\libraries\BluetoothSerial\src\BluetoothSerial.cpp:79:14: warning: 'char* bda2str(uint8_t*, char*, size_t)' defined but not used [-Wunused-function]
 static char *bda2str(esp_bd_addr_t bda, char *str, size_t size)
...