esp8266: do not use FlashStringHelper
This commit is contained in:
Родитель
7a2350fdfc
Коммит
374fc147a6
|
@ -17,15 +17,4 @@ int mqtt_publish(IOTContextInternal *internal, const char* topic, unsigned long
|
|||
return 0;
|
||||
}
|
||||
|
||||
void IOTC_LOG(const __FlashStringHelper *format, ...) {
|
||||
if (getLogLevel() > IOTC_LOGGING_DISABLED) {
|
||||
va_list ap;
|
||||
va_start(ap, format);
|
||||
AzureIOT::StringBuffer buffer(STRING_BUFFER_1024);
|
||||
buffer.setLength(vsnprintf(*buffer, STRING_BUFFER_1024, (const char *)format, ap));
|
||||
Serial.println(*buffer);
|
||||
va_end(ap);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // defined(ARDUINO) && defined(USE_LIGHT_CLIENT)
|
||||
|
|
|
@ -148,14 +148,14 @@ int mqtt_publish(IOTContextInternal *internal, const char* topic, unsigned long
|
|||
const char* msg, unsigned long msg_length);
|
||||
|
||||
#ifdef ARDUINO
|
||||
void IOTC_LOG(const __FlashStringHelper *format, ...);
|
||||
#else
|
||||
#define IOTC_LOG(...) \
|
||||
if (getLogLevel() > IOTC_LOGGING_DISABLED) { \
|
||||
printf(" - "); \
|
||||
printf(__VA_ARGS__); \
|
||||
printf("\r\n"); \
|
||||
Serial.printf(" - "); \
|
||||
Serial.printf(__VA_ARGS__); \
|
||||
Serial.printf("\r\n"); \
|
||||
}
|
||||
#undef F
|
||||
#define F(x) x
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
Загрузка…
Ссылка в новой задаче