1

Dependencies:   mbed

struct.h

Committer:
shaorui
Date:
2021-01-25
Revision:
0:571a1835428e

File content as of revision 0:571a1835428e:

#ifndef STRUCT_H
#define STRUCT_H

#include "mbed.h"



typedef struct{
    DigitalIn *indicate;//brake chufa tiaojian 
    DigitalOut *brake; //used for brake
    } GPIOStruct;
    
    
typedef struct{
                        
    float theta_mech, theta_elec;                           // Rotor mechanical and electrical angle
    float dtheta_mech, dtheta_elec, dtheta_elec_filt;       // Rotor mechanical and electrical angular velocit
    
    float theta_joint, theta_joint_raw, theta_joint_raw_pre,theta_joint_raw_fil; //hjb added
    int loop_count;                                         // Degubbing counter
    float v_ref, fw_int;                                     // output voltage magnitude, field-weakening integral
    float cogging[128];
      float angle,angle1;//shaorui add  for test
    } ControllerStruct;
#endif