Newer
Older
#include "motor.h"
#include "oled.h"
#include "list_motor.h"
motor_t gm6020;
const pid_struct_t M3508_pid_speed = {
2, 0.005, 2, 16000, 16000
};
const pid_struct_t M3508_pid_pos = {
0.1, 0.005, 0, 16000, 16000
};
const pid_struct_t GM6020_pid_speed = {
40, 3, 0, 30000, 30000
};
const pid_struct_t GM6020_pid_pos = {
30, 4, 15, 10000, 10000
};
void motors_init(void){
gm6020.type = GM6020;
gm6020.can_info.can_id = 0;
gm6020.can_info.tx_id = 1;
gm6020.can_info.rx_id = 0x205;
gm6020.pid_pos = GM6020_pid_pos;
gm6020.pid_speed = GM6020_pid_speed;
}