summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitattributes15
-rw-r--r--.gitconfig5
-rw-r--r--.idea/codeStyles/Project.xml22
-rw-r--r--CONTRIBUTING.md33
-rw-r--r--bootloader/ota-dfu-python/unpacker.py2
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/libs/mynewt-nimble/nimble/host/pts/tpg/94654-20170317-085122560.tpg4
-rw-r--r--src/libs/mynewt-nimble/nimble/host/pts/tpg/94654-20170317-085441153.pts2
8 files changed, 79 insertions, 6 deletions
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 00000000..2257cac4
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,15 @@
+# Set the default behavior, in case people don't have core.autocrlf set.
+* text=auto
+
+# Explicitly declare text files you want to always be normalized and converted
+# to native line endings on checkout.
+*.c text
+*.cpp text
+*.h text
+*.hpp text
+
+# Denote all files that are truly binary and should not be modified.
+*.png binary
+*.bin binary
+*.jpg binary
+*.jpeg binary
diff --git a/.gitconfig b/.gitconfig
new file mode 100644
index 00000000..b2274475
--- /dev/null
+++ b/.gitconfig
@@ -0,0 +1,5 @@
+[core]
+ whitespace = blank-at-eol,blank-at-eof,space-before-tab
+ autocrlf = input
+[apply]
+ whitespace = fix
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
index 7bdfbcb1..33a4a045 100644
--- a/.idea/codeStyles/Project.xml
+++ b/.idea/codeStyles/Project.xml
@@ -8,10 +8,30 @@
<option name="INDENT_DIRECTIVE_AS_CODE" value="true" />
<option name="SPACE_BEFORE_TEMPLATE_DECLARATION_LT" value="true" />
<option name="SPACE_BEFORE_POINTER_IN_DECLARATION" value="false" />
- <option name="SPACE_AFTER_POINTER_IN_DECLARATION" value="true" />
+ <!-- Disabled until clang-format can do it <option name="SPACE_AFTER_POINTER_IN_DECLARATION" value="true" /> -->
<option name="SPACE_BEFORE_REFERENCE_IN_DECLARATION" value="false" />
<option name="SPACE_AFTER_REFERENCE_IN_DECLARATION" value="true" />
</Objective-C>
+ <Objective-C-extensions>
+ <rules>
+ <rule entity="NAMESPACE" visibility="ANY" specifier="ANY" prefix="" style="PASCAL_CASE" suffix="" />
+ <rule entity="MACRO" visibility="ANY" specifier="ANY" prefix="" style="SCREAMING_SNAKE_CASE" suffix="" />
+ <rule entity="CLASS" visibility="ANY" specifier="ANY" prefix="" style="PASCAL_CASE" suffix="" />
+ <rule entity="STRUCT" visibility="ANY" specifier="ANY" prefix="" style="CAMEL_CASE" suffix="" />
+ <rule entity="ENUM" visibility="ANY" specifier="ANY" prefix="" style="PASCAL_CASE" suffix="" />
+ <rule entity="ENUMERATOR" visibility="ANY" specifier="ANY" prefix="" style="PASCAL_CASE" suffix="" />
+ <rule entity="TYPEDEF" visibility="ANY" specifier="ANY" prefix="" style="CAMEL_CASE" suffix="" />
+ <rule entity="UNION" visibility="ANY" specifier="ANY" prefix="" style="CAMEL_CASE" suffix="" />
+ <rule entity="CLASS_MEMBER_FUNCTION" visibility="ANY" specifier="ANY" prefix="" style="PASCAL_CASE" suffix="" />
+ <rule entity="STRUCT_MEMBER_FUNCTION" visibility="ANY" specifier="ANY" prefix="" style="CAMEL_CASE" suffix="" />
+ <rule entity="CLASS_MEMBER_FIELD" visibility="ANY" specifier="ANY" prefix="" style="CAMEL_CASE" suffix="" />
+ <rule entity="STRUCT_MEMBER_FIELD" visibility="ANY" specifier="ANY" prefix="" style="CAMEL_CASE" suffix="" />
+ <rule entity="GLOBAL_FUNCTION" visibility="ANY" specifier="ANY" prefix="" style="PASCAL_CASE" suffix="" />
+ <rule entity="GLOBAL_VARIABLE" visibility="ANY" specifier="ANY" prefix="" style="CAMEL_CASE" suffix="" />
+ <rule entity="PARAMETER" visibility="ANY" specifier="ANY" prefix="" style="CAMEL_CASE" suffix="" />
+ <rule entity="LOCAL_VARIABLE" visibility="ANY" specifier="ANY" prefix="" style="CAMEL_CASE" suffix="" />
+ </rules>
+ </Objective-C-extensions>
<codeStyleSettings language="ObjectiveC">
<option name="RIGHT_MARGIN" value="140" />
<option name="IF_BRACE_FORCE" value="3" />
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 00000000..a6fa6828
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,33 @@
+This contribution guide is in progress, improvements are welcome.
+
+### Code style
+
+Any C++ code PRs should aim to follow the style of existing code in the project.
+
+Using an autoformatter is heavily recommended, but make sure it's configured properly.
+
+There's currently preconfigured autoformatter rules for:
+
+ * CLion (IntelliJ) in .idea/codeStyles/Project.xml
+
+You can use those to configure your own IDE if it's not already on the list.
+
+#### Linting errors and compiler warnings
+
+Try to avoid any currently enabled warnings and try to reduce the amount of linter errors.
+
+#### Spelling
+
+Make sure you spellcheck your code before commiting it.
+
+#### TODO, FIXME
+
+Check before commiting that you haven't forgotten anything, preferably don't leave these in your commits.
+
+#### Licence headers
+
+You should add your name to the comma-space separated list of contributors if there's a license header.
+
+### License
+
+By contributing you agree to licence your code under the repository's general license (which is currently GPL-v3+).
diff --git a/bootloader/ota-dfu-python/unpacker.py b/bootloader/ota-dfu-python/unpacker.py
index 960ef9de..ab2ecbc5 100644
--- a/bootloader/ota-dfu-python/unpacker.py
+++ b/bootloader/ota-dfu-python/unpacker.py
@@ -13,7 +13,7 @@ class Unpacker(object):
#
#--------------------------------------------------------------------------
def entropy(self, length):
- return ''.join(random.choice('abcdefghijklmnopqrstuvwxyz') for i in range (length))
+ return ''.join(random.choice('abcdefghijklmnopqrstuvwxyz') for i in range (length))
#--------------------------------------------------------------------------
#
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 5955d393..4580609a 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -610,7 +610,7 @@ include_directories(
"${NRF5_SDK_PATH}/modules/nrfx/drivers/include"
"${NRF5_SDK_PATH}/modules/nrfx/hal"
"${NRF5_SDK_PATH}/modules/nrfx/mdk"
- ${NRF5_SDK_PATH}/external/freertos/source/include
+ "${NRF5_SDK_PATH}/external/freertos/source/include"
"${NRF5_SDK_PATH}/components/toolchain/cmsis/include"
"${NRF5_SDK_PATH}/components/libraries/atomic"
"${NRF5_SDK_PATH}/components/libraries/atomic_fifo"
diff --git a/src/libs/mynewt-nimble/nimble/host/pts/tpg/94654-20170317-085122560.tpg b/src/libs/mynewt-nimble/nimble/host/pts/tpg/94654-20170317-085122560.tpg
index f5bb0ce9..3cc985fa 100644
--- a/src/libs/mynewt-nimble/nimble/host/pts/tpg/94654-20170317-085122560.tpg
+++ b/src/libs/mynewt-nimble/nimble/host/pts/tpg/94654-20170317-085122560.tpg
@@ -1,4 +1,4 @@
-<!-- START ENCRYPTED FILE --->
+<!-- START ENCRYPTED FILE --->
M'&/JP\$+#X83?)"[ M2E=\N*7*U 5)JSKT(5#=>@^/#]IP*[GTZ0%0]$F(/$
MEK[V7>349??;!JZJNFZ CK=QGD^FOYV^FU>"DK<@0U*##HV\H9&_%["5IK@1
MA9F,FJO2P^3:4_]04%-0T%9=^XCMWKF"L$[)%)G>_I 0Q?@:H)&1HX)7VY&.
@@ -1023,4 +1023,4 @@ M<74&Z:0BS4[#$;M2_1""EZVO@$B^"0'V'W:7^@-<RY.=,$D<>]G?*\B>0M(-
M6MF1FM+ ?,?3[N*1EI"$AXF#@6P-FU/4\QF?O!&%CE5*6J2'@QDYV?_04-O)
M7Z 6N;C7E_4<F/8XVG7AJ7J1LH.IECZ6%G $HMQ2FZX'!S+=;-"'3%ZWD\!W
L@U91N$5;H(.IY7/\[ +<DK:=41RCLZB8DY:;7E]*"<<2\\K1C(F(AZJX39
-<!-- END ENCRYPTED FILE --->
+<!-- END ENCRYPTED FILE --->
diff --git a/src/libs/mynewt-nimble/nimble/host/pts/tpg/94654-20170317-085441153.pts b/src/libs/mynewt-nimble/nimble/host/pts/tpg/94654-20170317-085441153.pts
index 92507b13..6760d5ec 100644
--- a/src/libs/mynewt-nimble/nimble/host/pts/tpg/94654-20170317-085441153.pts
+++ b/src/libs/mynewt-nimble/nimble/host/pts/tpg/94654-20170317-085441153.pts
@@ -286,4 +286,4 @@
<item><table>7</table><row>3</row></item>
</profile>
</pics>
- </project>
+ </project>