Main repository for dump truck API development in Spring 2017

Dependencies:   Tracker mbed MotorV2 SRF05 nRF24L01P

Fork of DUMP_TRUCK_TEST_V1 by Terrabots

Activities

This Week

If needed, please contact Milo Pan at mpan9@gatech.edu for rights and access to this repository.

Files at this revision

API Documentation at this revision

Comitter:
simplyellow
Date:
Tue Apr 25 21:00:53 2017 +0000
Parent:
15:a4bbdde8ed69
Commit message:
cleaned for doxygen

Changed in this revision

DumpTruck.cpp Show annotated file Show diff for this revision Revisions of this file
DumpTruck.h Show annotated file Show diff for this revision Revisions of this file
diff -r a4bbdde8ed69 -r 6530f62dd28b DumpTruck.cpp
--- a/DumpTruck.cpp	Tue Apr 25 20:54:15 2017 +0000
+++ b/DumpTruck.cpp	Tue Apr 25 21:00:53 2017 +0000
@@ -76,7 +76,6 @@
     received = false;
     //acked to receive command
     sendAck();
-    //possibly implement kill switch/stop current action
     //code for receiving
     while(!received) {
         if (nrf->readable()) {
diff -r a4bbdde8ed69 -r 6530f62dd28b DumpTruck.h
--- a/DumpTruck.h	Tue Apr 25 20:54:15 2017 +0000
+++ b/DumpTruck.h	Tue Apr 25 21:00:53 2017 +0000
@@ -12,17 +12,13 @@
 
 #include "mbed.h"
 #include "Tracker.h"
-//#include "IMU.h"
 #include "Motor.h"
-#include "nRF24L01P.h" //Transceiver library
+#include "nRF24L01P.h"
 #include "SRF05.h"
 #include "commands.h"
 
 #define TRANSFER_SIZE   8
 
-
-// ADD SWITCHES & ULTRASONIC SENSOR implementation
-
 /**
 *   @class DumpTruck
 *
@@ -38,78 +34,80 @@
     */
     DumpTruck(int truckId);
 
-    /*
+    /**
     *   Process command, parsing it and calling the associated function.
     */
     void processCommand();
 
-    /*
+    /**
     *   Send not acknowledge to base station.
     */
 
     void sendNack();
 
-    /*
+    /**
     *   Send acknowledge to base station.
     */
 
     void sendAck();
     
-    /*
+    /**
     *   Initialize transceiver and other miscellaneous devices.
     */
     void startComms();
     
-    /*
+    /**
     *   Receive a command from base station.
     */
     void getCommand();
     
-    /*
+    /**
     *   Send important data back to the base station.
     */
     void reportData();
 
-    // motor functions
-    /*
+    /**
     *   Drive a certain distance at a desired speed.
     */
     void driveDistance();// frontMotor
-    /*
+    
+    /**
     *   Drive at a desired speed.
     */
     void drive();
-    /*
+    
+    /**
     *   Turn the rear wheels a certain angle.
     */
     void turn();                 // turnMotor
-    /*
+    
+    /**
     *   Move the dump truck's bed up/down a certain angle.
     */
     void moveBed();  // bedMotor
-    /*
+    
+    /**
     *   Stop driving.
     */
     void stopDrive();                            // all Motors
     
-    /*
+    /**
     *   Stop turning.
     */
     void stopTurn();                            // all Motors
     
-    /*
+    /**
     *   Stop all motors if an object comes within range of the
     *   ultrasonic sensor
     */
     void detectStop();
 
-    /*
+    /**
     *   Stop bed.
     */
     void stopBed();                            // all Motors
 
-    // ultrasonic functions
-    /*
+    /**
     *   Read from the ultrasonic sensor and determine the dump truck's
     *   proximity from objects.
     */
@@ -154,10 +152,5 @@
     // ultrasonic-specific variables
     bool tooClose;
     float proximity;
-    
-    /*int txDataCnt;
-    int rxDataCnt;
-    char txData[TRANSFER_SIZE], rxData[TRANSFER_SIZE];
-    bool received;*/
 };
 #endif