summaryrefslogtreecommitdiff
path: root/robot/readme.md
diff options
context:
space:
mode:
Diffstat (limited to 'robot/readme.md')
-rw-r--r--robot/readme.md37
1 files changed, 26 insertions, 11 deletions
diff --git a/robot/readme.md b/robot/readme.md
index bb88e80..4a7aca3 100644
--- a/robot/readme.md
+++ b/robot/readme.md
@@ -17,6 +17,13 @@ device manager on windows, or by running `ls /dev/ttyACM*` on linux. once the
com port is configured, run `make flash` to upload the executable and
automatically reboot the robot.
+another fun option in the makefile is the SIM mode. by uncommenting the line `#
+SIM = true`, the robot code can be compiled for desktop debugging instead. all
+used pololu functions must be manually implemented in sim.c for this to work,
+but it allows easier debugging. *it's important that the `orangutan_shim.h`
+header is used instead of including `<pololu/orangutan.h>` directly for this to
+keep working!*
+
## module hierarchy
the software is divided into seperate 'modules' for organizational,
@@ -48,12 +55,12 @@ what they're supposed to do:
|module |internal name|author|purpose|
|----------------|-------------|-|-|
|hypervisor |`hypervisor `|N/a| backbone of all other modules; stores global variables; controls when other modules run|
-|pc communication|`sercomm `|Jorn & Abdullaahi| reads and parses incoming serial data; sends all data in the message buffer|
+|pc communication|`sercomm `|Fiona| reads and parses incoming serial data; sends all data in the message buffer|
|error handling |`errcatch `|Loek| receives error codes; controls how errors are handled|
-|i/o read & write|`io `|Fiona| reads all inputs to global state; writes all outputs|
+|i/o read & write|`io `|Jorn & Abdullaahi| reads all inputs to global state; writes all outputs|
|mode logic |`modes `|N/a| executes the appropriate module for current mode|
-|maze |`mode_maze `|TBD| controls robot during maze portion of map; hands off control to warehouse module|
-|warehouse |`mode_grid `|TDB| controls robot during warehouse portion of map; hands off control to maze module|
+|maze |`mode_maze `|Jorn & Abdullaahi| controls robot during maze portion of map; hands off control to warehouse module|
+|warehouse |`mode_grid `|Loek| controls robot during warehouse portion of map; hands off control to maze module|
|emergency stop |`mode_halt `|Fiona| stops all execution until emergency mode is reset by software or user|
|calibration |`mode_calb `|Fiona| find line by turning on own axis if lost|
@@ -86,6 +93,8 @@ this list will probably get updated from time to time:
- arbitrary numbers should be aliased to `#define` statements or `enum`s if
part of a series.
- general constants should be placed in `consts.h`
+- don't import `<pololu/orangutan.h>` directly, instead use
+ `"orangutan_shim.h"` to keep code compatible with the simulator
## todo
@@ -120,19 +129,25 @@ to act on accordingly.
the error handling module (a) provides functions for other modules to report
errors, and (b) handles errors accordingly.
-- [ ] create an error `struct` that holds:
- - [ ] error code
- - [ ] message length
- - [ ] message contents
-- [ ] create a global error ring buffer with an appropriate size that holds
+- [x] create an error `struct` that holds:
+ - [x] error code
+ - [x] message length
+ - [x] message contents
+- [x] create a global error ring buffer with an appropriate size that holds
error messages
- [ ] handle errors in the error buffer, referencing the functional
specification for details on what the robot should do to resolve each kind of
error
- [ ] forward error codes to the pc-communication module
-empty function declarations are in place for providing other modules an error
-reporting function.
+~empty function declarations are in place for providing other modules an error
+reporting function.~
+
+this module is as good as finished but full functionality is currently
+dependent on:
+
+- [ ] pc communication
+- [ ] other mode implementations
### i/o read & write