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 30
30
#define STRHELPER (x ) #x
31
31
#define STR (x ) STRHELPER(x) // stringifier
32
32
33
- #define INFLUXDB_CLIENT_USER_AGENT " influxdb-client-arduino/" INFLUXDB_CLIENT_VERSION
34
-
35
33
#if defined(ESP8266)
36
34
# define INFLUXDB_CLIENT_PLATFORM " ESP8266"
37
35
# define INFLUXDB_CLIENT_PLATFORM_VERSION STR (ARDUINO_ESP8266_GIT_DESC)
40
38
# define INFLUXDB_CLIENT_PLATFORM_VERSION STR (ARDUINO_ESP32_GIT_DESC)
41
39
#endif
42
40
41
+ static const char UserAgent[] PROGMEM = " influxdb-client-arduino/" INFLUXDB_CLIENT_VERSION " (" INFLUXDB_CLIENT_PLATFORM " " INFLUXDB_CLIENT_PLATFORM_VERSION " )" ;
43
42
44
43
// Uncomment bellow in case of a problem and rebuild sketch
45
44
// #define INFLUXDB_CLIENT_DEBUG
@@ -222,8 +221,7 @@ bool InfluxDBClient::init() {
222
221
}
223
222
_httpClient.setReuse (false );
224
223
225
- String userAgent (INFLUXDB_CLIENT_USER_AGENT " (" INFLUXDB_CLIENT_PLATFORM " " INFLUXDB_CLIENT_PLATFORM_VERSION " )" );
226
- _httpClient.setUserAgent (userAgent);
224
+ _httpClient.setUserAgent (UserAgent);
227
225
return true ;
228
226
}
229
227
You can’t perform that action at this time.
0 commit comments