Git commit ID added to stamp

Fixes #2921: getValue() now also returns pilot position
Fixes #3062: Close any Lua open files when radio powers off
Fixes #3095: Lua string library added (only 6k bytes of flash used)
Re #3095: luaGetVersion() also returns version as numbers
(Ported from master 7ef790d3..4d0bd14ad and squashed into one commit)
This commit is contained in:
Damjan Adamic
2015-11-25 18:00:44 +01:00
parent 7e6dc610ac
commit 7538fcfb51
11 changed files with 87 additions and 41 deletions
+12
View File
@@ -24,3 +24,15 @@ MACRO (NOW RESULT)
ENDIF (WIN32)
ENDMACRO (NOW)
MACRO (GIT_ID RESULT)
IF (WIN32)
EXECUTE_PROCESS(COMMAND "cmd" " /C git rev-parse HEAD" OUTPUT_VARIABLE ${RESULT})
string(REGEX REPLACE "(..):(..).*" "\\1:\\2:00" ${RESULT} ${${RESULT}})
ELSEIF(UNIX)
EXECUTE_PROCESS(COMMAND "git" "rev-parse" "HEAD" OUTPUT_VARIABLE ${RESULT})
string(REGEX REPLACE "(.*)\n" "\\1" ${RESULT} ${${RESULT}})
ELSE (WIN32)
MESSAGE(SEND_ERROR "Git ID implemented")
SET(${RESULT} 0)
ENDIF (WIN32)
ENDMACRO (GIT_ID)
@@ -70,6 +70,7 @@ add_custom_target(firmware_translations DEPENDS ${translations_files})
TODAY(DATE)
NOW(TIME)
GIT_ID(GIT_STR)
configure_file(${RADIO_SRC_DIRECTORY}/stamp.h.in ${RADIO_SRC_DIRECTORY}/stamp.h @ONLY)
@@ -422,6 +422,7 @@ namespace NAMESPACE {
#include "radio/src/thirdparty/Lua/src/ltablib.c"
#include "radio/src/thirdparty/Lua/src/lcorolib.c"
#include "radio/src/thirdparty/Lua/src/liolib.c"
#include "radio/src/thirdparty/Lua/src/lstrlib.c"
#endif
int16_t g_anas[NUM_STICKS+NUM_POTS];