Skip to content

Commit ab0cbb1

Browse files
authored
Merge pull request #211 from gasagna/core_version_fix
fix for issue #183
2 parents be7458c + 59b39c9 commit ab0cbb1

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/Platform.h

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
#ifndef _PLATFORM_H_
22
#define _PLATFORM_H_
33

4-
#include <core_version.h>
5-
64
#define STRHELPER(x) #x
75
#define STR(x) STRHELPER(x) // stringifier
86

7+
// form version string
8+
#define VERSION_STR(MAJOR, MINOR, PATCH) STR(MAJOR) "." STR(MINOR) "." STR(PATCH)
9+
910
#if defined(ESP8266)
11+
# include <core_version.h>
1012
# define INFLUXDB_CLIENT_PLATFORM "ESP8266"
1113
# define INFLUXDB_CLIENT_PLATFORM_VERSION STR(ARDUINO_ESP8266_GIT_DESC)
1214
#elif defined(ESP32)
15+
# include <esp_arduino_version.h>
1316
# 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)
1518
#endif
1619

17-
#endif //_PLATFORM_H_
20+
#endif //_PLATFORM_H_

0 commit comments

Comments
 (0)