summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-03-10 17:07:43 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-03-10 18:35:13 +0100
commitaf292bc8dcf31d8df6d4500d63752f9e651cc5ac (patch)
tree9c064940a61314b8e3703d8b39b389d7b62ca808
parentb8c1037c67b9ff27f61ca389a05debd3e001d90e (diff)
logic/pipeline: loosen "reltrans when not aiming" limit
-rw-r--r--logic/pipeline.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/logic/pipeline.cpp b/logic/pipeline.cpp
index 0d9c2021..5dfe3ccb 100644
--- a/logic/pipeline.cpp
+++ b/logic/pipeline.cpp
@@ -75,10 +75,8 @@ Pose reltrans::apply_pipeline(reltrans_state state, const Pose& value, const vec
bool tcomp_in_zone_ = progn(
if (state == reltrans_non_center)
{
- const bool yaw_in_zone = std::fabs(value(Yaw)) < 50;
- const bool pitch_in_zone = std::fabs(value(Pitch)) < 40;
-
- return !(yaw_in_zone && pitch_in_zone);
+ const bool look_up = value(Pitch) < 15;
+ return look_up ? std::fabs(value(Yaw)) > 85 : std::fabs(value(Yaw)) < 50;
}
else
return true;