From 2b21a1552d1a5b107120f4ac2e9ac357c999cc34 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Tue, 16 Jun 2009 13:50:02 +0000 Subject: Remove hardcoded DOT path from all Doxygen config files. Better documentation for the MissleLauncher project - add credit to PyLauncher project. --- Projects/Magstripe/Doxygen.conf | 2 +- Projects/MissleLauncher/Doxygen.conf | 2 +- Projects/MissleLauncher/MissileLauncher.c | 55 +++++++++++++++++++++++-------- 3 files changed, 44 insertions(+), 15 deletions(-) (limited to 'Projects') diff --git a/Projects/Magstripe/Doxygen.conf b/Projects/Magstripe/Doxygen.conf index f5bfcf492..b959ff8b6 100644 --- a/Projects/Magstripe/Doxygen.conf +++ b/Projects/Magstripe/Doxygen.conf @@ -1420,7 +1420,7 @@ DOT_IMAGE_FORMAT = png # The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. -DOT_PATH = "C:/Program Files/Graphviz2.18/bin" +DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the diff --git a/Projects/MissleLauncher/Doxygen.conf b/Projects/MissleLauncher/Doxygen.conf index f5c1a11ff..c40d4d99b 100644 --- a/Projects/MissleLauncher/Doxygen.conf +++ b/Projects/MissleLauncher/Doxygen.conf @@ -1420,7 +1420,7 @@ DOT_IMAGE_FORMAT = png # The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. -DOT_PATH = "C:/Program Files/Graphviz2.18/bin" +DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the diff --git a/Projects/MissleLauncher/MissileLauncher.c b/Projects/MissleLauncher/MissileLauncher.c index e70187be5..aefeb7475 100644 --- a/Projects/MissleLauncher/MissileLauncher.c +++ b/Projects/MissleLauncher/MissileLauncher.c @@ -10,6 +10,9 @@ USB Missle Launcher Demo Copyright (C) Dave Fletcher, 2009. fletch at fletchtronics dot net + + Based on research by Scott Weston at + http://code.google.com/p/pymissle */ /* @@ -50,23 +53,49 @@ #include "MissileLauncher.h" -/** Command constants */ -uint8_t CMD_INITA[8] = { 85, 83, 66, 67, 0, 0, 4, 0 }; -uint8_t CMD_INITB[8] = { 85, 83, 66, 67, 0, 64, 2, 0 }; -uint8_t CMD_STOP[8] = { 0, 0, 0, 0, 0, 0, 8, 8 }; -uint8_t CMD_LEFT[8] = { 0, 1, 0, 0, 0, 0, 8, 8 }; -uint8_t CMD_RIGHT[8] = { 0, 0, 1, 0, 0, 0, 8, 8 }; -uint8_t CMD_UP[8] = { 0, 0, 0, 1, 0, 0, 8, 8 }; -uint8_t CMD_DOWN[8] = { 0, 0, 0, 0, 1, 0, 8, 8 }; -uint8_t CMD_LEFTUP[8] = { 0, 1, 0, 1, 0, 0, 8, 8 }; -uint8_t CMD_RIGHTUP[8] = { 0, 0, 1, 1, 0, 0, 8, 8 }; -uint8_t CMD_LEFTDOWN[8] = { 0, 1, 0, 0, 1, 0, 8, 8 }; -uint8_t CMD_RIGHTDOWN[8] = { 0, 0, 1, 0, 1, 0, 8, 8 }; -uint8_t CMD_FIRE[8] = { 0, 0, 0, 0, 0, 1, 8, 8 }; +/** Launcher first init command report data sequence */ +static const uint8_t CMD_INITA[8] = { 85, 83, 66, 67, 0, 0, 4, 0 }; +/** Launcher second init command report data sequence */ +static const uint8_t CMD_INITB[8] = { 85, 83, 66, 67, 0, 64, 2, 0 }; + +/** Launcher command report data sequence to stop all movement */ +static const uint8_t CMD_STOP[8] = { 0, 0, 0, 0, 0, 0, 8, 8 }; + +/** Launcher command report data sequence to move left */ +static const uint8_t CMD_LEFT[8] = { 0, 1, 0, 0, 0, 0, 8, 8 }; + +/** Launcher command report data sequence to move right */ +static const uint8_t CMD_RIGHT[8] = { 0, 0, 1, 0, 0, 0, 8, 8 }; + +/** Launcher command report data sequence to move up */ +static const uint8_t CMD_UP[8] = { 0, 0, 0, 1, 0, 0, 8, 8 }; + +/** Launcher command report data sequence to move down */ +static const uint8_t CMD_DOWN[8] = { 0, 0, 0, 0, 1, 0, 8, 8 }; + +/** Launcher command report data sequence to move left and up */ +static const uint8_t CMD_LEFTUP[8] = { 0, 1, 0, 1, 0, 0, 8, 8 }; + +/** Launcher command report data sequence to move right and up */ +static const uint8_t CMD_RIGHTUP[8] = { 0, 0, 1, 1, 0, 0, 8, 8 }; + +/** Launcher command report data sequence to move left and down */ +static const uint8_t CMD_LEFTDOWN[8] = { 0, 1, 0, 0, 1, 0, 8, 8 }; + +/** Launcher command report data sequence to move right and down */ +static const uint8_t CMD_RIGHTDOWN[8] = { 0, 0, 1, 0, 1, 0, 8, 8 }; + +/** Launcher command report data sequence to fire a missle */ +static const uint8_t CMD_FIRE[8] = { 0, 0, 0, 0, 0, 1, 8, 8 }; + +/** Last command sent to the launcher, to determine what new command (if any) must be sent */ uint8_t* CmdState; + +/** Buffer to hold a command to send to the launcher */ uint8_t CmdBuffer[LAUNCHER_CMD_BUFFER_SIZE]; + /** Main program entry point. This routine configures the hardware required by the application, then * starts the scheduler to run the application tasks. */ -- cgit v1.2.3