Motor is being implemented in this version. Trying to implement catching errors

Dependencies:   mbed Tracker

DumpTruck.h

Committer:
simplyellow
Date:
2017-02-07
Revision:
5:dc4cf6cc24b3
Parent:
3:cd6e2d7c7c9c

File content as of revision 5:dc4cf6cc24b3:

#ifndef MBED_DUMP_TRUCK_H
#define MBED_DUMP_TRUCK_H
 
#include "mbed.h"

class DumpTruck {
public:
    DumpTruck(int truckId);
    void drive(); // Drive DC motors with a desired motor speed and distance
    void stop();
    void Calibrate();
    //void RotateTo();
    //void BedDown(); 
    //void BedUp();   
    //void raiseTo();
    //void LowerBed();
    
  
protected:
    int truckNumber;
    float speed;                 // desired speed to drive the robot, a number between -1 and 1
    float distance;  
    float getDistance();            // input of desired distance to be traveled
    float setTruckSpeed();       // set truck speed
    float setTruckDistance();    // set distance to be traveled
    //getBedAngle(); //Get data from Bed potentiometer, Hari is looking into the component for this
    //getPivotAngle(double PivotAngle); //Get data from potentiometer
    //SetPivotSpeed(double PivotSpeed); //Set arbitrary rotation of servo motor
    //SetBedSpeed(); //Set arbitrary rotation of DC Motor
    //bool GetBedUpperSwitch(); //Checks if bed is all the way up
    //bool GetBedLowerSwitch(); //Checks if bed is all the way down
    //bool SwitchState; //Switch state variable for Up and down bed functions
    //float DesiredPivotAngle; // User Input of desired angle for the bed to be pivoted
    //float DesiredBedAngle; //User Input of desired bed angle to be raised.
    //float BedSpeed; //User input of desired speed for the dump truck's bed to rotate
    //float PivotSpeed; //User input of desired speed for the dump truck to pivot its back at
    
    //bool isCalibrated;// returns 0 and 1 to check if the robot has been calibrated
};
#endif