Quellcode durchsuchen

user_version.h: use ESP_SDK* constants

Derive NODE_VERSION by concatenating string constants.
Nathaniel Wesley Filardo vor 6 Jahren
Ursprung
Commit
f3ebfa9bfe
1 geänderte Dateien mit 12 neuen und 6 gelöschten Zeilen
  1. 12 6
      app/include/user_version.h

+ 12 - 6
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[];