[CODE] add build info (git commit) to info line

This commit is contained in:
Jannik Beyerstedt 2019-04-07 16:15:43 +02:00
parent c142d68876
commit dfd592fc37
3 changed files with 14 additions and 5 deletions

4
.gitignore vendored
View File

@ -6,3 +6,7 @@ components/
# KiCAD EDA
*.bak
*.kicad_pcb-bak
# VS Code
.vscode/arduino.json
.vscode/c_cpp_properties.json

View File

@ -3,3 +3,6 @@
#
# (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.)
PROJ_GIT_VER := $(shell git describe --always --tags --dirty)
CPPFLAGS += -D PROJ_VER=\"$(PROJ_GIT_VER)\"

View File

@ -28,7 +28,7 @@
#endif
#ifndef BOARD
#define BOARD 0 /* IMPORTANT: select one of the BOARD_* types */
#define BOARD 4 /* IMPORTANT: select one of the BOARD_* types */
#endif
#define DB_HOSTNAME "ursaminor.fra80"
@ -176,12 +176,14 @@ extern "C" void app_main() {
delay(100);
Serial.println("");
Serial.print("[INFO ] Node ");
Serial.print("[INFO ] Type ");
Serial.print(BOARD);
Serial.print(", Node: ");
Serial.print(loggerId);
Serial.print(", Name: ");
Serial.print(" (");
Serial.print(loggerName);
Serial.print(", BoardType: ");
Serial.println(BOARD);
Serial.print("), Build: ");
Serial.println(PROJ_VER);
#endif
#ifdef PRINT_DEBUG
printWakeupReason();