|
@ -55,7 +55,7 @@ static chip_cfg_t chipcfg = { |
|
|
|
|
|
|
|
|
static StepMotor45::cfg_t cfg1 = { |
|
|
static StepMotor45::cfg_t cfg1 = { |
|
|
.max_pos = -1, |
|
|
.max_pos = -1, |
|
|
.enable_zero_limit = false, |
|
|
|
|
|
|
|
|
.enable_zero_limit = true, |
|
|
.enable_max_pos_limit = false, |
|
|
.enable_max_pos_limit = false, |
|
|
.mirror = true, |
|
|
.mirror = true, |
|
|
|
|
|
|
|
@ -69,13 +69,13 @@ static StepMotor45::cfg_t cfg1 = { |
|
|
|
|
|
|
|
|
static StepMotor45::cfg_t cfg2 = { |
|
|
static StepMotor45::cfg_t cfg2 = { |
|
|
.max_pos = -1, |
|
|
.max_pos = -1, |
|
|
.enable_zero_limit = false, |
|
|
|
|
|
|
|
|
.enable_zero_limit = true, |
|
|
.enable_max_pos_limit = false, |
|
|
.enable_max_pos_limit = false, |
|
|
.mirror = true, |
|
|
.mirror = true, |
|
|
|
|
|
|
|
|
.zeroPin = PG1, |
|
|
.zeroPin = PG1, |
|
|
.ioPollType = ZGPIO::kMode_pullup, |
|
|
.ioPollType = ZGPIO::kMode_pullup, |
|
|
.zeroPinMirror = false, |
|
|
|
|
|
|
|
|
.zeroPinMirror = true, |
|
|
|
|
|
|
|
|
.driverPin = {PG2, PG3, PG4, PG5}, |
|
|
.driverPin = {PG2, PG3, PG4, PG5}, |
|
|
.driverPinMirror = true, |
|
|
.driverPinMirror = true, |
|
@ -83,13 +83,13 @@ static StepMotor45::cfg_t cfg2 = { |
|
|
|
|
|
|
|
|
static StepMotor45::cfg_t cfg3 = { |
|
|
static StepMotor45::cfg_t cfg3 = { |
|
|
.max_pos = -1, |
|
|
.max_pos = -1, |
|
|
.enable_zero_limit = false, |
|
|
|
|
|
|
|
|
.enable_zero_limit = true, |
|
|
.enable_max_pos_limit = false, |
|
|
.enable_max_pos_limit = false, |
|
|
.mirror = true, |
|
|
.mirror = true, |
|
|
|
|
|
|
|
|
.zeroPin = PB12, |
|
|
.zeroPin = PB12, |
|
|
.ioPollType = ZGPIO::kMode_pullup, |
|
|
.ioPollType = ZGPIO::kMode_pullup, |
|
|
.zeroPinMirror = false, |
|
|
|
|
|
|
|
|
.zeroPinMirror = true, |
|
|
|
|
|
|
|
|
.driverPin = {PG6, PG7, PG8, PC6}, |
|
|
.driverPin = {PG6, PG7, PG8, PC6}, |
|
|
.driverPinMirror = true, |
|
|
.driverPinMirror = true, |
|
@ -147,7 +147,7 @@ FeiTeServoMotor g_feiteservomotor_bus; |
|
|
*******************************************************************************/ |
|
|
*******************************************************************************/ |
|
|
StepMotor45 g_step_motor45[7]; |
|
|
StepMotor45 g_step_motor45[7]; |
|
|
Eq20ServoMotor g_main_servo_motor; |
|
|
Eq20ServoMotor g_main_servo_motor; |
|
|
MiniRobotCtrlModule g_mini_servo[5]; |
|
|
|
|
|
|
|
|
MiniRobotCtrlModule g_mini_servo[6]; |
|
|
/*******************************************************************************
|
|
|
/*******************************************************************************
|
|
|
* CANÉ豸 * |
|
|
* CANÉ豸 * |
|
|
*******************************************************************************/ |
|
|
*******************************************************************************/ |
|
@ -210,6 +210,7 @@ void Main::run() { |
|
|
g_mini_servo[2].initialize(&g_feiteservomotor_bus, 3); |
|
|
g_mini_servo[2].initialize(&g_feiteservomotor_bus, 3); |
|
|
g_mini_servo[3].initialize(&g_feiteservomotor_bus, 4); |
|
|
g_mini_servo[3].initialize(&g_feiteservomotor_bus, 4); |
|
|
g_mini_servo[4].initialize(&g_feiteservomotor_bus, 5); |
|
|
g_mini_servo[4].initialize(&g_feiteservomotor_bus, 5); |
|
|
|
|
|
g_mini_servo[5].initialize(&g_feiteservomotor_bus, 6); |
|
|
|
|
|
|
|
|
StepMotor45Scheduler step_motor45_scheduler; |
|
|
StepMotor45Scheduler step_motor45_scheduler; |
|
|
step_motor45_scheduler.initialize(&htim10, 1000); |
|
|
step_motor45_scheduler.initialize(&htim10, 1000); |
|
@ -240,6 +241,7 @@ void Main::run() { |
|
|
g_script_mini_servo_motor_ctrl_module.regmodule(3, &g_mini_servo[2]); |
|
|
g_script_mini_servo_motor_ctrl_module.regmodule(3, &g_mini_servo[2]); |
|
|
g_script_mini_servo_motor_ctrl_module.regmodule(4, &g_mini_servo[3]); |
|
|
g_script_mini_servo_motor_ctrl_module.regmodule(4, &g_mini_servo[3]); |
|
|
g_script_mini_servo_motor_ctrl_module.regmodule(5, &g_mini_servo[4]); |
|
|
g_script_mini_servo_motor_ctrl_module.regmodule(5, &g_mini_servo[4]); |
|
|
|
|
|
g_script_mini_servo_motor_ctrl_module.regmodule(6, &g_mini_servo[5]); |
|
|
|
|
|
|
|
|
g_script_step_motor45.initialize(&g_cmdScheduler); |
|
|
g_script_step_motor45.initialize(&g_cmdScheduler); |
|
|
g_script_step_motor45.regmodule(1, &g_step_motor45[0]); |
|
|
g_script_step_motor45.regmodule(1, &g_step_motor45[0]); |
|
|