Skip to content

Commit

Permalink
Merge pull request #453 from openxc/signals_version
Browse files Browse the repository at this point in the history
Signals version
  • Loading branch information
pjt0620 committed Jul 1, 2020
2 parents a079b3a + 4cef128 commit 3d32f1a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Makefile
Expand Up @@ -27,6 +27,15 @@ $(error You do not have the necessary openxc-python installed: openxc-python $(T
endif
endif

# Verify signals.cpp version
ifneq ($(wildcard signals.cpp),)
Signals_Version = $(shell grep -Po '(?<=Generated\sfor\sv)\d+\.\S+(?=\sof\sthe\sOpenXC\sVI\sfirmware\.)' signals.cpp)
Firmware_Signals_Version = $(shell grep -Po '(?<=Signals:\s)\d+\.\S+' Versions)
ifneq ($(Signals_Version),$(Firmware_Signals_Version))
$(error You are using an invalid signals.ccp version ($(Signals_Version)), This firmware supports ($(Firmware_Signals_Version)))
endif
endif

COLORS_AVAILABLE = $(shell command -v tput >/dev/null 2>&1; echo $$?)
ifeq ($(COLORS_AVAILABLE),0)
RED="$${txtbld}$$(tput setaf 1)"
Expand Down
1 change: 1 addition & 0 deletions src/Versions
@@ -0,0 +1 @@
Signals: 7.x

0 comments on commit 3d32f1a

Please sign in to comment.