修改热量控制
This commit is contained in:
@@ -103,6 +103,7 @@ inline float CalculateRpm(float bullet_speed, float fric_radius, bool is17mm) {
|
||||
if (is17mm) {
|
||||
if (bullet_speed == 15.0f) return 4670.f;
|
||||
if (bullet_speed == 18.0f) return 5200.f;
|
||||
if (bullet_speed == 25.0f) return 6600.f;
|
||||
if (bullet_speed == 30.0f) return 7350.f;
|
||||
} else {
|
||||
if (bullet_speed == 10.0f) return 4450.f;
|
||||
|
||||
@@ -188,7 +188,7 @@ static const Config_RobotParam_t param_default = {
|
||||
.cover_open_duty = 0.10f,
|
||||
.cover_close_duty = 0.050f,
|
||||
.model = SHOOT_MODEL_17MM,
|
||||
.bullet_speed = 30.f,
|
||||
.bullet_speed = 25.f,
|
||||
.min_shoot_delay = (uint32_t)(1000.0f / 10.0f),
|
||||
}, /* shoot */
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#define HEAT_INCREASE_17MM (10.f) /* 每发射一颗17mm弹丸增加10热量 */
|
||||
|
||||
#define BULLET_SPEED_LIMIT_42MM (16.0)
|
||||
#define BULLET_SPEED_LIMIT_17MM (30.0)
|
||||
#define BULLET_SPEED_LIMIT_17MM (25.0)
|
||||
|
||||
/* Private macro ------------------------------------------------------------ */
|
||||
/* Private variables -------------------------------------------------------- */
|
||||
@@ -84,7 +84,7 @@ static int8_t Shoot_HeatLimit(Shoot_t *s, Referee_ForShoot_t *s_ref) {
|
||||
/* 检测热量更新后,计算可发射弹丸 */
|
||||
if ((hc->heat != hc->last_heat) || (hc->heat == 0)) {
|
||||
hc->available_shot =
|
||||
(uint32_t)floorf((hc->heat_limit - hc->heat) / hc->heat_increase);
|
||||
(uint32_t)floorf((hc->heat_limit - hc->heat) / hc->heat_increase) - 2;
|
||||
hc->last_heat = hc->heat;
|
||||
}
|
||||
/* 计算已发射弹丸 */
|
||||
|
||||
Reference in New Issue
Block a user