修复了djimotor发送时的致命错误,编写了shoot app的框架

This commit is contained in:
NeoZng
2022-12-04 20:26:15 +08:00
parent 8e32fc0e6f
commit e94bb504b8
12 changed files with 254 additions and 92 deletions

View File

@@ -43,6 +43,7 @@ void GimbalInit()
.controller_setting_init_config = {
.angle_feedback_source = MOTOR_FEED,
.speed_feedback_source = MOTOR_FEED,
.outer_loop_type=ANGLE_LOOP,
.close_loop_type = ANGLE_LOOP | SPEED_LOOP,
.reverse_flag = MOTOR_DIRECTION_REVERSE,
},
@@ -69,6 +70,7 @@ void GimbalInit()
.controller_setting_init_config = {
.angle_feedback_source = MOTOR_FEED,
.speed_feedback_source = MOTOR_FEED,
.outer_loop_type=ANGLE_LOOP,
.close_loop_type = ANGLE_LOOP | SPEED_LOOP,
.reverse_flag = MOTOR_DIRECTION_REVERSE,
},
@@ -101,7 +103,8 @@ void GimbalTask()
switch (gimbal_cmd_recv.gimbal_mode)
{
case GIMBAL_ZERO_FORCE:
DJIMotorStop();
DJIMotorStop(yaw_motor);
DJIMotorStop(pitch_motor);
break;
case GIMBAL_GYRO_MODE:
DJIMotorChangeFeed(yaw_motor, ANGLE_LOOP, OTHER_FEED);