summaryrefslogtreecommitdiff
path: root/robot
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-05-10 13:20:42 +0200
committerlonkaars <loek@pipeframe.xyz>2022-05-10 13:20:42 +0200
commitaaf6d7963314c1fcb86b84442cd3d960bc87297b (patch)
treee5f686eb9f2dbffe0cb0c7ce0d2800002b66d637 /robot
parentbd702f9ddc6a309397f22309f07390b615aab766 (diff)
added clang-tidy to make format
Diffstat (limited to 'robot')
-rw-r--r--robot/consts.h4
-rw-r--r--robot/makefile3
2 files changed, 4 insertions, 3 deletions
diff --git a/robot/consts.h b/robot/consts.h
index 6530528..1195422 100644
--- a/robot/consts.h
+++ b/robot/consts.h
@@ -1,8 +1,8 @@
#pragma once
-#ifndef BUILD_STR
+#ifndef W2_BUILD_STR
// should be defined with -DBUILD_STR in makefile
-#define BUILD_STR ("????????")
+#define W2_BUILD_STR ("????????")
#endif
#define W2_MAX_MODULE_CYCLE_MS (20)
diff --git a/robot/makefile b/robot/makefile
index 8ddcb28..598e0fa 100644
--- a/robot/makefile
+++ b/robot/makefile
@@ -19,7 +19,7 @@ CC=avr-gcc
OBJ2HEX=avr-objcopy
BUILD_STR=$(shell git update-index -q --refresh; git describe --tags --dirty='*' --broken='x' | cut -c1-20)
-CFLAGS += -DBUILD_STR="$(BUILD_STR)"
+CFLAGS += -DW2_BUILD_STR="$(BUILD_STR)"
all: out.hex
@@ -41,6 +41,7 @@ flash: out.hex
format:
clang-format -i $(SOURCES) $(HEADERS)
+ clang-tidy --fix-errors $(SOURCES) $(HEADERS)
compile_commands: clean
bear -- make