diff --git a/.clang-format b/.clang-format
index 5b8681e..c02cf2f 100644
--- a/.clang-format
+++ b/.clang-format
@@ -14,13 +14,13 @@ AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
-AllowShortEnumsOnASingleLine: true
-AllowShortBlocksOnASingleLine: Always
+AllowShortEnumsOnASingleLine: false
+AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
AllowShortLambdasOnASingleLine: All
-AllowShortIfStatementsOnASingleLine: WithoutElse
-AllowShortLoopsOnASingleLine: true
+AllowShortIfStatementsOnASingleLine: Never
+AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: Yes
@@ -67,10 +67,7 @@ DeriveLineEnding: false
DerivePointerAlignment: false
DisableFormat: false
EmptyLineBeforeAccessModifier: Always
-# ---
-# only in v13+
-# EmptyLineAfterAccessModifier: Leave
-# ---
+EmptyLineAfterAccessModifier: Leave
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
IncludeBlocks: Preserve
@@ -89,10 +86,7 @@ IncludeCategories:
CaseSensitive: false
IncludeIsMainRegex: "(Test)?$"
IncludeIsMainSourceRegex: ""
-# ---
-# only in v13+
-# IndentAccessModifiers: false
-# ---
+IndentAccessModifiers: false
IndentCaseLabels: true
IndentCaseBlocks: false
IndentGotoLabels: false
@@ -117,15 +111,12 @@ PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PenaltyIndentedWhitespace: 0
PointerAlignment: Left
-# ---
-# only in v13+
-# ReferenceAlignment: Right
-# ---
+ReferenceAlignment: Pointer
ReflowComments: true
-# ---
-# only in v13+
-# ShortNamespaceLines: 0
-# ---
+SpacesInLineCommentPrefix:
+ Maximum: -1
+ Minimum: 0
+ShortNamespaceLines: 0
# Sort**** is about sorting include/using statements alphabetically
SortIncludes: false
SortUsingDeclarations: false
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 0000000..05a48fc
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,13 @@
+# To get started with Dependabot version updates, you'll need to specify which
+# package ecosystems to update and where the package manifests are located.
+# Please see the documentation for all configuration options:
+# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
+
+version: 2
+updates:
+ - package-ecosystem: "github-actions"
+ # Workflow files stored in the
+ # default location of `.github/workflows`
+ directory: "/"
+ schedule:
+ interval: "weekly"
diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml
index 924f72a..121c5fc 100644
--- a/.github/workflows/build_linux.yml
+++ b/.github/workflows/build_linux.yml
@@ -2,7 +2,7 @@ name: Linux build
on:
pull_request:
- types: [opened, reopened]
+ branches: [master, v1.x]
paths:
- "*.h"
- "*.cpp"
@@ -12,6 +12,7 @@ on:
- "!**Makefile" # old build system is not tested in this workflow
- ".github/workflows/build_linux.yml"
push:
+ branches: [master, v1.x]
paths:
- "*.h"
- "*.cpp"
@@ -28,11 +29,7 @@ env:
BUILD_TYPE: Release
jobs:
- check_formatting:
- uses: nRF24/.github/.github/workflows/cpp_lint.yaml@main
-
using_cmake:
- needs: check_formatting
uses: nRF24/.github/.github/workflows/build_linux_cmake.yaml@main
with:
compiler: ${{ matrix.toolchain.compiler }}
diff --git a/.github/workflows/clang_format.yml b/.github/workflows/clang_format.yml
new file mode 100644
index 0000000..f82a4b6
--- /dev/null
+++ b/.github/workflows/clang_format.yml
@@ -0,0 +1,11 @@
+name: check code formatting
+
+on:
+ push:
+ branches: [master, v1.x]
+ pull_request:
+ branches: [master, v1.x]
+
+jobs:
+ check_formatting:
+ uses: nRF24/.github/.github/workflows/cpp_lint.yaml@main
diff --git a/.github/workflows/doxygen.yml b/.github/workflows/doxygen.yml
index b291dfb..870702f 100644
--- a/.github/workflows/doxygen.yml
+++ b/.github/workflows/doxygen.yml
@@ -2,7 +2,7 @@ name: build Docs
on:
pull_request:
- types: [opened, reopened]
+ branches: [master, v1.x]
paths:
- "*.h"
- "*.md"
@@ -12,6 +12,7 @@ on:
- ".github/workflows/doxygen.yml"
- "Doxyfile"
push:
+ branches: [master, v1.x]
paths:
- "*.h"
- "*.md"
@@ -21,7 +22,6 @@ on:
- ".github/workflows/doxygen.yml"
- "Doxyfile"
release:
- branches: [master]
types: [published, edited]
workflow_dispatch:
diff --git a/examples/ncurses/RF24Gateway_ncurses.cpp b/examples/ncurses/RF24Gateway_ncurses.cpp
index b7058d7..e9ac56b 100644
--- a/examples/ncurses/RF24Gateway_ncurses.cpp
+++ b/examples/ncurses/RF24Gateway_ncurses.cpp
@@ -1,21 +1,21 @@
/**
-* RF24Gateway NCurses interface - TMRh20 2015
-* This is a generic tool for nodes supporting or combining with RF24Ethernet and/or RF24Network.
-*
-* The tool provides a simple interface for monitoring information and activity regarding the RF24Gateway:
-* a: Interface statistics from /proc/net/dev
-* b: RF24Mesh address/id assignments
-* c: RF24Network/Radio information
-* d: Active IP connections (optional)
-*
-* **Requirements: NCurses**
-* Install NCurses: apt-get install libncurses5-dev
-*
-* **Controls**
-* Type 'h' to view the help menu
-*
-*
-*/
+ * RF24Gateway NCurses interface - TMRh20 2015
+ * This is a generic tool for nodes supporting or combining with RF24Ethernet and/or RF24Network.
+ *
+ * The tool provides a simple interface for monitoring information and activity regarding the RF24Gateway:
+ * a: Interface statistics from /proc/net/dev
+ * b: RF24Mesh address/id assignments
+ * c: RF24Network/Radio information
+ * d: Active IP connections (optional)
+ *
+ * **Requirements: NCurses**
+ * Install NCurses: apt-get install libncurses5-dev
+ *
+ * **Controls**
+ * Type 'h' to view the help menu
+ *
+ *
+ */
#include
#include
@@ -141,9 +141,9 @@ int main()
{
/**
- * The gateway handles all IP traffic (marked as EXTERNAL_DATA_TYPE) and passes it to the associated network interface
- * RF24Network user payloads are loaded into the user cache
- */
+ * The gateway handles all IP traffic (marked as EXTERNAL_DATA_TYPE) and passes it to the associated network interface
+ * RF24Network user payloads are loaded into the user cache
+ */
if (millis() - mesh_timer > 30000 && mesh.getNodeID())
{ //Every 30 seconds, test mesh connectivity
diff --git a/examples/ncursesInt/RF24Gateway_ncursesInt.cpp b/examples/ncursesInt/RF24Gateway_ncursesInt.cpp
index bf9c213..166b18b 100644
--- a/examples/ncursesInt/RF24Gateway_ncursesInt.cpp
+++ b/examples/ncursesInt/RF24Gateway_ncursesInt.cpp
@@ -1,21 +1,21 @@
/**
-* RF24Gateway NCurses interface - TMRh20 2015-2022
-* This is a generic tool for nodes supporting or combining with RF24Ethernet and/or RF24Network.
-*
-* The tool provides a simple interface for monitoring information and activity regarding the RF24Gateway:
-* a: Interface statistics from /proc/net/dev
-* b: RF24Mesh address/id assignments
-* c: RF24Network/Radio information
-* d: Active IP connections (optional)
-*
-* **Requirements: NCurses**
-* Install NCurses: apt-get install libncurses5-dev
-*
-* **Controls**
-* Type 'h' to view the help menu
-*
-*
-*/
+ * RF24Gateway NCurses interface - TMRh20 2015-2022
+ * This is a generic tool for nodes supporting or combining with RF24Ethernet and/or RF24Network.
+ *
+ * The tool provides a simple interface for monitoring information and activity regarding the RF24Gateway:
+ * a: Interface statistics from /proc/net/dev
+ * b: RF24Mesh address/id assignments
+ * c: RF24Network/Radio information
+ * d: Active IP connections (optional)
+ *
+ * **Requirements: NCurses**
+ * Install NCurses: apt-get install libncurses5-dev
+ *
+ * **Controls**
+ * Type 'h' to view the help menu
+ *
+ *
+ */
#include
#include