Skip to content

Commit

Permalink
MADE IT TO THE KNOCKOUT STAGEgit add .git add .git add .git add .git …
Browse files Browse the repository at this point in the history
…add .git add .
  • Loading branch information
CuboiLeo committed Jun 17, 2024
1 parent 229ad1f commit b7c3607
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/inc/launch_task.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <stdint.h>
#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)
Expand Down
2 changes: 1 addition & 1 deletion src/app/src/launch_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
5 changes: 5 additions & 0 deletions src/app/src/robot.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions src/devices/inc/referee_system.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/devices/src/referee_system.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down

0 comments on commit b7c3607

Please sign in to comment.