Main repository for dump truck API development in Spring 2017
Dependencies: Tracker mbed MotorV2 SRF05 nRF24L01P
Fork of DUMP_TRUCK_TEST_V1 by
Activities
This Week
If needed, please contact Milo Pan at mpan9@gatech.edu for rights and access to this repository.
Diff: DumpTruck.h
- Revision:
- 16:6530f62dd28b
- Parent:
- 15:a4bbdde8ed69
--- 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