Skip to content

Commit

Permalink
Merge branch 'flipperdevices:dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Z3BRO authored Jul 17, 2024
2 parents ce57805 + 79d82da commit 6cbd735
Show file tree
Hide file tree
Showing 707 changed files with 9,812 additions and 4,857 deletions.
123 changes: 89 additions & 34 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,55 @@ Language: Cpp
AccessModifierOffset: -4
AlignAfterOpenBracket: AlwaysBreak
AlignArrayOfStructures: None
AlignConsecutiveMacros: None
AlignConsecutiveAssignments: None
AlignConsecutiveBitFields: None
AlignConsecutiveDeclarations: None
AlignConsecutiveAssignments:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: true
AlignConsecutiveBitFields:
Enabled: true
AcrossEmptyLines: true
AcrossComments: true
AlignCompound: false
AlignFunctionPointers: false
PadOperators: true
AlignConsecutiveDeclarations:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: true
AlignConsecutiveMacros:
Enabled: true
AcrossEmptyLines: false
AcrossComments: true
AlignCompound: true
AlignFunctionPointers: false
PadOperators: true
AlignConsecutiveShortCaseStatements:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCaseColons: false
AlignEscapedNewlines: Left
AlignOperands: Align
AlignTrailingComments: false
AlignTrailingComments:
Kind: Never
OverEmptyLines: 0
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortEnumsOnASingleLine: true
AllowBreakBeforeNoexceptSpecifier: Never
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortCompoundRequirementOnASingleLine: true
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: WithoutElse
AllowShortLoopsOnASingleLine: true
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
Expand All @@ -27,17 +60,18 @@ AttributeMacros:
- __capability
BinPackArguments: false
BinPackParameters: false
BitFieldColonSpacing: Both
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: Never
AfterEnum: false
AfterExternBlock: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
Expand All @@ -46,38 +80,35 @@ BraceWrapping:
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakAdjacentStringLiterals: true
BreakAfterAttributes: Leave
BreakAfterJavaFieldAnnotations: false
BreakArrays: true
BreakBeforeBinaryOperators: None
BreakBeforeConceptDeclarations: true
BreakBeforeConceptDeclarations: Always
BreakBeforeBraces: Attach
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
BreakBeforeInlineASMColon: OnlyMultiline
BreakBeforeTernaryOperators: false
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeComma
BreakAfterJavaFieldAnnotations: false
BreakInheritanceList: BeforeColon
BreakStringLiterals: false
ColumnLimit: 99
CommentPragmas: '^ IWYU pragma:'
QualifierAlignment: Leave
CompactNamespaces: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
ExperimentalAutoDetectBinPacking: false
PackConstructorInitializers: BinPack
BasedOnStyle: ''
ConstructorInitializerAllOnOneLineOrOnePerLine: false
AllowAllConstructorInitializersOnNextLine: true
FixNamespaceComments: false
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
- M_EACH
IfMacros:
- KJ_IF_MAYBE
IncludeBlocks: Preserve
Expand All @@ -97,19 +128,30 @@ IncludeCategories:
IncludeIsMainRegex: '(Test)?$'
IncludeIsMainSourceRegex: ''
IndentAccessModifiers: false
IndentCaseLabels: false
IndentCaseBlocks: false
IndentCaseLabels: false
IndentExternBlock: AfterExternBlock
IndentGotoLabels: true
IndentPPDirectives: None
IndentExternBlock: AfterExternBlock
IndentRequires: false
IndentRequiresClause: false
IndentWidth: 4
IndentWrappedFunctionNames: true
InsertBraces: false
InsertNewlineAtEOF: true
InsertTrailingCommas: None
IntegerLiteralSeparator:
Binary: 0
BinaryMinDigits: 0
Decimal: 0
DecimalMinDigits: 0
Hex: 0
HexMinDigits: 0
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
KeepEmptyLinesAtEOF: false
LambdaBodyIndentation: Signature
LineEnding: DeriveLF
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
Expand All @@ -119,34 +161,44 @@ ObjCBlockIndentWidth: 4
ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
PackConstructorInitializers: BinPack
PenaltyBreakAssignment: 10
PenaltyBreakBeforeFirstCallParameter: 30
PenaltyBreakComment: 10
PenaltyBreakFirstLessLess: 0
PenaltyBreakOpenParenthesis: 0
PenaltyBreakScopeResolution: 500
PenaltyBreakString: 10
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 100
PenaltyReturnTypeOnItsOwnLine: 60
PenaltyIndentedWhitespace: 0
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Left
PPIndentWidth: -1
QualifierAlignment: Leave
ReferenceAlignment: Pointer
ReflowComments: false
RemoveBracesLLVM: false
RemoveParentheses: Leave
RemoveSemicolon: true
RequiresClausePosition: OwnLine
RequiresExpressionIndentation: OuterScope
SeparateDefinitionBlocks: Leave
ShortNamespaceLines: 1
SkipMacroDefinitionBody: false
SortIncludes: Never
SortJavaStaticImport: Before
SortUsingDeclarations: false
SortUsingDeclarations: Never
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceAroundPointerQualifiers: Default
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeJsonColon: false
SpaceBeforeParens: Never
SpaceBeforeParensOptions:
AfterControlStatements: false
Expand All @@ -155,32 +207,35 @@ SpaceBeforeParensOptions:
AfterFunctionDeclarationName: false
AfterIfMacros: false
AfterOverloadedOperator: false
AfterPlacementOperator: true
AfterRequiresInClause: false
AfterRequiresInExpression: false
BeforeNonEmptyParentheses: false
SpaceAroundPointerQualifiers: Default
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: Never
SpacesInConditionalStatement: false
SpacesInContainerLiterals: false
SpacesInCStyleCastParentheses: false
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: -1
SpacesInParentheses: false
SpacesInParens: Never
SpacesInParensOptions:
InCStyleCasts: false
InConditionalStatements: false
InEmptyParentheses: false
Other: false
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
BitFieldColonSpacing: Both
Standard: c++03
Standard: c++20
StatementAttributeLikeMacros:
- Q_EMIT
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 4
UseCRLF: false
UseTab: Never
VerilogBreakBetweenInstancePorts: true
WhitespaceSensitiveMacros:
- STRINGIZE
- PP_STRINGIZE
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: 'Unit tests'

on:
pull_request:

Expand All @@ -25,7 +24,7 @@ jobs:
- name: 'Get flipper from device manager (mock)'
id: device
run: |
echo "flipper=/dev/ttyACM0" >> $GITHUB_OUTPUT
echo "flipper=auto" >> $GITHUB_OUTPUT
- name: 'Flash unit tests firmware'
id: flashing
Expand All @@ -40,7 +39,7 @@ jobs:
timeout-minutes: 5
run: |
source scripts/toolchain/fbtenv.sh
python3 scripts/testing/await_flipper.py ${{steps.device.outputs.flipper}}
python3 scripts/testops.py -p=${{steps.device.outputs.flipper}} -t=120 await_flipper
python3 scripts/storage.py -p ${{steps.device.outputs.flipper}} format_ext
- name: 'Copy assets and unit data, reboot and wait for flipper'
Expand All @@ -49,19 +48,19 @@ jobs:
timeout-minutes: 7
run: |
source scripts/toolchain/fbtenv.sh
python3 scripts/testing/await_flipper.py ${{steps.device.outputs.flipper}}
python3 scripts/testops.py -p=${{steps.device.outputs.flipper}} -t=15 await_flipper
rm -rf build/latest/resources/dolphin
python3 scripts/storage.py -p ${{steps.device.outputs.flipper}} -f send build/latest/resources /ext
python3 scripts/power.py -p ${{steps.device.outputs.flipper}} reboot
python3 scripts/testing/await_flipper.py ${{steps.device.outputs.flipper}}
python3 scripts/testops.py -p=${{steps.device.outputs.flipper}} -t=15 await_flipper
- name: 'Run units and validate results'
id: run_units
if: steps.copy.outcome == 'success'
timeout-minutes: 7
run: |
source scripts/toolchain/fbtenv.sh
python3 scripts/testing/units.py ${{steps.device.outputs.flipper}}
python3 scripts/testops.py run_units -p ${{steps.device.outputs.flipper}}
- name: 'Check GDB output'
if: failure() && steps.flashing.outcome == 'success'
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/updater_test.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: 'Updater test'

on:
pull_request:

env:
TARGETS: f7
DEFAULT_TARGET: f7
Expand All @@ -26,7 +24,7 @@ jobs:
- name: 'Get flipper from device manager (mock)'
id: device
run: |
echo "flipper=Rekigyn" >> $GITHUB_OUTPUT
echo "flipper=auto" >> $GITHUB_OUTPUT
echo "stlink=0F020D026415303030303032" >> $GITHUB_OUTPUT
- name: 'Flashing target firmware'
Expand All @@ -35,7 +33,7 @@ jobs:
run: |
source scripts/toolchain/fbtenv.sh
./fbt flash_usb_full PORT=${{steps.device.outputs.flipper}} FORCE=1
python3 scripts/testing/await_flipper.py ${{steps.device.outputs.flipper}}
python3 scripts/testops.py -p=${{steps.device.outputs.flipper}} -t=180 await_flipper
- name: 'Validating updater'
id: second_full_flash
Expand All @@ -44,7 +42,7 @@ jobs:
run: |
source scripts/toolchain/fbtenv.sh
./fbt flash_usb PORT=${{steps.device.outputs.flipper}} FORCE=1
python3 scripts/testing/await_flipper.py ${{steps.device.outputs.flipper}}
python3 scripts/testops.py -p=${{steps.device.outputs.flipper}} -t=180 await_flipper
- name: 'Get last release tag'
id: release_tag
Expand All @@ -71,5 +69,5 @@ jobs:
if: failure()
run: |
source scripts/toolchain/fbtenv.sh
python3 scripts/testing/await_flipper.py ${{steps.device.outputs.flipper}}
python3 scripts/testops.py -p=${{steps.device.outputs.flipper}} -t=180 await_flipper
python3 scripts/storage.py -p ${{steps.device.outputs.flipper}} format_ext
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ Brewfile.lock.json
.sconsign.dblite


# Visual Studio Code
/.vscode

# bundle output
/dist

Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@
[submodule "lib/mbedtls"]
path = lib/mbedtls
url = https://github.com/Mbed-TLS/mbedtls.git
[submodule "lib/cxxheaderparser"]
path = lib/cxxheaderparser
url = https://github.com/robotpy/cxxheaderparser.git
[submodule "lib/heatshrink"]
path = lib/heatshrink
url = https://github.com/flipperdevices/heatshrink.git
Expand Down
4 changes: 3 additions & 1 deletion .pvsconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
//-V:M_EACH:1048,1044
//-V:ARRAY_DEF:760,747,568,776,729,712,654,1103
//-V:LIST_DEF:760,747,568,712,729,654,776,1103
//-V:LIST_DUAL_PUSH_DEF:524,760,774
//-V:BPTREE_DEF2:779,1086,557,773,512
//-V:DICT_DEF2:779,524,776,760,1044,1001,729,590,568,747,685,1103
//-V:ALGO_DEF:1048,747,1044
//-V:TUPLE_DEF2:524,590,1001,760
//-V:DEQUE_DEF:658,747,760

# Non-severe malloc/null pointer deref warnings
//-V::522:2,3
Expand Down Expand Up @@ -43,4 +45,4 @@
//-V:with_view_model:1044,1048

# Examples
//V_EXCLUDE_PATH applications/examples/
//V_EXCLUDE_PATH applications/examples/
Loading

0 comments on commit 6cbd735

Please sign in to comment.