officinerobotiche / uNAV.X

Project MPLABX for drive uNAV on dsPIC33
http://rnext.it/project/unav/
MIT License
9 stars 2 forks source link

PWM Dead zone must be configurable #29

Open rbonghi opened 9 years ago

rbonghi commented 9 years ago

The Dead zone must be configurable to include all type of motors. We can set with a parameter, I think in InitPWM on:

SetMCPWM1DeadTimeGeneration(PWM1_DTA4 & PWM1_DTAPS1);

we add in parameter_motor float deadzone:

typedef struct parameter_motor {
    float k_vel;
    float k_ang;
    float deadzone;
    int8_t versus;
    uint8_t enable_set;
} parameter_motor_t;
#define LNG_PARAMETER_MOTOR sizeof(parameter_motor_t)

Do you agree? @katodo @guiott \cc @Marnic