Skip to content
This repository has been archived by the owner on Dec 1, 2020. It is now read-only.

Commit

Permalink
Merge pull request #49 from project-march/feature/PM-201-refactor-sta…
Browse files Browse the repository at this point in the history
…te-machine

Feature: refactor state machine (and the rest)
  • Loading branch information
bjornminderman authored Jan 6, 2020
2 parents 83847b8 + cc05197 commit acbb8bd
Show file tree
Hide file tree
Showing 119 changed files with 1,706 additions and 10,320 deletions.
65 changes: 65 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
BasedOnStyle: Google
AccessModifierOffset: -2
ConstructorInitializerIndentWidth: 2
AlignEscapedNewlinesLeft: false
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AlwaysBreakTemplateDeclarations: true
AlwaysBreakBeforeMultilineStrings: false
BreakBeforeBinaryOperators: false
BreakBeforeTernaryOperators: false
BreakConstructorInitializersBeforeComma: true
BinPackParameters: true
ColumnLimit: 120
ConstructorInitializerAllOnOneLineOrOnePerLine: true
DerivePointerBinding: false
PointerBindsToType: true
ExperimentalAutoDetectBinPacking: false
IndentCaseLabels: true
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCSpaceBeforeProtocolList: true
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 60
PenaltyBreakString: 1
PenaltyBreakFirstLessLess: 1000
PenaltyExcessCharacter: 1000
PenaltyReturnTypeOnItsOwnLine: 90
SpacesBeforeTrailingComments: 2
Cpp11BracedListStyle: false
Standard: Auto
IndentWidth: 2
TabWidth: 2
UseTab: Never
IndentFunctionDeclarationAfterType: false
SpacesInParentheses: false
SpacesInAngles: false
SpaceInEmptyParentheses: false
SpacesInCStyleCastParentheses: false
SpaceAfterControlStatementKeyword: true
SpaceBeforeAssignmentOperators: true
ContinuationIndentWidth: 4
SortIncludes: false
SpaceAfterCStyleCast: false

# Configure each individual brace in BraceWrapping
BreakBeforeBraces: Custom

# Control of individual brace wrapping cases
BraceWrapping: {
AfterClass: 'true'
AfterControlStatement: 'true'
AfterEnum : 'true'
AfterFunction : 'true'
AfterNamespace : 'true'
AfterStruct : 'true'
AfterUnion : 'true'
BeforeCatch : 'true'
BeforeElse : 'true'
IndentBraces : 'false'
}
...
13 changes: 10 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
os: linux
language: python

addons:
apt:
packages:
- clang-format

notifications:
slack:
secure: DX4zerMP4tLgR8rMBnY36YhrdtULunl+aROFq7dWy0vXvxiegWfvGY0eWU7K36kcVToPV1LJ9ilFGxfOi5VELkFQHsxYCRaBddSgQ4pAxppygVPhlmOUdpkZsGxrJU27ajcy6OY/pwEFBsABIXitoEC2U0yDzx3J9bWjzz+QH14MLfH07zeYuuAfhloZ8IZk6TbSVeg8X/jhc1QUZhn7QgN+hvXo1MMSaq99TXXK7jO7soq5oRbTSOkohSiVm7XgbjL9haoWXQSBJlb82qu94wFlBBZlZ05oEVGzith36d4gVPJ5wbmoRQy5X/shGBBNGiyv8JRQ6Z18zgdsra1sWPNI7Yv5o91sMySx/g+OOqyJqQKq5y5ohb1Y4hI24zy9Xj8Bjac9wt9O4wvgn5+dlz2qgIkXbJeSodEB4OE0lBEeiQACkYpHz9UbxZrcaBtrq9tEHSrl7lwj/AgRckaIIr+6BURvQ21RIqXhajKiaSO05KqL0spyM8pVvNHn+0W1oznVuEMZOywy7bZ83JiodKVZPwJQWPetOAet8r4PnkulUSseJ8ckVpoz5Kfs/IrSAKMSlOeD19AgLm7Q/ejpoimfTJUJsDRgP7asRVuqgzl7ruBuQOwbaWg3FRgaW7WJ66LPmdNwI5bokThaMaE3oB17l2Y+Kt93CAxUDAKSStI=
secure: agpTHpiGJVNU8EtJV+nbiM8LYp7RkXPMpvrpa7yjlNKep4i0jQscFpOyylh+7Toekfh1F7ZMGhyBQfWsgzSKK4OtKgUY36jV3NJ04d1Jjf4CaypUsXe9eQ7KNIHLI+zPgwan+yf1iL6daF8uvRNT8SHCxTdRfVcwWaViQuh6/JbusxpSSojaT/BinCF/lItHC2+ixO1cQ7iFbBsaRyrEI76IUeaoMAUogqoNx+KdAYORMTcFI1i+6bw5TzsWY8Md8Kxn1YhvyeJv87LJjRhLyXLqzhp4XFjPUY0Vb9/iSihX7UfFoAPTPqmrlaATW6TEu0uo5fVJY6MWifAlcsuNGqL//saVqPHTiOqyEg1LcEUtdmR5+ljyMaSirV+pJA/vBNo61bjQeFzBf4d/kXiej0UQfLG1DFjUlYij++t6kr+EklYkwNYbfOQ75cLXrneG+nxjwg8KID2AVkjshLdjOfHFlGuzDTliId4lYU5FMdBl/dVS2u5qvVo8kaaTvvoAWjzp9KfdWHB1BmpAX06PblLWHnXuhJujBEyeT/9+D9eGmCmvYAsfLpky2hxWOHTkTbKGS9K60c2pHIhhzMRiOMZAVmbG7A2+7XdoaeBJ9cEHET09Ep2WY76jX5hTDbbA3xLZJB8e8O6TdCxXxp9xQvoPpmRK3rjsiun3thlFDBI=
email: false

cache:
Expand All @@ -13,8 +18,10 @@ cache:
install:
- pip install -U platformio
- platformio update
- platformio lib install

script:
- platformio run
- platformio check --environment debug
# - platformio test
- platformio test --environment native
- platformio check --fail-on-defect high
- wget -qO- https://raw.githubusercontent.com/Sarcasm/run-clang-format/master/run-clang-format.py | python - -r src include test
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,19 @@ build the release environment run:
pio run -e release

This only builds the project. To actually upload the project, connect the
input device and use the `--target (-t)` option.
input device and use the `--target (-t)` option. This will by default upload
the `debug` environment.

pio run -t upload

When you run the input device you can read the messages sent over the
USB serial by adding the `monitor` target.

pio run -t upload -t monitor

This will build, upload and then print messages sent over the serial
by the input device using `Serial.println()`.

## 🚀 Launch process
The input device can be launched with a ROS serial connection.
For this a workspace with the [march repository](https://github.com/project-march/march)
Expand Down
21 changes: 0 additions & 21 deletions examples/Button_example.cpp

This file was deleted.

34 changes: 0 additions & 34 deletions examples/Joystick_example.cpp

This file was deleted.

79 changes: 0 additions & 79 deletions examples/RockerSwitch+Screen_example.cpp

This file was deleted.

22 changes: 0 additions & 22 deletions examples/Rockerswitch_example.cpp

This file was deleted.

Loading

0 comments on commit acbb8bd

Please sign in to comment.