Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
181 commits
Select commit Hold shift + click to select a range
06e4fb0
DSO test directory added
madfrog54321 Jan 31, 2017
9f66050
Update DSO readme
madfrog54321 Jan 31, 2017
e2fb455
readme update
madfrog54321 Jan 31, 2017
ce1f689
SLAM update
madfrog54321 Feb 9, 2017
0b68363
Readme update
madfrog54321 Feb 9, 2017
cfd96c1
Added data structures and basic project setup.
Feb 16, 2017
63734c8
Moved headers to `include/` and fixed `CMakeLists.txt` to use globs i…
Feb 22, 2017
e2639eb
no message
Feb 23, 2017
11589f9
Update README.md
Feb 23, 2017
661ab81
fixed struct call in test
madfrog54321 Feb 24, 2017
278f759
Merge pull request #197 from USU-Robosub/feature/slam_kyler
madfrog54321 Feb 24, 2017
615b3bb
Update README.md
Feb 24, 2017
c3f8cd0
Update README.md
Feb 24, 2017
65eaf10
Update README.md
Feb 24, 2017
9dba22f
Update README.md
Feb 24, 2017
97b8b6a
Updated `CameraFrame` class and added tests for it.
Mar 1, 2017
de517a1
Merge pull request #208 from USU-Robosub/feature/slam_kyler
madfrog54321 Mar 2, 2017
8a9d107
Changed all instances of `uint8_t` to `unsigned char` and changed ins…
Mar 2, 2017
615a629
Serial Communication
TekuConcept Mar 16, 2017
23d1730
Updated Arduino Serial Calls
TekuConcept Mar 22, 2017
1609874
Adds Arduino Configuration
TekuConcept Mar 16, 2017
c7e94ff
Updates Thruster Control Names
TekuConcept Mar 16, 2017
b34020d
Update Web App to Reflect Peripheral Changes
TekuConcept Mar 16, 2017
37abf70
Web App Clean Up and Styling
TekuConcept Mar 16, 2017
1118b5f
Option to Enable Debug Mode
TekuConcept Mar 16, 2017
e15995c
Added Vector Class
TekuConcept Mar 19, 2017
ee9822f
Added Compass Helper Functions
TekuConcept Mar 19, 2017
dbf6165
structfordepthmap
Mar 23, 2017
78c1232
Merge pull request #211 from USU-Robosub/feature/SerialTests
TekuConcept Mar 23, 2017
e74a904
Renamed ackno to acknowledge
TekuConcept Mar 23, 2017
e2badd0
Using std::string instead of string literal
TekuConcept Mar 23, 2017
9cbbbb1
PinMap Uses Enums Instead of Definitions
TekuConcept Mar 23, 2017
7cc6bb3
Updated Controllers to Reflect PinMap Changes
TekuConcept Mar 24, 2017
4b885c6
Catch submodule added
madfrog54321 Mar 27, 2017
c67dd92
Catch library added to cmake
madfrog54321 Mar 27, 2017
306e2fa
ignore changed
madfrog54321 Mar 27, 2017
a8a4b85
ignore fixed
madfrog54321 Mar 27, 2017
eb20fa9
slam cmake updated
madfrog54321 Mar 27, 2017
0e4e729
Merge branch 'develop' into feature/slam
Mar 27, 2017
8a6c0d0
Merge branch 'feature/slam' into feature/slam_kyler
Mar 27, 2017
5c37611
Merge pull request #229 from USU-Robosub/feature/slam
Mar 27, 2017
3289000
Merge branch 'feature/slam' into feature/slam_kyler
Mar 29, 2017
f1a529c
Refactored `CameraFrame` class.
Mar 29, 2017
98f8bac
Modified CMakeLists.txt to link the slam library to the slam_tests ex…
Mar 30, 2017
9255477
Updated Serial Preprocessor Definitions
TekuConcept Mar 31, 2017
1660a32
Updated Command Preprocessor Definitions
TekuConcept Mar 31, 2017
bb06f8f
DSOcollector added and cmake update
madfrog54321 Apr 3, 2017
ea100f1
header added
madfrog54321 Apr 3, 2017
15a0938
basic tests added
madfrog54321 Apr 3, 2017
7981be4
Merge pull request #209 from USU-Robosub/feature/slam_kyler
Apr 3, 2017
04d6481
cmake updated and collector expanded
madfrog54321 Apr 4, 2017
8f2a2d2
Resolved an issue that prevented users from building the SLAM library.
Apr 5, 2017
abab525
Removed automatic git submodule initialization.
Apr 5, 2017
060c09d
Semi-implemented `TelemetryService`.
Apr 5, 2017
e44011f
Updates.
Apr 5, 2017
135585e
DSOcollector update
madfrog54321 Apr 5, 2017
b9e8d12
Using `std::unordered_set`
Apr 5, 2017
578edd0
Merge pull request #230 from USU-Robosub/feature/slam
madfrog54321 Apr 5, 2017
05caa2a
Revert "DSOcollector update"
Apr 5, 2017
48fee26
Changed name from StructDepthMap
Apr 6, 2017
b3e9c64
Changed to .h Files
Apr 6, 2017
cd63146
test updated
madfrog54321 Apr 6, 2017
3c955cf
fixing merge conflict
Apr 6, 2017
4c5a0e2
Merge branch 'feature/slam_aubrey' of https://github.com/USU-Robosub/…
Apr 6, 2017
0ab018d
merge fix
madfrog54321 Apr 6, 2017
6399d08
merge fix update
madfrog54321 Apr 6, 2017
296b992
Update testDepthMap.cpp
Apr 6, 2017
24bef96
Update DepthMap.h
Apr 6, 2017
65111c1
Update DepthMap.cpp
Apr 6, 2017
2b9dae1
Update testDepthMap.cpp
Apr 6, 2017
6d59632
Moved `testDepthMap.cpp` to `telemetry/DepthMapTest.cpp`, changed `D…
Apr 6, 2017
ccc300b
Merge pull request #225 from USU-Robosub/feature/slam_aubrey
madfrog54321 Apr 12, 2017
cca65ac
Merge branch 'develop' into feature/slam_collector
madfrog54321 Apr 12, 2017
de7840e
fixes
madfrog54321 Apr 12, 2017
910c480
cmake fix
madfrog54321 Apr 12, 2017
a670e90
fixed cmake scope problem
madfrog54321 Apr 13, 2017
6255e0c
Arduino Enum Renaming
TekuConcept Mar 31, 2017
6514cbf
Renamed LOG to DMSG
TekuConcept Apr 19, 2017
43b06d2
Renamed LOG to DMSG
TekuConcept Apr 19, 2017
164f492
Added missing serial device name
TekuConcept Apr 19, 2017
9a9836a
Merge pull request #242 from USU-Robosub/feature/serial-tools
Apr 19, 2017
3e296bb
Removed JSON Remnants From Arduino Code
TekuConcept Apr 19, 2017
2204bbf
Renamed Thruster Controller Addresses
TekuConcept Apr 19, 2017
79b78f7
Merge pull request #243 from USU-Robosub/test/define-map
Apr 19, 2017
ca20ef7
Merge branch 'develop' into refactor/ThrustControlNames
TekuConcept Apr 19, 2017
5613324
Merge pull request #213 from USU-Robosub/refactor/ThrustControlNames
Apr 19, 2017
84feb04
Merge branch 'develop' into feature/SerialCommunication
TekuConcept Apr 19, 2017
be54e07
Update Serial.cpp
TekuConcept Apr 19, 2017
c4e8db4
Update Serial.cpp
TekuConcept Apr 19, 2017
b96b0b5
Update Serial.cpp
TekuConcept Apr 19, 2017
48b45d8
Update Serial.cpp
TekuConcept Apr 19, 2017
cc18055
Update Serial.cpp
TekuConcept Apr 19, 2017
31b3efa
Update Serial.cpp
TekuConcept Apr 19, 2017
bb0bfbc
Merge pull request #212 from USU-Robosub/feature/SerialCommunication
Apr 19, 2017
a87e1e1
Readme updated and syntax fixed
madfrog54321 Apr 19, 2017
ba46a02
Update README.md
Apr 19, 2017
3061133
Merge pull request #237 from USU-Robosub/feature/slam_collector
Apr 19, 2017
91b1bac
fix for eigen3 include for slam
madfrog54321 Apr 26, 2017
a58df2c
Merge pull request #246 from USU-Robosub/slam_include_fix
Apr 26, 2017
d5026ff
Fixed Requested Changes
TekuConcept Apr 30, 2017
e681640
Merge pull request #214 from USU-Robosub/refactor/WebAppCleanup
Apr 30, 2017
993c210
Merge pull request #215 from USU-Robosub/feature/DebugModeOption
Apr 30, 2017
7e57511
Add ActionThread class to Peripherals
May 25, 2017
0d8704e
Some final fixes to Peripherals Serial events
Jun 14, 2017
5afc2ff
Peripherals use GPIO pins instead of Arduino serial
Jun 14, 2017
4e5314d
Fixes some typos
Jun 20, 2017
3a51351
ActionThread configures UART pins
Jun 14, 2017
fe82e55
Implements JS ActionSwitch
Jun 20, 2017
da0d356
Test script V1
Jun 20, 2017
232798d
First attempt at GoThroughGate
Jun 21, 2017
bbccdc3
Implements simple ticker and state machine for Gate task
Jun 21, 2017
6e02518
Fixes WebApp
Jun 23, 2017
fc43f9e
Merge pull request #250 from USU-Robosub/feature/js-action-switch
octoshrimpy Jun 26, 2017
5b5180c
Cleans up test file for the vector brain module.
kburgon Jun 27, 2017
c008010
Merge remote-tracking branch 'origin/develop' into feature/CompassHel…
kburgon Jun 27, 2017
d81e374
Encapsulates Vector functions inside a class
Jul 10, 2017
f911a2e
test
Jul 10, 2017
f55f13b
angles test
Jul 11, 2017
961c91a
Corrects vector directions
Jul 12, 2017
2311cbd
Removes CompassTools
Jul 12, 2017
abcfb7f
Adds a useful comment
Jul 12, 2017
90922dc
Added PID Controller
TekuConcept Mar 19, 2017
db28c1b
Adds Yaw PID (I think)
Jul 12, 2017
394bf8c
GoThroughGate attempts yaw while diving
Jul 12, 2017
3e0027a
Adds PidController and Vector classes to Peripherals.
Jul 15, 2017
85cc6f8
Some tweaking of the PID
Jul 15, 2017
58d60d9
Update IMU for new requirements
Jul 15, 2017
de87070
ThrustController uses PID for yaw
Jul 15, 2017
9a00da8
Updates dispatcher to use new interface
Jul 17, 2017
c9f212e
Predefined vectors are defined correctly
Jul 17, 2017
4fa1289
Fixes initializer list in Vector constructor
Jul 17, 2017
cbf48da
Adds template parameter to lock_guard that, I guess< is necessary for…
Jul 17, 2017
82e6f65
Some more Vector fixes
Jul 17, 2017
0812280
Forgot to pass the IMU into the ThrustController
Jul 17, 2017
47e9d19
Adds missing references to `updateMoveThruster()` and `updateDiveThru…
Jul 17, 2017
cfcd9b8
Update JavaScript to reflect API changes
Jul 17, 2017
678c3f5
Fixes Heading JSON
Jul 17, 2017
d15a20b
Fixing issues with Vector
Jul 17, 2017
cee1b8b
CommandDispatcher reports when a command is invalid
Jul 17, 2017
df7e27b
ThrustController waits timeDelta_ milliseconds between intervals
Jul 19, 2017
501c013
Adds ActionSwitch to WebApp
Jul 19, 2017
3da3466
Ensure thrusters really do die
Jul 19, 2017
512a9f5
ThrustController persists thrust configuration
Jul 19, 2017
0043e21
Merge branch 'feature/nathan-pid' into feature/web-kill-switch
Jul 25, 2017
1efb25f
Merge pull request #251 from USU-Robosub/feature/web-kill-switch
Jul 25, 2017
1e35b54
Adds ActionSwitch to WebApp
Jul 19, 2017
edf2252
Merge pull request #252 from USU-Robosub/feature/web-action-switch
madfrog54321 Jul 26, 2017
03622d5
Typo fixes
Jul 26, 2017
7fcff61
Merge remote-tracking branch 'origin/develop' into feature/nathan-pid
Jul 26, 2017
bd4b285
Removes `isDead_`
Jul 26, 2017
9003bd5
Merge pull request #253 from USU-Robosub/feature/nathan-pid
madfrog54321 Jul 26, 2017
6486b95
Test
Jesse-V Jul 28, 2017
2b9f96c
Basic main.cpp added with new SOS architecture.
konnorandrews Aug 2, 2017
9d1395b
Basic SOS now builds
konnorandrews Aug 3, 2017
ef53a10
remove googletest
konnorandrews Aug 3, 2017
277af4e
gtest and gmock tests added for some classes
konnorandrews Aug 3, 2017
e8db6a2
Basic readme added
madfrog54321 Aug 3, 2017
124e3d1
redesign of interface
madfrog54321 Aug 4, 2017
98774f5
submodule fixed
madfrog54321 Aug 4, 2017
0c756fa
Tests added exept for hub
madfrog54321 Aug 5, 2017
d73dc7c
Parts of hub implemented
madfrog54321 Aug 7, 2017
10f40b8
Router added to allow for easy communication between nodes
madfrog54321 Aug 7, 2017
0d6717b
C++ version moved to sub folder
madfrog54321 Aug 7, 2017
81e88bc
All tests pass (some missing)
madfrog54321 Aug 7, 2017
93a73d7
SOSdemo works and has terminal input
madfrog54321 Aug 7, 2017
01181f0
All tests added and passing
madfrog54321 Aug 8, 2017
bc08925
Message added to provide structure to messages
madfrog54321 Aug 17, 2017
05827eb
Added logging support to hub, and error handling to router
madfrog54321 Aug 21, 2017
304e928
Tests for Exit node rewriten, and creation method for messages added
madfrog54321 Aug 24, 2017
eea6798
README added to arduino controller
madfrog54321 Sep 9, 2017
aa1e04a
Table not rendered on Github
madfrog54321 Sep 9, 2017
a6bd832
issue and pull request templates edited/added
madfrog54321 Sep 9, 2017
72f04bd
info added to readme
madfrog54321 Sep 9, 2017
2d9c6de
directory added for vision library
madfrog54321 Sep 19, 2017
d0cf965
PoGen1 BeagleBone dump 9/19/2017
Sep 19, 2017
592671e
Merge pull request #254 from USU-Robosub/new_projects
konnorandrews Sep 25, 2017
dc1156a
Added OpenCV to vision
camilne Sep 28, 2017
7e78c08
Added OpenCV inclusion test
camilne Sep 30, 2017
d4cf5c7
Merge pull request #256 from USU-Robosub/vision/opencv
madfrog54321 Oct 1, 2017
b3a1b29
Merge commit '304e928db9a792113303893a07fdcd3e0ae3fad3' into temp/com…
madfrog54321 Oct 24, 2017
1be26f6
Merge pull request #258 from USU-Robosub/temp/comp-2017
konnorandrews Oct 25, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
53 changes: 46 additions & 7 deletions .github/ISSUE_TEMPLATE.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,12 +1,51 @@
## Summary
<!-- You can erase any parts of this template not applicable to your Issue. -->

[summary]
## Bug report

## Acceptance Criteria
Please replace this line with a brief summary of your issue **AND** if reporting a build issue include relevant terminal output.

When [external actor] does [action], [module]
- [ ] [Statement 1]
#### Context

## Non-functional Criteria
[this project is split into many parts, what part of the project contains the bug? Examples: Vision, Arduino Controller...]

[other non-functional criteria]
#### Process

[in an ordered list explain the process to finding and recreating the issue, example below]

1. User goes to delete a dataset (to save space or whatever)
2. User gets popup modal warning
3. User deletes and it's lost forever

#### Expected result

[describe what you would expect to have resulted from this process]

#### Current result

[describe what you currently experience from this process, and thereby explain the bug]

#### Possible Fix

[not obligatory, but suggest fixes or reasons for the bug]

* Modal tells the user what dataset is being deleted, like “You are about to delete this dataset: car_crashes_2014.”
* A temporary "Trashcan" where you can recover a just deleted dataset if you mess up (maybe it's only good for a few hours, and then it cleans the cache assuming you made the right decision).


## New feature request

[We will consider your request but it may be closed if it's something we're not actively planning to work on.]

Please replace this line with a summary of your suggested feature.

#### Requirements

[explain the concrete changes to the project needed for your feature, example below]

- [ ] Add a "Delete" button to the dataset management page.
- [ ] **Non concrete change:** Create system for showing messages to user.
- [ ] Add delete function to dataset interface.

#### Other thoughts

[explain any other ideas or thoughts you have about this feature.]
20 changes: 20 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!-- Checkboxes can be deleted if you have completed them. -->

### All Submissions:

- [ ] Have you checked to ensure there aren't other open [Pull Requests](../../pulls) for the same update/change?
- [ ] Have you selected someone, with knowledge of what you changed, to review this pull request?

<!-- You can erase any parts of this template not applicable to your Pull Request. -->

### New Feature Submissions:

1. [ ] Does your submission contain new tests, as applicable?
2. [ ] Does your submission pass all tests?
3. [ ] Have you lint your code locally prior to submission?

### Changes to Current Features:

- [ ] Have you added an explanation of what your changes do and why they should be included?
- [ ] Have you edited/written tests for your core changes, as applicable?
- [ ] Have you successfully ran tests with your changes locally?
226 changes: 211 additions & 15 deletions .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,26 +1,222 @@
###Git Ignore Filetypes###
Release/
Debug/
Build/
Drivers/
Catch/
googletest/
json/
TestFootage


# JetBrains
.idea/

#compiled source#
#################

# Created by https://www.gitignore.io/api/macos,windows,linux,jetbrains,cmake,c++,node

### C++ ###
# Prerequisites
*.d
*.cbp

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

Release/
Debug/
Build/
# Fortran module files
*.mod
*.smod

#cmake-generated files#
.cmake
# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app

### CMake ###
CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
Makefile
cmake-build-*
cmake_install.cmake
install_manifest.txt
compile_commands.json
CTestTestfile.cmake

### JetBrains ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff:
.idea/

## File-based project format:
*.iws

## Plugin-specific files:

# IntelliJ
/out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

### JetBrains Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721

# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr

### Linux ###
*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# NPM
# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

### macOS ###
*.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Submodules
Drivers/
googletest/
# Typescript v1 declaration files
typings/

TestFootage
# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env


### Windows ###
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk

# End of https://www.gitignore.io/api/macos,windows,linux,jetbrains,cmake,c++,node
6 changes: 6 additions & 0 deletions .gitmodules
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@
[submodule "googletest"]
path = Libraries/googletest
url = https://github.com/google/googletest.git
[submodule "Libraries/Catch"]
path = Libraries/Catch
url = https://github.com/philsquared/Catch.git
[submodule "Libraries/json"]
path = Libraries/json
url = https://github.com/nlohmann/json.git
52 changes: 27 additions & 25 deletions ArduinoController/ArduinoController.ino
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -7,41 +7,43 @@
#include "VoltageController.h"
#include "StartController.h"

const uint8_t KILLPIN = 50;
const uint8_t KILL_ADDR = 10;
const uint32_t CONTROLLER_CNT = 13u;
class IController* controllers[CONTROLLER_CNT];

void setup() {
delay(1);
Serial.begin(115200);
Serial.print('R');
Serial1.begin(9600);
DMSGN("Due Ready!");
SerialTools::writeString("Ready!", 6);

controllers[0] = new ThrustController(LEFT_FORWARD, 50);
controllers[1] = new ThrustController(RIGHT_FORWARD, 50);
controllers[2] = new ThrustController(LEFT_STRAFE, 50);
controllers[3] = new ThrustController(RIGHT_STRAFE, 50);
controllers[4] = new ThrustController(FRONT_DIVE);
controllers[5] = new ThrustController(BACK_DIVE);
controllers[6] = new EscController();
controllers[7] = new LedController();
controllers[8] = new PingController();
controllers[9] = new LightController();
controllers[11]= new VoltageController();
controllers[12]= new StartController();
controllers[KILL_ADDR]= new KillSwitchController(controllers, CONTROLLER_CNT, KILL_ADDR);
controllers[0]= new KillSwitchController(controllers, CONTROLLER_CNT);
attachInterrupt(
digitalPinToInterrupt(KILLPIN),
[](){((KillSwitchController*)controllers[KILL_ADDR])->isr(KILLPIN);},
digitalPinToInterrupt(GpioPin::KILLSWITCH_PIN),
[](){((KillSwitchController*)controllers[0])->isr(GpioPin::KILLSWITCH_PIN);},
CHANGE
);
while((!Serial.available())||(Serial.read()==0));
controllers[1] = new ThrustController(PwmPin::MOVE_PIN);
controllers[2] = new ThrustController(PwmPin::STRAFE_PIN);
controllers[3] = new ThrustController(PwmPin::DIVE_PIN);
controllers[4] = new ThrustController(PwmPin::YAW_PIN);
controllers[5] = new ThrustController(PwmPin::PITCH_PIN);
controllers[6] = new ThrustController(PwmPin::ROLL_PIN);
controllers[7] = new EscController();
controllers[8] = new LedController();
controllers[9] = new PingController();
controllers[10] = new LightController();
controllers[11] = new VoltageController();
controllers[12] = new StartController();

while((!Serial.available())||(Serial.read()==0));
}

void loop() {
if(Serial.available()) {
uint8_t controllerNumber = Serial.read();
if(controllerNumber < CONTROLLER_CNT)
// only execute if a command exists
controllers[controllerNumber]->execute();
uint8_t controllerIndex = SerialTools::readByte();
if(controllerIndex < CONTROLLER_CNT) {
// only execute if a command exists
DMSG("Controller: "); DMSGN(controllerIndex);
controllers[controllerIndex]->execute();
}
}
}
Loading