再次修补
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user