Skip to content

Commit e4d9636

Browse files
committed
Merge branch 'develop' into new_touch_handler
2 parents d666c50 + a25ce5d commit e4d9636

4 files changed

Lines changed: 31 additions & 5 deletions

File tree

CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ if (NOT NRF5_SDK_PATH)
2121
message(FATAL_ERROR "The path to the NRF52 SDK must be specified on the command line (add -DNRF5_SDK_PATH=<path>")
2222
endif ()
2323

24-
if(NOT USE_JLINK AND NOT USE_GDB_CLIENT AND NOT USE_OPENOCD)
25-
set(USE_JLINK true)
26-
endif()
27-
2824
if(USE_JLINK)
2925
if (NOT NRFJPROG)
3026
message(FATAL_ERROR "the path to the tool nrfjprog must be specified on the command line (add -DNRFJPROG=<path>")

hooks/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Git hooks
2+
3+
This directory contains Git hooks that simplify contributing to this repository.
4+
5+
You can install them by copying the files into `.git/hooks` in the repository folder or by running `git config --local core.hooksPath hooks`

hooks/pre-commit

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
if clang-format --version | grep -q 'version 11\.'; then
3+
CLANG_FORMAT_EXECUTABLE="clang-format"
4+
else
5+
CLANG_FORMAT_EXECUTABLE="clang-format-11"
6+
fi
7+
8+
if ! command -v $CLANG_FORMAT_EXECUTABLE &> /dev/null
9+
then
10+
echo $CLANG_FORMAT_EXECUTABLE does not exist, make sure to install it
11+
exit 1
12+
fi
13+
14+
for FILE in $(git diff --cached --name-only)
15+
do
16+
if [[ "$FILE" =~ src/[A-Za-z0-9\ \-]+*\.(c|h|cpp|cc)$ ]]; then
17+
echo Autoformatting $FILE with $CLANG_FORMAT_EXECUTABLE
18+
$CLANG_FORMAT_EXECUTABLE -style=file -i -- $FILE
19+
git add -- $FILE
20+
elif [[ "$FILE" =~ src/(components|displayapp|drivers|heartratetask|logging|systemtask)/.*\.(c|h|cpp|cc)$ ]]; then
21+
echo Autoformatting $FILE with $CLANG_FORMAT_EXECUTABLE
22+
$CLANG_FORMAT_EXECUTABLE -style=file -i -- $FILE
23+
git add -- $FILE
24+
fi
25+
done

src/displayapp/screens/FlashLight.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,5 @@ bool FlashLight::Refresh() {
7070
}
7171

7272
bool FlashLight::OnTouchEvent(Pinetime::Applications::TouchEvents event) {
73-
return true;
73+
return false;
7474
}

0 commit comments

Comments
 (0)