File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change 3030#define STRHELPER (x ) #x
3131#define STR (x ) STRHELPER(x) // stringifier
3232
33- #define INFLUXDB_CLIENT_USER_AGENT " influxdb-client-arduino/" INFLUXDB_CLIENT_VERSION
34-
3533#if defined(ESP8266)
3634# define INFLUXDB_CLIENT_PLATFORM " ESP8266"
3735# define INFLUXDB_CLIENT_PLATFORM_VERSION STR (ARDUINO_ESP8266_GIT_DESC)
4038# define INFLUXDB_CLIENT_PLATFORM_VERSION STR (ARDUINO_ESP32_GIT_DESC)
4139#endif
4240
41+ static const char UserAgent[] PROGMEM = " influxdb-client-arduino/" INFLUXDB_CLIENT_VERSION " (" INFLUXDB_CLIENT_PLATFORM " " INFLUXDB_CLIENT_PLATFORM_VERSION " )" ;
4342
4443// Uncomment bellow in case of a problem and rebuild sketch
4544// #define INFLUXDB_CLIENT_DEBUG
@@ -222,8 +221,7 @@ bool InfluxDBClient::init() {
222221 }
223222 _httpClient.setReuse (false );
224223
225- String userAgent (INFLUXDB_CLIENT_USER_AGENT " (" INFLUXDB_CLIENT_PLATFORM " " INFLUXDB_CLIENT_PLATFORM_VERSION " )" );
226- _httpClient.setUserAgent (userAgent);
224+ _httpClient.setUserAgent (UserAgent);
227225 return true ;
228226}
229227
You can’t perform that action at this time.
0 commit comments