Buggy bois / Mbed 2 deprecated UDITTEST

Dependencies:   mbed

Robot.h

Committer:
mazdo25
Date:
2019-02-18
Revision:
0:f45212966fb1

File content as of revision 0:f45212966fb1:

class Robot {
    private:
    float robotAngularVelocity;
    float robotTranslationalVeocity;
    Wheel* leftWheel;
    Wheel* rightWheel;
    float static const distanceBetweenWheels = 0.19;
    
    public:
    Robot(Wheel* LW, Wheel* RW) {
        leftWheel = LW;
        rightWheel= RW;
        
        robotTranslationalVeocity = (lTemp + rTemp)/2;
        };
    
    void turn(float angularVelocity){//positive value is right, negative value is left
        
        };
        
    void calculateTranslationalVelocity(){
        robotTranslationalVeocity = (LW->calculateAngularVelocity() + RW->calculateAngularVelocity();)/2;
        }
        
    void calculateAngularVelocity(){
        robotAngularVelocity = (LW->calculateAngularVelocity() - RW->calculateAngularVelocity())/distanceBetweenWheels;
        }
    
    void Turn(float degrees){
        
        }
    
    };