diff options
Diffstat (limited to 'logic/pipeline.cpp')
-rw-r--r-- | logic/pipeline.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/logic/pipeline.cpp b/logic/pipeline.cpp index 776d13bb..bab7f5e1 100644 --- a/logic/pipeline.cpp +++ b/logic/pipeline.cpp @@ -129,11 +129,13 @@ void pipeline::logic() } Pose value, raw; + bool disabled[6]; for (int i = 0; i < 6; i++) { auto& axis = m(i); int k = axis.opts.src; + disabled[i] = k == 6; if (k < 0 || k >= 6) value(i) = 0; else @@ -326,6 +328,11 @@ void pipeline::logic() for (int i = 0; i < 3; i++) value(i) += neck(i) + rel(i); + // relative translation can move it + for (unsigned k = 0; k < 6; k++) + if (disabled[k]) + value(k) = 0; + nanp |= is_nan(neck) | is_nan(rel) | is_nan(value); } |