Properly allocate string and remove warning (#2652)
* Properly allocate string and remove warning The former way generates the following warning: ISO C++ forbids converting a string constant to 'char*' This change makes a character array the size of the string with null ending. It's clearer and gets rid of the warning. * Better way Since this is technically immutable, the type should reflect this too.
This commit is contained in:
parent
25c0b52212
commit
14126060a1
@ -51,7 +51,7 @@ void InitESPNow() {
|
||||
|
||||
// config AP SSID
|
||||
void configDeviceAP() {
|
||||
char* SSID = "Slave_1";
|
||||
const char *SSID = "Slave_1";
|
||||
bool result = WiFi.softAP(SSID, "Slave_1_Password", CHANNEL, 0);
|
||||
if (!result) {
|
||||
Serial.println("AP Config failed.");
|
||||
|
Loading…
Reference in New Issue
Block a user