Merge pull request #64 from loredan/master

Auto-include version number when building firmware from source #featureadd
This commit is contained in:
Alan Weinstock 2020-01-16 22:47:31 -08:00 committed by GitHub
commit ca0669d7df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 4 deletions

View file

@ -32,7 +32,7 @@ board = ATmega88P
framework = arduino framework = arduino
lib_deps = Arduino lib_deps = Arduino
build_flags = build_flags = !python version_git.py
; --verbose ; --verbose
upload_protocol = arduino upload_protocol = arduino
@ -58,7 +58,7 @@ board = ATmega328PB
framework = arduino framework = arduino
lib_deps = Arduino lib_deps = Arduino
build_flags = build_flags = !python version_git.py
; --verbose ; --verbose
upload_protocol = arduino upload_protocol = arduino

View file

@ -84,8 +84,6 @@ update the voltMeterConstant variable in pP_config.h with the correct value
------------------------------------------------------------*/ ------------------------------------------------------------*/
#define PP_VERSION "2.2.1_1ed670"
/* Debug output verbose mode will continuously output sensor readings /* Debug output verbose mode will continuously output sensor readings
rather than waiting for user input */ rather than waiting for user input */
#define VERBOSE true #define VERBOSE true

View file

@ -0,0 +1,4 @@
import subprocess
major_version = "2.2.1"
print("-DPP_VERSION=\\\"" + major_version + "_" + subprocess.check_output(["git", "rev-parse", "HEAD"])[0:6] + "\\\"")