File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 1
1
#ifndef _PLATFORM_H_
2
2
#define _PLATFORM_H_
3
3
4
- #include <core_version.h>
5
-
6
4
#define STRHELPER (x ) #x
7
5
#define STR (x ) STRHELPER(x) // stringifier
8
6
7
+ // form version string
8
+ #define VERSION_STR (MAJOR , MINOR , PATCH ) STR(MAJOR) "." STR(MINOR) "." STR(PATCH)
9
+
9
10
#if defined(ESP8266 )
11
+ # include <core_version.h>
10
12
# define INFLUXDB_CLIENT_PLATFORM "ESP8266"
11
13
# define INFLUXDB_CLIENT_PLATFORM_VERSION STR(ARDUINO_ESP8266_GIT_DESC)
12
14
#elif defined(ESP32 )
15
+ # include <esp_arduino_version.h>
13
16
# define INFLUXDB_CLIENT_PLATFORM "ESP32"
14
- # define INFLUXDB_CLIENT_PLATFORM_VERSION STR(ARDUINO_ESP32_GIT_DESC )
17
+ # define INFLUXDB_CLIENT_PLATFORM_VERSION VERSION_STR(ESP_ARDUINO_VERSION_MAJOR, ESP_ARDUINO_VERSION_MINOR, ESP_ARDUINO_VERSION_PATCH )
15
18
#endif
16
19
17
- #endif //_PLATFORM_H_
20
+ #endif //_PLATFORM_H_
You can’t perform that action at this time.
0 commit comments