Added compiler.warning_flags to platform.txt; fixing #6118 (#6596)

Summary

Added compiler.warning_flags to all chips in platform.txt to reflect users setting of warning level output during compilation (set up in Arduino IDE preferences)

Impact

When a warning is set to none the compilation will no longer display warnings

Related links

Solves issue #6118
This commit is contained in:
Tomáš Pilný
2022-05-09 22:17:12 +02:00
committed by GitHub
parent d302091267
commit ca77502ceb
27 changed files with 198 additions and 139 deletions

View File

@ -36,6 +36,7 @@ void sysProvEvent(arduino_event_t *sys_event)
printQR(service_name, pop, "ble");
#endif
break;
default:;
}
}

View File

@ -50,6 +50,7 @@ void sysProvEvent(arduino_event_t *sys_event)
Serial.printf("\nConnected to Wi-Fi!\n");
digitalWrite(gpio_led, true);
break;
default:;
}
}

View File

@ -35,6 +35,7 @@ void sysProvEvent(arduino_event_t *sys_event)
printQR(service_name, pop, "ble");
#endif
break;
default:;
}
}

View File

@ -0,0 +1,21 @@
#include "RMakerQR.h"
#ifdef CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK
void printQR(const char *name, const char *pop, const char *transport)
{
if (!name || !pop || !transport) {
log_w("Cannot generate QR code payload. Data missing.");
return;
}
char payload[150];
snprintf(payload, sizeof(payload), "{\"ver\":\"%s\",\"name\":\"%s\"" \
",\"pop\":\"%s\",\"transport\":\"%s\"}",
PROV_QR_VERSION, name, pop, transport);
if(Serial){
Serial.printf("Scan this QR code from the ESP RainMaker phone app.\n");
}
qrcode_display(payload);
if(Serial){
Serial.printf("If QR code is not visible, copy paste the below URL in a browser.\n%s?data=%s\n", QRCODE_BASE_URL, payload);
}
}
#endif

View File

@ -14,24 +14,12 @@
#pragma once
#include "sdkconfig.h"
#ifdef CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK
#include "RMaker.h"
#include "esp_system.h"
#include <qrcode.h>
#define PROV_QR_VERSION "v1"
#define QRCODE_BASE_URL "https://rainmaker.espressif.com/qrcode.html"
static void printQR(const char *name, const char *pop, const char *transport)
{
if (!name || !pop || !transport) {
log_w("Cannot generate QR code payload. Data missing.");
return;
}
char payload[150];
snprintf(payload, sizeof(payload), "{\"ver\":\"%s\",\"name\":\"%s\"" \
",\"pop\":\"%s\",\"transport\":\"%s\"}",
PROV_QR_VERSION, name, pop, transport);
Serial.printf("Scan this QR code from the ESP RainMaker phone app.\n");
qrcode_display(payload);
Serial.printf("If QR code is not visible, copy paste the below URL in a browser.\n%s?data=%s\n", QRCODE_BASE_URL, payload);
}
void printQR(const char *name, const char *pop, const char *transport);
#endif

View File

@ -0,0 +1,12 @@
#include "RMakerUtils.h"
#ifdef CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK
void RMakerFactoryReset(int seconds)
{
esp_rmaker_factory_reset(0, seconds);
}
void RMakerWiFiReset(int seconds)
{
esp_rmaker_wifi_reset(0, seconds);
}
#endif

View File

@ -14,16 +14,10 @@
#pragma once
#include "sdkconfig.h"
#ifdef CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK
#include "RMaker.h"
#include "esp_system.h"
#include <esp_rmaker_utils.h>
static void RMakerFactoryReset(int seconds)
{
esp_rmaker_factory_reset(0, seconds);
}
static void RMakerWiFiReset(int seconds)
{
esp_rmaker_wifi_reset(0, seconds);
}
void RMakerFactoryReset(int seconds);
void RMakerWiFiReset(int seconds);
#endif