Skip to content

Commit bcf3c40

Browse files
authored
Merge pull request #1 from m5stack/develop
Support M5UnitUnified
2 parents 0e54807 + 39c177c commit bcf3c40

34 files changed

+8972
-3711
lines changed

.clang-format

Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
---
2+
Language: Cpp
3+
BasedOnStyle: Google
4+
AccessModifierOffset: -4
5+
AlignAfterOpenBracket: Align
6+
AlignConsecutiveMacros: true
7+
AlignConsecutiveAssignments: true
8+
AlignConsecutiveDeclarations: false
9+
AlignEscapedNewlines: Left
10+
AlignOperands: true
11+
AlignTrailingComments: true
12+
AllowAllArgumentsOnNextLine: true
13+
AllowAllConstructorInitializersOnNextLine: true
14+
AllowAllParametersOfDeclarationOnNextLine: true
15+
AllowShortBlocksOnASingleLine: Never
16+
AllowShortCaseLabelsOnASingleLine: false
17+
AllowShortFunctionsOnASingleLine: false
18+
AllowShortLambdasOnASingleLine: All
19+
AllowShortIfStatementsOnASingleLine: WithoutElse
20+
AllowShortLoopsOnASingleLine: true
21+
AlwaysBreakAfterDefinitionReturnType: None
22+
AlwaysBreakAfterReturnType: None
23+
AlwaysBreakBeforeMultilineStrings: true
24+
AlwaysBreakTemplateDeclarations: Yes
25+
BinPackArguments: true
26+
BinPackParameters: true
27+
BraceWrapping:
28+
AfterCaseLabel: false
29+
AfterClass: false
30+
AfterControlStatement: false
31+
AfterEnum: false
32+
AfterFunction: true
33+
AfterNamespace: false
34+
AfterObjCDeclaration: false
35+
AfterStruct: false
36+
AfterUnion: false
37+
AfterExternBlock: false
38+
BeforeCatch: false
39+
BeforeElse: false
40+
IndentBraces: false
41+
SplitEmptyFunction: true
42+
SplitEmptyRecord: true
43+
SplitEmptyNamespace: true
44+
BreakBeforeBinaryOperators: None
45+
BreakBeforeBraces: Custom
46+
BreakBeforeInheritanceComma: false
47+
BreakInheritanceList: BeforeColon
48+
BreakBeforeTernaryOperators: true
49+
BreakConstructorInitializersBeforeComma: false
50+
BreakConstructorInitializers: BeforeColon
51+
BreakAfterJavaFieldAnnotations: false
52+
BreakStringLiterals: true
53+
ColumnLimit: 120
54+
CommentPragmas: '^ IWYU pragma:'
55+
CompactNamespaces: false
56+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
57+
ConstructorInitializerIndentWidth: 4
58+
ContinuationIndentWidth: 4
59+
Cpp11BracedListStyle: true
60+
DeriveLineEnding: true
61+
DerivePointerAlignment: true
62+
DisableFormat: false
63+
ExperimentalAutoDetectBinPacking: false
64+
FixNamespaceComments: true
65+
ForEachMacros:
66+
- foreach
67+
- Q_FOREACH
68+
- BOOST_FOREACH
69+
IncludeBlocks: Regroup
70+
IncludeCategories:
71+
- Regex: '^<ext/.*\.h>'
72+
Priority: 2
73+
SortPriority: 0
74+
- Regex: '^<.*\.h>'
75+
Priority: 1
76+
SortPriority: 0
77+
- Regex: '^<.*'
78+
Priority: 2
79+
SortPriority: 0
80+
- Regex: '.*'
81+
Priority: 3
82+
SortPriority: 0
83+
IncludeIsMainRegex: '([-_](test|unittest))?$'
84+
IncludeIsMainSourceRegex: ''
85+
IndentCaseLabels: true
86+
IndentGotoLabels: true
87+
IndentPPDirectives: None
88+
IndentWidth: 4
89+
IndentWrappedFunctionNames: false
90+
JavaScriptQuotes: Leave
91+
JavaScriptWrapImports: true
92+
KeepEmptyLinesAtTheStartOfBlocks: false
93+
MacroBlockBegin: ''
94+
MacroBlockEnd: ''
95+
MaxEmptyLinesToKeep: 1
96+
NamespaceIndentation: None
97+
ObjCBinPackProtocolList: Never
98+
ObjCBlockIndentWidth: 2
99+
ObjCSpaceAfterProperty: false
100+
ObjCSpaceBeforeProtocolList: true
101+
PenaltyBreakAssignment: 2
102+
PenaltyBreakBeforeFirstCallParameter: 1
103+
PenaltyBreakComment: 300
104+
PenaltyBreakFirstLessLess: 120
105+
PenaltyBreakString: 1000
106+
PenaltyBreakTemplateDeclaration: 10
107+
PenaltyExcessCharacter: 1000000
108+
PenaltyReturnTypeOnItsOwnLine: 200
109+
PointerAlignment: Left
110+
RawStringFormats:
111+
- Language: Cpp
112+
Delimiters:
113+
- cc
114+
- CC
115+
- cpp
116+
- Cpp
117+
- CPP
118+
- 'c++'
119+
- 'C++'
120+
CanonicalDelimiter: ''
121+
BasedOnStyle: google
122+
- Language: TextProto
123+
Delimiters:
124+
- pb
125+
- PB
126+
- proto
127+
- PROTO
128+
EnclosingFunctions:
129+
- EqualsProto
130+
- EquivToProto
131+
- PARSE_PARTIAL_TEXT_PROTO
132+
- PARSE_TEST_PROTO
133+
- PARSE_TEXT_PROTO
134+
- ParseTextOrDie
135+
- ParseTextProtoOrDie
136+
CanonicalDelimiter: ''
137+
BasedOnStyle: google
138+
ReflowComments: true
139+
SortIncludes: false
140+
SortUsingDeclarations: true
141+
SpaceAfterCStyleCast: false
142+
SpaceAfterLogicalNot: false
143+
SpaceAfterTemplateKeyword: true
144+
SpaceBeforeAssignmentOperators: true
145+
SpaceBeforeCpp11BracedList: false
146+
SpaceBeforeCtorInitializerColon: true
147+
SpaceBeforeInheritanceColon: true
148+
SpaceBeforeParens: ControlStatements
149+
SpaceBeforeRangeBasedForLoopColon: true
150+
SpaceInEmptyBlock: false
151+
SpaceInEmptyParentheses: false
152+
SpacesBeforeTrailingComments: 2
153+
SpacesInAngles: false
154+
SpacesInConditionalStatement: false
155+
SpacesInContainerLiterals: true
156+
SpacesInCStyleCastParentheses: false
157+
SpacesInParentheses: false
158+
SpacesInSquareBrackets: false
159+
SpaceBeforeSquareBrackets: false
160+
Standard: Auto
161+
StatementMacros:
162+
- Q_UNUSED
163+
- QT_REQUIRE_VERSION
164+
TabWidth: 4
165+
UseCRLF: false
166+
UseTab: Never
167+
...
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Source:
2+
# https://github.com/Tinyu-Zhao/M5-Depends/blob/main/.github/ISSUE_TEMPLATE/bug-report.yml
3+
# See:
4+
# https://docs.github.com/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms
5+
6+
name: Bug report
7+
description: Report a problem with the code in this repository.
8+
labels:
9+
- "type: bug"
10+
body:
11+
- type: markdown
12+
attributes:
13+
value: "Thank you for opening an issue on an M5Stack Arduino library repository.\n\
14+
To improve the speed of resolution please review the following guidelines and common troubleshooting steps below before creating the issue:\n\
15+
If you have any UIFLOW questions you can ask in the [special board](https://community.m5stack.com/category/5/uiflow), there will be many enthusiastic friends to help you.\n\
16+
Do not use GitHub issues for troubleshooting projects and issues. Instead use the forums at https://community.m5stack.com to ask questions and troubleshoot why something isn't working as expected. In many cases the problem is a common issue that you will more quickly receive help from the forum community. GitHub issues are meant for known defects in the code. If you don't know if there is a defect in the code then start with troubleshooting on the forum first."
17+
- type: textarea
18+
id: description
19+
attributes:
20+
label: Describe the bug
21+
description: A clear and concise description of what the bug is.
22+
validations:
23+
required: true
24+
- type: textarea
25+
id: reproduce
26+
attributes:
27+
label: To reproduce
28+
description: Provide the specific set of steps we can follow to reproduce the problem.
29+
placeholder: |
30+
1. In this environment...
31+
2. With this config...
32+
3. Run '...'
33+
4. See error...
34+
validations:
35+
required: true
36+
- type: textarea
37+
id: expected
38+
attributes:
39+
label: Expected behavior
40+
description: What would you expect to happen after following those instructions?
41+
validations:
42+
required: true
43+
- type: textarea
44+
id: screenshots
45+
attributes:
46+
label: Screenshots
47+
description: If applicable, add screenshots to help explain your problem.
48+
validations:
49+
required: false
50+
- type: textarea
51+
id: information
52+
attributes:
53+
label: Environment
54+
description: |
55+
If applicable, add screenshots to help explain your problem.
56+
examples:
57+
- **OS**: Ubuntu 20.04
58+
- **IDE & IDE Version**: Arduino 1.8.19 Or Platform IO v2.5.0
59+
- **Repository Version**: 0.4.0
60+
value: |
61+
- OS:
62+
- IDE &IDE Version:
63+
- Repository Version:
64+
validations:
65+
required: false
66+
- type: textarea
67+
id: additional
68+
attributes:
69+
label: Additional context
70+
description: Add any additional information here.
71+
validations:
72+
required: false
73+
- type: checkboxes
74+
id: checklist
75+
attributes:
76+
label: Issue checklist
77+
description: Please double-check that you have done each of the following things before submitting the issue.
78+
options:
79+
- label: I searched for previous reports in [the issue tracker](https://github.com/m5stack/M5Unit-DDS/issues?q=)
80+
required: true
81+
- label: My report contains all necessary details
82+
required: true
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Arduino Lint Check
2+
on:
3+
push:
4+
branches: [ master, main ]
5+
pull_request:
6+
branches: [ master, main ]
7+
workflow_dispatch:
8+
9+
defaults:
10+
run:
11+
shell: bash
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
lint:
19+
name: Lint Check
20+
runs-on: [self-hosted, Linux, X64]
21+
steps:
22+
- uses: actions/checkout@v4
23+
- uses: arduino/arduino-lint-action@v2
24+
with:
25+
library-manager: update
26+
compliance: strict
27+
project-type: all
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: Build(arduino-esp32:2.x)
2+
3+
env:
4+
SKETCH_NAMES_FIND_START: ./examples/UnitUnified
5+
REQUIRED_LIBRARIES: M5Unified,M5UnitUnified
6+
7+
on:
8+
push:
9+
tags-ignore:
10+
- '*.*.*'
11+
- 'v*.*.*'
12+
branches:
13+
- '*'
14+
paths:
15+
- 'src/unit/**.cpp'
16+
- 'src/unit/**.hpp'
17+
- 'src/unit/**.h'
18+
- 'src/unit/**.c'
19+
- 'examples/UnitUnified/**.ino'
20+
- 'examples/UnitUnified/**.cpp'
21+
- 'examples/UnitUnified/**.hpp'
22+
- 'examples/UnitUnified/**.h'
23+
- 'examples/UnitUnified/**.c'
24+
- '**arduino-esp-v2-build-check.yml'
25+
pull_request:
26+
paths:
27+
- 'src/unit/**.cpp'
28+
- 'src/unit/**.hpp'
29+
- 'src/unit/**.h'
30+
- 'src/unit/**.c'
31+
- 'examples/UnitUnified/**.ino'
32+
- 'examples/UnitUnified/**.cpp'
33+
- 'examples/UnitUnified/**.hpp'
34+
- 'examples/UnitUnified/**.h'
35+
- 'examples/UnitUnified/**.c'
36+
- '**arduino-esp-v2-build-check.yml'
37+
workflow_dispatch:
38+
39+
defaults:
40+
run:
41+
shell: bash
42+
43+
concurrency:
44+
group: ${{ github.workflow }}-${{ github.ref }}
45+
cancel-in-progress: true
46+
47+
jobs:
48+
build:
49+
name: ${{ matrix.sketch }}:${{matrix.board}}@${{matrix.platform-version}}
50+
runs-on: ubuntu-latest
51+
timeout-minutes: 5
52+
53+
strategy:
54+
fail-fast: false
55+
max-parallel: 20
56+
matrix:
57+
platform-url:
58+
- https://espressif.github.io/arduino-esp32/package_esp32_index.json
59+
60+
sketch:
61+
- Output
62+
63+
unit:
64+
- UnitDDS
65+
66+
board:
67+
- m5stack-atom
68+
- m5stack-atoms3
69+
- m5stack-core-esp32
70+
- m5stack-core2
71+
- m5stack-coreink
72+
- m5stack-cores3
73+
- m5stack-fire
74+
75+
platform-version:
76+
- 2.0.17
77+
78+
platform:
79+
- esp32
80+
81+
archi:
82+
- esp32
83+
84+
steps:
85+
- name: Checkout
86+
uses: actions/checkout@v4
87+
with:
88+
ref: ${{ github.event.pull_request.head.sha }}
89+
90+
# Build
91+
- name: Compile examples
92+
uses: ArminJo/arduino-test-compile@master
93+
with:
94+
arduino-board-fqbn: ${{ matrix.platform }}:${{ matrix.archi }}:${{ matrix.board }}
95+
arduino-platform: ${{ matrix.platform }}:${{ matrix.archi }}@${{ matrix.platform-version }}
96+
platform-url: ${{ matrix.platform-url }}
97+
required-libraries: ${{ env.REQUIRED_LIBRARIES }}
98+
extra-arduino-cli-args: ${{ matrix.cli-args }}
99+
#build-properties: ${{ matrix.build-properties }}
100+
sketch-names: ${{ matrix.sketch }}.ino
101+
sketch-names-find-start: ${{ env.SKETCH_NAMES_FIND_START }}/${{ matrix.unit }}
102+
#sketches-exclude: ${{ matrix.sketches-exclude }}

0 commit comments

Comments
 (0)