diff --git a/src/app/inc/launch_task.h b/src/app/inc/launch_task.h index d7bdee0..cd3167f 100644 --- a/src/app/inc/launch_task.h +++ b/src/app/inc/launch_task.h @@ -4,7 +4,7 @@ #include #include "dji_motor.h" -#define FLYWHEEL_VELOCITY_10 (3000.0f * M3508_REDUCTION_RATIO) +#define FLYWHEEL_VELOCITY_LOW_FOR_DEBUG (1000.0f * M3508_REDUCTION_RATIO) #define FLYWHEEL_VELOCITY_30 (7000.0f * M3508_REDUCTION_RATIO) #define FEED_HOLE_NUM (6.0f) #define LAUNCH_FREQUENCY (20) diff --git a/src/app/src/launch_task.c b/src/app/src/launch_task.c index 3e24fac..b9add44 100644 --- a/src/app/src/launch_task.c +++ b/src/app/src/launch_task.c @@ -93,7 +93,7 @@ void Feed_Angle_Calc() #ifdef HEAT_CONTROL if (Referee_System.Online_Flag) { - if (Referee_System.Robot_State.Shooter_Power_Output == 0) + if (Referee_System.Robot_State.Shooter_Power_Output == 0 || !g_launch_target.burst_launch_flag) { g_launch_target.feed_angle = g_motor_feed->stats->total_angle_rad; } diff --git a/src/app/src/robot.c b/src/app/src/robot.c index da462ac..74111bf 100644 --- a/src/app/src/robot.c +++ b/src/app/src/robot.c @@ -212,6 +212,11 @@ void Robot_Cmd_Loop() { g_robot_state.autoaiming_enabled = 0; } + + if(Referee_System.Robot_State.Chassis_Power_Output == 0) + { + g_robot_state.spintop_mode = 0; + } /* Hardware Limits */ g_robot_state.gimbal_yaw_angle = fmod(g_robot_state.gimbal_yaw_angle, 2 * PI); diff --git a/src/devices/inc/referee_system.h b/src/devices/inc/referee_system.h index 069f359..46c3606 100644 --- a/src/devices/inc/referee_system.h +++ b/src/devices/inc/referee_system.h @@ -108,6 +108,7 @@ typedef struct uint16_t Shooter_Heat_2; uint8_t Shooting_Frequency; float Shooting_Speed; + uint8_t Shooter_Power_Output; }Referee_Robot_State_t; typedef struct diff --git a/src/devices/src/referee_system.c b/src/devices/src/referee_system.c index bc7cdf8..d141eee 100644 --- a/src/devices/src/referee_system.c +++ b/src/devices/src/referee_system.c @@ -34,6 +34,7 @@ void Referee_Set_Robot_State(void) Referee_Robot_State.Shooter_Heat_2 = Referee_System.Power_Heat.Shooter_2_17mm_Heat; Referee_Robot_State.Shooting_Frequency = Referee_System.Shooter.Frequency; Referee_Robot_State.Shooting_Speed = Referee_System.Shooter.Speed; + Referee_Robot_State.Shooter_Power_Output = Referee_System.Robot_State.Shooter_Power_Output; } else {