Skip to content

Commit

Permalink
Merge pull request #3 from EnviroDIY/develop
Browse files Browse the repository at this point in the history
Add doxygen, update examples, test more processors
  • Loading branch information
SRGDamia1 authored Jul 3, 2024
2 parents 62f42b0 + 46484a6 commit b89cdd5
Show file tree
Hide file tree
Showing 36 changed files with 4,956 additions and 1,193 deletions.
123 changes: 123 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
---
Language: Cpp
# BasedOnStyle: Google
AccessModifierOffset: -3
AlignAfterOpenBracket: Align
AlignConsecutiveMacros: false
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
AlignEscapedNewlines: Left
AlignOperands: false
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: Always
AllowShortCaseLabelsOnASingleLine: true
AllowShortEnumsOnASingleLine: true
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: WithoutElse
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: true
BinPackParameters: true
BreakAfterJavaFieldAnnotations: false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Attach
BreakBeforeInheritanceComma: false
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakInheritanceList: BeforeColon
BreakStringLiterals: true
ColumnLimit: 88
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
EmptyLineAfterAccessModifier: Leave
EmptyLineBeforeAccessModifier: Leave
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
- Regex: '.*'
Priority: 1
IncludeIsMainRegex: '([-_](test|unittest))?$'
IndentAccessModifiers: false
IndentCaseBlocks: false
IndentCaseLabels: true
IndentExternBlock: Indent
IndentGotoLabels: true
IndentPPDirectives: None
IndentWidth: 4
IndentWrappedFunctionNames: false
InsertTrailingCommas: None
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 2
NamespaceIndentation: None
# ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PackConstructorInitializers: CurrentLine
PenaltyBreakAssignment: 25
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 600
PenaltyReturnTypeOnItsOwnLine: 50
PointerAlignment: Left
PointerBindsToType: true
QualifierAlignment: Left
ReferenceAlignment: Left
ReflowComments: true
SeparateDefinitionBlocks: Leave
SortIncludes: false
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInConditionalStatement: false
SpacesInLineCommentPrefix:
Minimum: 1
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
TabWidth: 4
UseTab: Never
---
34 changes: 34 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Set the default behavior for line endings, 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
*.h text
*.ino text
*.cpp text
*.py text

# Declare files that will always have CRLF line endings on checkout.
*.sln text eol=crlf

# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
*.pdf binary
*.pdf export-ignore

# used to exclude files from archiving/compression

# git files
.gitattributes export-ignore
.gitignore export-ignore
.gitmodules export-ignore
.travis.yml export-ignore
id_rsa.enc export-ignore

# Platformio
platformio.ini export-ignore

# Shell Scripts
*.sh export-ignore
39 changes: 39 additions & 0 deletions .github/workflows/build_documentation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Check, Build, and Publish Documentation

on:
# Triggers the workflow on push or pull request events
push:
pull_request:
# Trigger when a release is created
# NOTE: This will only trigger if the release is created from the UI or with a personal access token
release:
types:
- published
# Trigger with the release workflow finishes
workflow_run:
workflows: ['Create a New Release']
types: [completed]
branches: [master]
# Also give a manual trigger
workflow_dispatch:
inputs:
publish:
description: 'Publish Documentation to GitHub Pages'
required: false
type: boolean
default: false

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
doc_build:
if: ${{ (! contains(github.event.head_commit.message, 'ci skip')) && (github.event_name != 'workflow_run' || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success')) }}
name: Build documentation
uses: EnviroDIY/workflows/.github/workflows/build_documentation.yaml@main
with:
use_graphviz: false
publish: ${{ (github.event_name == 'release' && github.event.action == 'published') || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') || (github.event_name == 'workflow_dispatch' && github.event.inputs.publish == 'true')}}
rebuild_cache_number: 1
secrets: inherit
18 changes: 18 additions & 0 deletions .github/workflows/build_examples.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Build Examples

# Triggers the workflow on push or pull request events
on: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build_examples:
name: Build all examples with PlatformIO and the Arduino CLI
if: ${{ ! contains(github.event.head_commit.message, 'ci skip') }}
uses: EnviroDIY/workflows/.github/workflows/build_examples.yaml@main
with:
boards_to_build: 'all'
examples_to_build: 'examples/ChangeModbusSettings,examples/GetValues,extras/ChangeParity'
secrets: inherit
102 changes: 0 additions & 102 deletions .github/workflows/build_examples_arduino_cli.yaml

This file was deleted.

72 changes: 0 additions & 72 deletions .github/workflows/build_examples_platformio.yaml

This file was deleted.

Loading

0 comments on commit b89cdd5

Please sign in to comment.