added serial up, down, left and right control

Dependencies:   mbed

Fork of Robot_a_cables_v3_6 by RaC2018

rac.h

Committer:
protongamer
Date:
2018-05-28
Revision:
10:fb3542f3c5e6

File content as of revision 10:fb3542f3c5e6:

#ifndef RAC_H
#define RAC_H

class RAC{
    
    public:
    
    void readButtons(uint8_t SWX, uint8_t SWY, uint8_t BPO);
    void setVelocity(double velXin, double velYin, double centerRef, bool t_mode);
    void readPosition(double *cX, double *cY, bool *t_mode);
    void readVelocity(double *rvx, double *rvy);
    void send(int id, char octet_emis[], char RouD, char longueur );
    
    private:
    
    uint8_t _SWX, _SWY, _BPO;
    int _x, _y, _ctr_x, _ctr_y;
    float _VX, _VY;    
    long int _VM_L, _VM_R;           
    char _command[8];
    double _dy, _dx;//coordinates values when origin is done
    //these positions are in counters
    int32_t _p1, _p2; //motors positions
    int32_t _p_actual, _p_actual2, _p_pom, _p_pom2; //p_actual position read by can, p_pom position done when origin is made
    int32_t _lx, _l1, _l2;
    double _rvx, _rvy;
    };




#endif RAC_H