再次修补

This commit is contained in:
2026-03-21 17:39:35 +08:00
parent b00b3ec349
commit 93e794339f
3 changed files with 6 additions and 5 deletions

View File

@@ -139,8 +139,9 @@ void Solver::solve(Armor & armor) const
// 平衡不做yaw优化因为pitch假设不成立
auto is_balance = (armor.type == ArmorType::big) &&
(armor.name == ArmorName::three || armor.name == ArmorName::four ||
armor.name == ArmorName::five);
(armor.name == ArmorName::B3 || armor.name == ArmorName::B4 ||
armor.name == ArmorName::B5 || armor.name == ArmorName::R3 ||
armor.name == ArmorName::R4 || armor.name == ArmorName::R5);
if (is_balance) return;
optimize_yaw(armor);

View File

@@ -81,7 +81,7 @@ bool ArmorFinder::sendBoxPosition(uint16_t shoot_delay) {
double pitch_comp = BallisticSolver::get_pitch(x_target, y_target, MUZZLE_VELOCITY, BALLISTIC_K);
// 计算是否满足开火条件 (例如残差小于 1.5 度)
can_fire = AutoTrigger::should_fire(yaw, pitch_comp, 1.5);
can_fire = AutoTrigger::should_fire(*this, MUZZLE_VELOCITY, yaw, pitch_comp, 1.5);
return sendTarget(serial, yaw, pitch_comp, dist * 100.0, shoot_delay);
}