Better documentation for the MissleLauncher project - add credit to PyLauncher project.
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
# The tag DOT_PATH can be used to specify the path where the dot tool can be \r
# found. If left blank, it is assumed the dot tool can be found in the path.\r
\r
-DOT_PATH = "C:/Program Files/Graphviz2.18/bin"\r
+DOT_PATH = \r
\r
# The DOTFILE_DIRS tag can be used to specify one or more directories that \r
# contain dot files that are included in the documentation (see the \r
USB Missle Launcher Demo\r
Copyright (C) Dave Fletcher, 2009.\r
fletch at fletchtronics dot net\r
+ \r
+ Based on research by Scott Weston at\r
+ http://code.google.com/p/pymissle\r
*/\r
\r
/*\r
\r
#include "MissileLauncher.h"\r
\r
-/** Command constants */\r
-uint8_t CMD_INITA[8] = { 85, 83, 66, 67, 0, 0, 4, 0 };\r
-uint8_t CMD_INITB[8] = { 85, 83, 66, 67, 0, 64, 2, 0 };\r
-uint8_t CMD_STOP[8] = { 0, 0, 0, 0, 0, 0, 8, 8 };\r
-uint8_t CMD_LEFT[8] = { 0, 1, 0, 0, 0, 0, 8, 8 };\r
-uint8_t CMD_RIGHT[8] = { 0, 0, 1, 0, 0, 0, 8, 8 };\r
-uint8_t CMD_UP[8] = { 0, 0, 0, 1, 0, 0, 8, 8 };\r
-uint8_t CMD_DOWN[8] = { 0, 0, 0, 0, 1, 0, 8, 8 };\r
-uint8_t CMD_LEFTUP[8] = { 0, 1, 0, 1, 0, 0, 8, 8 };\r
-uint8_t CMD_RIGHTUP[8] = { 0, 0, 1, 1, 0, 0, 8, 8 };\r
-uint8_t CMD_LEFTDOWN[8] = { 0, 1, 0, 0, 1, 0, 8, 8 };\r
-uint8_t CMD_RIGHTDOWN[8] = { 0, 0, 1, 0, 1, 0, 8, 8 };\r
-uint8_t CMD_FIRE[8] = { 0, 0, 0, 0, 0, 1, 8, 8 };\r
+/** Launcher first init command report data sequence */\r
+static const uint8_t CMD_INITA[8] = { 85, 83, 66, 67, 0, 0, 4, 0 };\r
\r
+/** Launcher second init command report data sequence */\r
+static const uint8_t CMD_INITB[8] = { 85, 83, 66, 67, 0, 64, 2, 0 };\r
+\r
+/** Launcher command report data sequence to stop all movement */\r
+static const uint8_t CMD_STOP[8] = { 0, 0, 0, 0, 0, 0, 8, 8 };\r
+\r
+/** Launcher command report data sequence to move left */\r
+static const uint8_t CMD_LEFT[8] = { 0, 1, 0, 0, 0, 0, 8, 8 };\r
+\r
+/** Launcher command report data sequence to move right */\r
+static const uint8_t CMD_RIGHT[8] = { 0, 0, 1, 0, 0, 0, 8, 8 };\r
+\r
+/** Launcher command report data sequence to move up */\r
+static const uint8_t CMD_UP[8] = { 0, 0, 0, 1, 0, 0, 8, 8 };\r
+\r
+/** Launcher command report data sequence to move down */\r
+static const uint8_t CMD_DOWN[8] = { 0, 0, 0, 0, 1, 0, 8, 8 };\r
+\r
+/** Launcher command report data sequence to move left and up */\r
+static const uint8_t CMD_LEFTUP[8] = { 0, 1, 0, 1, 0, 0, 8, 8 };\r
+\r
+/** Launcher command report data sequence to move right and up */\r
+static const uint8_t CMD_RIGHTUP[8] = { 0, 0, 1, 1, 0, 0, 8, 8 };\r
+\r
+/** Launcher command report data sequence to move left and down */\r
+static const uint8_t CMD_LEFTDOWN[8] = { 0, 1, 0, 0, 1, 0, 8, 8 };\r
+\r
+/** Launcher command report data sequence to move right and down */\r
+static const uint8_t CMD_RIGHTDOWN[8] = { 0, 0, 1, 0, 1, 0, 8, 8 };\r
+\r
+/** Launcher command report data sequence to fire a missle */\r
+static const uint8_t CMD_FIRE[8] = { 0, 0, 0, 0, 0, 1, 8, 8 };\r
+\r
+/** Last command sent to the launcher, to determine what new command (if any) must be sent */\r
uint8_t* CmdState;\r
+\r
+/** Buffer to hold a command to send to the launcher */\r
uint8_t CmdBuffer[LAUNCHER_CMD_BUFFER_SIZE];\r
\r
+\r
/** Main program entry point. This routine configures the hardware required by the application, then\r
* starts the scheduler to run the application tasks.\r
*/\r