Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

30 system implement ride task #43

Open
wants to merge 281 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
281 commits
Select commit Hold shift + click to select a range
ae7271c
test: completed github action
charliekush Jun 3, 2024
e9c696d
style: moved struct operator out of header
charliekush Jun 6, 2024
86a0e07
style: added documentation for gtests
charliekush Jun 6, 2024
96cff46
chore: added configs for debugging google tests
charliekush Jun 6, 2024
9036db8
style: removed relative paths in includes
charliekush Jun 6, 2024
cac077b
style: removed include paths and .o outputs
charliekush Jun 10, 2024
579eb3c
style: add docs for deployment
charliekush Jun 17, 2024
7ef0caa
style: moved test ensembles
charliekush Jun 17, 2024
478bae5
style: add docs for deployment
charliekush Jun 17, 2024
767f3a8
style: added documentation
charliekush Jun 18, 2024
6bb886a
style: fixed table init formatting
charliekush Jun 18, 2024
abfcc43
style: fixed line length of docs
charliekush Jun 19, 2024
a9cfa41
fix: added error handling for SCH
charliekush Jun 19, 2024
177cd27
fix: added error handling for SCH
charliekush Jun 19, 2024
f8e5331
fix: updated scheduler and gtests
charliekush Jun 29, 2024
8c41554
fix: updated scheduler and gtests
charliekush Jun 29, 2024
804c44e
fix: added build script for gtests
charliekush Jun 29, 2024
8a09950
style: updated docs
charliekush Jun 29, 2024
af33154
style: fixed formatting
charliekush Jun 29, 2024
c5a916c
reformatIMUdata
MAnn223 Jul 3, 2024
a9f8879
fixHeader
MAnn223 Jul 3, 2024
0ff532e
fix: fixed debug launcher
charliekush Jul 5, 2024
2c57296
chore: fixed logging for tests
charliekush Jul 9, 2024
7894e8a
user can specificy delay time and which sensors
MAnn223 Jul 9, 2024
5c526ef
fix: fixed json processing and output
charliekush Jul 10, 2024
ff34db8
style: functional comments no longer use doxygen
charliekush Jul 11, 2024
dd12837
add wet/dry sensor reading to sensor display
MAnn223 Jul 11, 2024
eba5611
add sampling time tests to cli
MAnn223 Jul 11, 2024
0d1644b
feat: implemented file based google tests
charliekush Jul 16, 2024
722a68a
feat: implemented file based google tests
charliekush Jul 16, 2024
56e8f42
style: split github workflows
charliekush Jul 16, 2024
a29a2be
style: split github workflows
charliekush Jul 16, 2024
a3d3fc8
style: changed nix cpp properties
charliekush Jul 16, 2024
92ee178
feat: implemented file based google tests
charliekush Jul 16, 2024
97b3cb3
fix: modified schedule struct
charliekush Jul 16, 2024
602b3e4
chore: removed python files from doxygen
charliekush Jul 16, 2024
23cba02
!fix: working on python proccessor
charliekush Jul 16, 2024
77a64d1
feat: completed file based testing
charliekush Jul 19, 2024
985663e
feat: completed file based testing
charliekush Jul 19, 2024
591d7ef
remove testing
MAnn223 Jul 22, 2024
e0511c9
fix: implemented scheduler and tests from last PR
charliekush Jul 22, 2024
f110a12
chore: converted launch tasks to use cmake tools
charliekush Jul 22, 2024
cc68275
update endianess
MAnn223 Jul 22, 2024
072f2d8
feat: added test case for hannah
charliekush Jul 23, 2024
930309d
fix: addressed issues with PR
charliekush Jul 25, 2024
4733511
feat: implemented dual scheduler testing
charliekush Jul 25, 2024
bf86bb0
feat: Adds AbstractScheduler.hpp
ntlhui Jul 25, 2024
e42fc03
!feat: implemented abstract scheduler
charliekush Aug 1, 2024
22eddf5
!feat: working on errors
charliekush Aug 2, 2024
25e2bb7
fix: updated scheduler gaurds
charliekush Aug 2, 2024
b07274a
fix: updated scheduler gaurds
charliekush Aug 2, 2024
55ecaf7
fix: changed scheduler directive
charliekush Aug 2, 2024
59b90dd
chore:cleaned Cmake and product.hpp from src files
charliekush Aug 2, 2024
ad46b9b
commented out priority
antara-chugh Aug 2, 2024
f91cebf
chore: updated ensemble struct
charliekush Aug 2, 2024
713c424
chore: removed product from src
charliekush Aug 2, 2024
42d087f
chore: added product header
charliekush Aug 2, 2024
06d0644
Impleted dual scheduler tests
charliekush Aug 5, 2024
af93722
Merge remote-tracking branch 'refs/remotes/origin/30-system-implement…
charliekush Aug 5, 2024
2b05e58
fix: fixed bug in antaras scheduler
charliekush Aug 5, 2024
db730bf
edits to antara schedule implementation
antara-chugh Aug 5, 2024
da695fc
Merge remote-tracking branch 'refs/remotes/origin/30-system-implement…
antara-chugh Aug 5, 2024
506022c
"merged"
antara-chugh Aug 5, 2024
98aca1f
edits to a_scheduler
antara-chugh Aug 5, 2024
059d590
antara scheduler fixed
antara-chugh Aug 5, 2024
1784777
test: created test case generator
charliekush Aug 6, 2024
ca30da1
test: created test case generator
charliekush Aug 6, 2024
fc8ad68
Merge remote-tracking branch 'refs/remotes/origin/30-system-implement…
charliekush Aug 6, 2024
46344f9
Merge remote-tracking branch 'refs/remotes/origin/30-system-implement…
charliekush Aug 6, 2024
c13c72b
added error handling and shift messages
antara-chugh Aug 6, 2024
6f3aeb0
deleted print statements
antara-chugh Aug 6, 2024
28c862d
Merge remote-tracking branch 'refs/remotes/origin/30-system-implement…
antara-chugh Aug 6, 2024
3e2db22
chore: updated test system
charliekush Aug 7, 2024
5bcf72c
fix: fixed bug in antaras scheduler
charliekush Aug 5, 2024
3a8fdf4
"merged"
antara-chugh Aug 5, 2024
14db5d9
edits to a_scheduler
antara-chugh Aug 5, 2024
1ea39d6
antara scheduler fixed
antara-chugh Aug 5, 2024
cb3baba
added error handling and shift messages
antara-chugh Aug 6, 2024
6b3ef8d
deleted print statements
antara-chugh Aug 6, 2024
d52972b
test: created test case generator
charliekush Aug 6, 2024
71b192a
test: created test case generator
charliekush Aug 6, 2024
2c65ab6
chore: updated test system
charliekush Aug 7, 2024
47a2e68
chore: added comments to scheduler
charliekush Aug 7, 2024
f55cf4b
Merge remote-tracking branch 'refs/remotes/origin/30-system-implement…
charliekush Aug 7, 2024
5f2f6a6
chore: delete sampling/share
charliekush Aug 7, 2024
310d33c
chore: consolidated schedulers
charliekush Aug 8, 2024
f071ea2
!chore: merged in consoldated scheduler
charliekush Aug 12, 2024
04455b8
fix: fixed issues with consolodated scheduler.
charliekush Aug 13, 2024
7fd57b1
style: fixed formatting
charliekush Aug 13, 2024
a32e98a
chore: deleted generated input files
charliekush Aug 13, 2024
d00f4b9
chore: consolodated schedulers
charliekush Aug 20, 2024
53b4925
onesample
MAnn223 Aug 21, 2024
629ed90
addDMPFunctions
MAnn223 Aug 22, 2024
a02b3d4
Initialize DMP
HannahCutler Aug 22, 2024
e17952a
Added whoAmI for DMP
HannahCutler Aug 22, 2024
0d62123
fix: delete floats
HannahCutler Aug 22, 2024
6216634
fix: delete duplicate initialization
HannahCutler Aug 22, 2024
62188f4
fix: accel accuracy
HannahCutler Aug 22, 2024
a814164
fix: changed acc_acc placement
HannahCutler Aug 23, 2024
258972f
chore: implemented changes from last review
charliekush Aug 23, 2024
3c60157
cliupdates
MAnn223 Aug 23, 2024
52a0cc7
fix: delete delay and
HannahCutler Aug 23, 2024
35a1666
removeraw
MAnn223 Aug 23, 2024
d2d1207
Merge branch 'test' of https://github.com/UCSD-E4E/smartfin-fw3 into …
HannahCutler Aug 23, 2024
307c358
latest test version
antara-chugh Aug 23, 2024
8f31d59
merging new updates
antara-chugh Aug 23, 2024
243be4d
edits to build test cases, deployment table variables are non const
antara-chugh Aug 23, 2024
2097ce3
fix: get rid of DMPRaw data
HannahCutler Aug 23, 2024
6ca0d91
added comments to scheduler
antara-chugh Aug 23, 2024
aba5399
chore: working on tests
charliekush Aug 23, 2024
325c82c
Merge remote-tracking branch 'refs/remotes/origin/30-system-implement…
charliekush Aug 23, 2024
8332768
fix: Fixes FW compilation errors
ntlhui Aug 23, 2024
44c752f
chore: cleaned up tests
charliekush Aug 23, 2024
9c3c6c1
Merge remote-tracking branch 'refs/remotes/origin/30-system-implement…
charliekush Aug 23, 2024
f6879a0
fix: Adds const to deployment schedule
ntlhui Aug 23, 2024
6827b8e
fix: Fixes pointers
ntlhui Aug 23, 2024
8d4680a
fix: changed FIFO read for accuracy
HannahCutler Aug 26, 2024
e97df11
chore: implemented changes from review
charliekush Aug 26, 2024
017916a
added print statements
HannahCutler Aug 26, 2024
c873699
fix: update imu address (change AD0)
MAnn223 Aug 26, 2024
17de57a
update cli imu
MAnn223 Aug 26, 2024
5b47539
chore: implemented changes from review
charliekush Aug 26, 2024
fef0959
chore: implemented changes from review
charliekush Aug 26, 2024
0914898
fix unused function
MAnn223 Aug 26, 2024
c6b061d
Merge remote-tracking branch 'origin/DMP-Work' into test
MAnn223 Aug 26, 2024
6e4a834
fix: merge
MAnn223 Aug 26, 2024
760d4a3
diagram for scheduler logic
antara-chugh Aug 26, 2024
d7f1a4d
pulled
antara-chugh Aug 27, 2024
bb891ce
chore: implemented changes from review
charliekush Aug 27, 2024
b6084eb
chore: implemented changes from review
charliekush Aug 27, 2024
e6094ea
added documentation sources
antara-chugh Aug 27, 2024
bf281b8
adding doxygen comments to fixed google tests
antara-chugh Aug 27, 2024
780c724
merged
antara-chugh Aug 27, 2024
67959f4
updated author list
antara-chugh Aug 27, 2024
c72bbd7
added current time definition
antara-chugh Aug 27, 2024
48db040
chore: implemented changes from review
charliekush Aug 27, 2024
5377e1c
Removed submodule external/googletest
ntlhui Aug 27, 2024
c15530d
Merge remote-tracking branch 'refs/remotes/origin/30-system-implement…
charliekush Aug 27, 2024
14607ad
ci: Fixes test script
ntlhui Aug 27, 2024
73f24d1
style: fixed spacing
charliekush Aug 27, 2024
486a902
chore: implemented changes from review
charliekush Aug 27, 2024
a365ab0
chore: implemented changes from review
charliekush Aug 27, 2024
5dba768
adding features to fixed tests
antara-chugh Aug 27, 2024
a65d40a
fix: cli updates p1
MAnn223 Aug 27, 2024
5f86724
fix: update constants
MAnn223 Aug 27, 2024
721bcbc
fix: update DMP functions
MAnn223 Aug 27, 2024
f7034c1
fix: update to enum
MAnn223 Aug 27, 2024
76a95ba
fix: revert to original debug cli
MAnn223 Aug 27, 2024
7e6bbc9
added test case
antara-chugh Aug 28, 2024
2c5ad90
chore: implemented changes from review
charliekush Aug 28, 2024
189b3fc
added doxygen comments and added functionality to fixed tests
antara-chugh Aug 28, 2024
b86bc2a
merging
antara-chugh Aug 28, 2024
14e5da9
chore: implemented changes from review
charliekush Aug 28, 2024
72eeeb0
Merge remote-tracking branch 'refs/remotes/origin/30-system-implement…
charliekush Aug 28, 2024
d0a2c27
chore: implemented changes from review
charliekush Aug 28, 2024
50d9aca
chore: implemented changes from review
charliekush Aug 28, 2024
045f6c7
chore: implemented changes from review
charliekush Aug 28, 2024
444ce3a
fix: update particle library to correct commit
MAnn223 Aug 28, 2024
ea69704
Merge branch 'test' into 30-system-implement-ride-task
MAnn223 Aug 28, 2024
3b10be6
Added documentation for creating new test cases and editted control_f…
antara-chugh Aug 29, 2024
410c77a
Merge branch '30-system-implement-ride-task' of https://github.com/UC…
antara-chugh Aug 29, 2024
b4000e5
commenting out file_google_tests from cmake to see if github compiles…
antara-chugh Aug 29, 2024
d667d32
fix!: figuring out file_google_tests.cpp segfault
charliekush Aug 29, 2024
c2c99b6
updated control_flow diagram png, edits to scheduler_documentation, a…
antara-chugh Aug 29, 2024
1c53e2a
Merge branch '30-system-implement-ride-task' of https://github.com/UC…
antara-chugh Aug 29, 2024
0bae9cc
test!: figuring out file_google_tests.cpp segfault
charliekush Aug 29, 2024
3ac61d9
Merge remote-tracking branch 'refs/remotes/origin/30-system-implement…
charliekush Aug 29, 2024
621921e
test!: figuring out file_google_tests.cpp segfault
charliekush Aug 29, 2024
20b94e3
test!: figuring out file_google_tests.cpp segfault
charliekush Aug 29, 2024
a5bdd44
test!: figuring out file_google_tests.cpp segfault
charliekush Aug 29, 2024
bd3ae6a
fix: fixed compilation issue
charliekush Aug 29, 2024
851fff4
fix: modified file writing and proccessing
charliekush Aug 29, 2024
92a1196
fix: modified file writing and proccessing
charliekush Aug 29, 2024
b2a6737
chore: cleaned github test workflow and configs
charliekush Aug 30, 2024
c126946
fix: integrate updated ensembles with scheduler
MAnn223 Aug 30, 2024
e3cd6f8
fix: update comments
MAnn223 Aug 30, 2024
ad765ce
Updated refs and bibilography for documentation to use bibtex format
antara-chugh Aug 30, 2024
71eeb32
merge
antara-chugh Aug 30, 2024
2fd6692
fixed syntax
antara-chugh Aug 30, 2024
9c61b90
Merge remote-tracking branch 'origin/main' into 30-system-implement-r…
ntlhui Oct 16, 2024
a8fa6a0
chore: Adds cpp tools extension
ntlhui Oct 16, 2024
46aef37
style: Fixes styling and docs
ntlhui Oct 16, 2024
c8fef88
chore: Adds GitHub Actions extension
ntlhui Oct 16, 2024
d55f502
docs: Adds note to init submodules
ntlhui Oct 16, 2024
70f08a8
ci: Cleans up test workflow
ntlhui Oct 16, 2024
f7c3d70
chore: Adds gitlens
ntlhui Oct 16, 2024
e0ba745
fix: Re-enables semantic release
ntlhui Oct 16, 2024
0645bb5
chore: Removes nonfunctional debug modes
ntlhui Oct 16, 2024
9936942
chore: Removes vs code tasks
ntlhui Oct 17, 2024
9b3b69d
chore: Fixes cmake project name
ntlhui Oct 17, 2024
ca01dd6
style Fixes trailing commas
ntlhui Oct 17, 2024
312117e
chore: Standardizes on Particle c++11
ntlhui Oct 17, 2024
ee9409e
docs: Updates english
ntlhui Oct 17, 2024
19285be
chore: Updates png
ntlhui Oct 17, 2024
743fa6e
chore: Updates tooling for latex
ntlhui Oct 18, 2024
f84cabf
fix: Allows compiling under c++14 for x86
ntlhui Oct 18, 2024
5ae74f2
style: Formats table
ntlhui Oct 18, 2024
31577e3
chore: Enables latexindent
ntlhui Oct 18, 2024
de29f3e
style: Corrects LaTeX styling
ntlhui Oct 18, 2024
4b15984
Merge remote-tracking branch 'origin/main' into 30-system-implement-r…
ntlhui Oct 18, 2024
13d51b7
docs: Adds doxygen and graphviz
ntlhui Oct 18, 2024
9aafe4b
docs: Adds file scope docs
ntlhui Oct 18, 2024
dcf217a
docs: Cleans up docstrings
ntlhui Oct 18, 2024
a533c48
style: Fixes extra space
ntlhui Oct 18, 2024
c53d209
style: Organizes includes
ntlhui Oct 18, 2024
f4f28af
style: Formats CLI_menu
ntlhui Oct 18, 2024
8607e49
chore: Sets editor columns to 100
ntlhui Oct 18, 2024
629204c
style: Formats previously modified lines
ntlhui Oct 23, 2024
8811376
docs: Fixes RGB color table for CLI
ntlhui Oct 30, 2024
bb1f4ee
fix: Adds QOL prints
ntlhui Oct 31, 2024
15913a3
chore: Adds todo notation
ntlhui Oct 31, 2024
3f77c93
style: Reformatted function
ntlhui Oct 31, 2024
d6385f0
style: Fixes empty string concat
ntlhui Oct 31, 2024
93ab759
style: Formats table
ntlhui Oct 31, 2024
e6ec8e2
style: Formats enum
ntlhui Oct 31, 2024
a947cca
style: Formats modified line
ntlhui Oct 31, 2024
b96b7a2
style: Formats modified line
ntlhui Oct 31, 2024
f0bc97d
docs: Fixes documentation
ntlhui Oct 31, 2024
21c6c85
style: Formats document
ntlhui Oct 31, 2024
aa501d9
docs: Adds file docstring
ntlhui Oct 31, 2024
a6fd08b
docs: Fixes docstring
ntlhui Oct 31, 2024
0524c96
style: formats line
ntlhui Oct 31, 2024
02265c8
style: Organizes includes
ntlhui Oct 31, 2024
88a28e7
docs: Cleans up docstrings
ntlhui Oct 31, 2024
f5c802f
style: Formats document
ntlhui Oct 31, 2024
4b2f8d2
docs: Adds docstrings
ntlhui Nov 1, 2024
2581eb0
chore: Adds doxygen runner options
ntlhui Nov 1, 2024
2cc173e
Merge branch '30-system-implement-ride-task' into integratingEnsembles
ntlhui Nov 1, 2024
d1d58d0
Integrating ensembles (#54)
ntlhui Nov 1, 2024
294203c
chore: Removes extra whitespace
ntlhui Nov 1, 2024
76e99b0
style: Formats code
ntlhui Nov 1, 2024
585f81a
style: Formats document
ntlhui Nov 1, 2024
e2cc59c
docs: Updates ride LED table
ntlhui Nov 1, 2024
a3a5f7a
feat: Adds english output to FLOG dump
ntlhui Nov 1, 2024
b33cbe9
style: Organizes includes
ntlhui Nov 1, 2024
864ff10
style: Formats state object table
ntlhui Nov 1, 2024
32c105e
docs: Updates docstrings
ntlhui Nov 1, 2024
c063faf
style: Formats document
ntlhui Nov 1, 2024
cf0bcb4
feat: Merges flog and scheduler_test_flog
ntlhui Nov 1, 2024
ae897ef
fix: Fixes gcc FLOG display
ntlhui Nov 1, 2024
3557682
docs: Updates file docstring
ntlhui Nov 1, 2024
ccc9e99
docs: Organizes includes
ntlhui Nov 1, 2024
c992495
style: Formats document
ntlhui Nov 1, 2024
af4a65f
feat: Adds log formatter
ntlhui Nov 1, 2024
6fd6047
style: Fixes formatting and platform spec
ntlhui Nov 1, 2024
c620a28
feat: Implemented ensemble hooks
ntlhui Nov 1, 2024
e252dd4
feat: Adds state start flog formatter
ntlhui Nov 1, 2024
a363b25
fix: Fixes task print format
ntlhui Nov 1, 2024
c29055f
fix: Adds src/states.cpp to compile list
ntlhui Nov 1, 2024
0c9cc2d
Merge remote-tracking branch 'origin/main' into 30-system-implement-r…
ntlhui Nov 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,36 @@ jobs:
path: |
${{ steps.compile.outputs.firmware-path }}
${{ steps.compile.outputs.target-path }}
test:
needs: [compile]
runs-on: ubuntu-latest
steps:

- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive

- name: Create folder
run: mkdir -p external/

- name: Set up environment
run: |
sudo apt-get update && sudo apt-get install -y cmake g++
- name: add googletest
run: |
git submodule init
git submodule update



- name: Build and run tests
run: |
mkdir -p tests/build
cd tests/build
cmake ..
make
./googletests.o
release:
needs: [compile]
runs-on: ubuntu-latest
Expand Down Expand Up @@ -66,4 +95,4 @@ jobs:
env:
github-token: ${{ secrets.GITHUB_TOKEN }}
run: |
npx semantic-release@23
npx semantic-release@23
24 changes: 21 additions & 3 deletions .gitignore
ntlhui marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Created by https://www.toptal.com/developers/gitignore/api/c++,linux,macos,windows,particle,python
# Edit at https://www.toptal.com/developers/gitignore?templates=c++,linux,macos,windows,particle,python
# Created by https://www.toptal.com/developers/gitignore/api/c++,linux,macos,python,windows,particle,cmake
# Edit at https://www.toptal.com/developers/gitignore?templates=c++,linux,macos,python,windows,particle,cmake

### C++ ###
# Prerequisites
Expand Down Expand Up @@ -35,6 +35,23 @@
*.out
*.app

### CMake ###
CMakeLists.txt.user
CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
Makefile
cmake_install.cmake
install_manifest.txt
compile_commands.json
CTestTestfile.cmake
_deps

### CMake Patch ###
# External projects
*-prefix/

### Linux ###
*~

Expand Down Expand Up @@ -287,10 +304,11 @@ $RECYCLE.BIN/
# Windows shortcuts
*.lnk

# End of https://www.toptal.com/developers/gitignore/api/c++,linux,macos,windows,particle,python
# End of https://www.toptal.com/developers/gitignore/api/c++,linux,macos,python,windows,particle,cmake
smartfin-fw3.cpp
target/
*.bin
nul
out/docs/application/Service Diagram.png
out/docs/fw_flow/Firmware Flowchart.png

3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "lib/SparkFun_ICM-20948_ParticleLibrary"]
path = lib/SparkFun_ICM-20948_ParticleLibrary
url = https://github.com/UCSD-E4E/SparkFun_ICM-20948_ParticleLibrary.git
[submodule "external/googletest"]
path = external/googletest
url = https://github.com/google/googletest.git
41 changes: 41 additions & 0 deletions .vscode/c_cpp_properties.json
ntlhui marked this conversation as resolved.
Show resolved Hide resolved
ntlhui marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,47 @@
"${workspaceFolder}\\src"
]
}
},
{
"name": "Particle_nix",
"includePath":
[
"${workspaceFolder}/src",
charliekush marked this conversation as resolved.
Show resolved Hide resolved
"~/.particle/toolchains/deviceOS/5.3.0/user/inc",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not include Particle

Ensure that you also include the directories specified in CMakeLists.txt

"/usr/include/"

],
"defines":
[
"_DEBUG",
"UNICODE",
"_UNICODE"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are missing TEST_VERSION and GTESTING=1 to be the same as your CMakeLists.txt

],
"compilerPath": "/usr/bin/gcc",
"intelliSenseMode": "linux-gcc-arm",
"cStandard": "c14",
"cppStandard": "c++14",
"configurationProvider": "particle.particle-vscode-core",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be ms-vscode.cmake-tools, not Particle!

"mergeConfigurations": true,
"browse":
{
"limitSymbolsToIncludedHeaders": true,
"path":
[
"${default}",
"~/.particle/toolchains/deviceOS/5.3.0/user/inc",
"~/.particle/toolchains/deviceOS/5.3.0/hal/inc",
"~/.particle/toolchains/deviceOS/5.3.0/hal/shared",
"~/.particle/toolchains/deviceOS/5.3.0/hal/src/gcc",
"~/.particle/toolchains/deviceOS/5.3.0/hal/src/nRF52840/posix",
"~/.particle/toolchains/deviceOS/5.3.0/services/inc",
"~/.particle/toolchains/deviceOS/5.3.0/system",
"~/.particle/toolchains/deviceOS/5.3.0/wiring",
"~/.particle/toolchains/deviceOS/5.3.0/third_party/nrf5_sdk/nrf5_sdk/modules/nrfx/mdk",
"${workspaceFolder}/src"
]
},
"compilerArgs": []
}
],
"version": 4
Expand Down
1 change: 1 addition & 0 deletions external/googletest
Submodule googletest added at a7f443
2 changes: 1 addition & 1 deletion src/cellular/dataUpload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ STATES_e DataUpload::run(void)

if (!this->initSuccess)
{
SF_OSAL_printf("Failed to init\n");
SF_OSAL_printf("Failed to init" __NL__);
return STATE_DEEP_SLEEP;
}

Expand Down
6 changes: 3 additions & 3 deletions src/cellular/recorder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ int Recorder::closeSession(void)
{
if (nullptr == this->pSession)
{
SF_OSAL_printf("REC::CLOSE Already closed\n");
SF_OSAL_printf("REC::CLOSE Already closed" __NL__);
return 1;
}

Expand Down Expand Up @@ -482,15 +482,15 @@ int Recorder::putBytes(const void* pData, size_t nBytes)
{
this->dataBuffer[this->dataIdx] = 0;
}
// SF_OSAL_printf("Flushing\n");
// SF_OSAL_printf("Flushing" __NL__);
this->pSession->write(this->dataBuffer, SF_PACKET_SIZE);

memset(this->dataBuffer, 0, REC_MEMORY_BUFFER_SIZE);
this->dataIdx = 0;
}

// data guaranteed to fit
// SF_OSAL_printf("Putting %u bytes\n", nBytes);
// SF_OSAL_printf("Putting %u bytes" __NL__, nBytes);
memcpy(&this->dataBuffer[this->dataIdx], pData, nBytes);
this->dataIdx += nBytes;
return 0;
Expand Down
43 changes: 23 additions & 20 deletions src/cli/conio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ char SF_OSAL_printfBuffer[SF_OSAL_PRINTF_BUFLEN];
extern "C"
{
// Determines if key has been pressed
int kbhit(void)
int kbhit(void)
{
return Serial.available();
}
Expand All @@ -41,7 +41,7 @@ extern "C"
// Write character
int putch(int ch)
{
Serial.print((char) ch);
Serial.print((char)ch);
return ch;
}

Expand All @@ -56,31 +56,33 @@ extern "C"
if (kbhit())
{
userInput = getch();
switch(userInput)
switch (userInput)
{
case '\b':
i--;
putch('\b');
putch(' ');
putch('\b');
break;
default:
buffer[i++] = userInput;
putch(userInput);
break;
case '\r':
buffer[i++] = 0;
putch('\r');
putch('\n');
return i;
case '\b':
i--;
putch('\b');
putch(' ');
putch('\b');
break;
default:
buffer[i++] = userInput;
putch(userInput);
break;
case '\r':
buffer[i++] = 0;
putch('\r');
putch('\n');
return i;
}
}
}
return i;
}



// Print char array to terminal
int SF_OSAL_printf(const char* fmt, ...) {
int SF_OSAL_printf(const char* fmt, ...)
{
va_list vargs;
int nBytes = 0;
va_start(vargs, fmt);
Expand All @@ -89,4 +91,5 @@ extern "C"
Serial.write(SF_OSAL_printfBuffer);
return nBytes;
}

}
13 changes: 7 additions & 6 deletions src/cli/conio.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,39 +11,40 @@ extern "C"
#endif
/**
* @brief Gets character from serial
*
*
* @return int key thats pressed
*/
int getch(void);
/**
* @brief Checks if key is pressed
*
*
* @return int whether key is pressed
*/
int kbhit(void);
/**
* @brief Pushes character to serial
*
*
* @param ch character to push
* @return int Sucsess value
*/
int putch(int ch);
/**
* @brief Printf equivilent
*
*
* @param fmt initial text
* @param ... values to push
* @return int 1 if sucssesful
* @return int 1 if sucssesful
*/
int SF_OSAL_printf(const char* fmt, ...);

#ifdef PARTICLE
/**
* @brief Gets user input lin
* @param buffer buffer to write too
* @param buflen length of buffer
*/
int getline(char* buffer, int buflen);

#endif
#ifdef __cplusplus
}
#endif
Expand Down
6 changes: 3 additions & 3 deletions src/cli/flog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,14 @@ void FLOG_DisplayLog(void)
uint32_t i;
if (!FLOG_IsInitialized())
{
SF_OSAL_printf("Fault Log not initialized!\n");
SF_OSAL_printf("Fault Log not initialized!" __NL__);
return;
}

i = 0;
if (flogData.numEntries > FLOG_NUM_ENTRIES)
{
SF_OSAL_printf("Fault Log overrun!\n");
SF_OSAL_printf("Fault Log overrun!" __NL__);
i = flogData.numEntries - FLOG_NUM_ENTRIES;
}

Expand All @@ -152,7 +152,7 @@ void FLOG_DisplayLog(void)
FLOG_FindMessage((FLOG_CODE_e)flogData.flogEntries[i & (FLOG_NUM_ENTRIES - 1)].errorCode),
flogData.flogEntries[i & (FLOG_NUM_ENTRIES - 1)].param);
}
SF_OSAL_printf("\n");
SF_OSAL_printf("" __NL__);
}
void FLOG_ClearLog(void)
{
Expand Down
2 changes: 1 addition & 1 deletion src/cli/menuItems/debugCommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ void CLI_createTestFile(void)

if (fd != -1) {
for(int ii = 0; ii < 100; ii++) {
String msg = String::format("testing %d\n", ii);
String msg = String::format("testing %d" __NL__, ii);
SF_OSAL_printf("Creating file with msg %s" __NL__, msg.c_str());

int i = write(fd, msg.c_str(), msg.length());
Expand Down
2 changes: 1 addition & 1 deletion src/cli/menuItems/systemCommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void CLI_doUpload(void)

void CLI_self_identify(void)
{
SF_OSAL_printf("Smartfin ID: %s\n", pSystemDesc->deviceID);
SF_OSAL_printf("Smartfin ID: %s" __NL__, pSystemDesc->deviceID);
VERS_printBanner();
}

37 changes: 37 additions & 0 deletions src/ensembles.cpp
ntlhui marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#include "ensembles.hpp"

ntlhui marked this conversation as resolved.
Show resolved Hide resolved
#ifndef TEST_VERSION
#include "Particle.h"
#else
#include "../tests/scheduler_test_system.hpp"
#endif


void SS_ensembleAInit(DeploymentSchedule_t* pDeployment)
{
return;
}
void SS_ensembleAFunc(DeploymentSchedule_t* pDeployment)
{
delay(400);
}


void SS_ensembleBInit(DeploymentSchedule_t* pDeployment)
{
return;
}
void SS_ensembleBFunc(DeploymentSchedule_t* pDeployment)
{
delay(200);

}

void SS_ensembleCInit(DeploymentSchedule_t* pDeployment)
{
return;
}
void SS_ensembleCFunc(DeploymentSchedule_t* pDeployment)
{
delay(600);
}
8 changes: 8 additions & 0 deletions src/ensembles.hpp
ntlhui marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#include "scheduler.hpp"
ntlhui marked this conversation as resolved.
Show resolved Hide resolved

void SS_ensembleAInit(DeploymentSchedule_t* pDeployment);
void SS_ensembleAFunc(DeploymentSchedule_t* pDeployment);
void SS_ensembleBInit(DeploymentSchedule_t* pDeployment);
void SS_ensembleBFunc(DeploymentSchedule_t* pDeployment);
void SS_ensembleCInit(DeploymentSchedule_t* pDeployment);
void SS_ensembleCFunc(DeploymentSchedule_t* pDeployment);
Loading
Loading