手動bのほぼ全部

Dependents:   kobayashi_rei 2019BSyudo Bsyudo 2019Bsyudo

states.h

Committer:
THtakahiro702286
Date:
2019-09-09
Revision:
4:eafd5a0c3351
Parent:
3:2b909340be04
Child:
5:3273db2411d8
Child:
6:3cb78320d4db

File content as of revision 4:eafd5a0c3351:

#ifndef STATES_H
#define STATES_H

#include "mbed.h"
#include "PID.h"
#include "pin_config.h"
#include "PS3.h"
#include "R1370.h"
#include "wheelUnit.h"
#include "mechanism.h"
#include "serialArduino.h"

#define front 0
#define right 90
#define back 180
#define left -90


class States
{
public:
    States();
    void tellAngle();
    void tellPad();
    void move();
private:
    /*非常停止*/
    DigitalOut emStop;
    
    /*モーター系*/
    WheelUnit omni;
    Serial serial;

    /*角度制御*/
    R1370 gyro;
    PID anglePID;
    float nowAngle;
    int idealAngle;
    float deviation;
    float turnPower;
    int state;
    
    /*昇降 機構*/
    Mechanism mechanism;

    /*コントローラ系*/
    PS3 pad;
    int stick[4],trigger[2];
    int b[12],b2[12],b3[12];
    float rad[2],norm[2];
    int check;
    
    /*arduino*/
    SerialArduino nano;
};
#endif