pos-sys-cam: better tresholds for considering data invalid

Also this position system already works with the PID positioning already in place
striker
emamaker 2022-07-08 10:33:39 +02:00
parent 375f812d79
commit 52a557e88e
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ void PositionSysCamera::update()
int posya = CAMERA_GOAL_ATK_Y - distya;
int posyd = CAMERA_GOAL_DEF_Y + distyd;
if ((distxd * distxa < 0) || (CURRENT_DATA_READ.atkSeen && CURRENT_DATA_READ.defSeen && posya - posyd > 25)) data_valid = false;
if (((distxd * distxa < 0) && abs(distxd - distxa) > 10) || (CURRENT_DATA_READ.atkSeen && CURRENT_DATA_READ.defSeen && abs(posya - posyd) > 25)) data_valid = false;
if (data_valid)
{