From f3ebfa9bfe05050f5cf498e5e4d68003f79f5ccd Mon Sep 17 00:00:00 2001 From: Nathaniel Wesley Filardo Date: Tue, 13 Mar 2018 19:34:42 -0400 Subject: [PATCH] user_version.h: use ESP_SDK* constants Derive NODE_VERSION by concatenating string constants. --- app/include/user_version.h | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/app/include/user_version.h b/app/include/user_version.h index 9e75bf6e..f8ba27db 100644 --- a/app/include/user_version.h +++ b/app/include/user_version.h @@ -1,14 +1,20 @@ #ifndef __USER_VERSION_H__ #define __USER_VERSION_H__ -#define NODE_VERSION_MAJOR 2U -#define NODE_VERSION_MINOR 1U -#define NODE_VERSION_REVISION 0U -#define NODE_VERSION_INTERNAL 0U +#include "version.h" /* ESP firmware header */ + +#define NODE_VERSION_MAJOR ESP_SDK_VERSION_MAJOR +#define NODE_VERSION_MINOR ESP_SDK_VERSION_MINOR +#define NODE_VERSION_REVISION ESP_SDK_VERSION_PATCH +#define NODE_VERSION_INTERNAL 0 + +#define NODE_VERSION_STR(x) #x +#define NODE_VERSION_XSTR(x) NODE_VERSION_STR(x) + +#define NODE_VERSION "NodeMCU " ESP_SDK_VERSION_STRING "." NODE_VERSION_XSTR(NODE_VERSION_INTERNAL) -#define NODE_VERSION "NodeMCU 2.1.0" #ifndef BUILD_DATE -#define BUILD_DATE "unspecified" +#define BUILD_DATE "unspecified" #endif extern char SDK_VERSION[];