diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2021-08-18 08:31:38 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2021-08-18 08:33:40 +0200 |
commit | 775199ec9da3bae2c16f0a7fe52a3ddb1addb36d (patch) | |
tree | b23e194cae428f9f478d50600ab0747ef1fec687 /logic/pipeline.cpp | |
parent | 72992a8b45987a46d8eaff90a46a87e765117302 (diff) |
logic/pipeline: fix toggle button
Issue: #1210
Diffstat (limited to 'logic/pipeline.cpp')
-rw-r--r-- | logic/pipeline.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/logic/pipeline.cpp b/logic/pipeline.cpp index 658c62bb..39c75e99 100644 --- a/logic/pipeline.cpp +++ b/logic/pipeline.cpp @@ -442,14 +442,13 @@ void pipeline::logic() nan_check(value); } - if (!hold_ordered) - goto ok; + goto ok; error: { QMutexLocker foo(&mtx); - value = output_pose; + value = last_value; raw = raw_6dof; // for widget last value display @@ -465,8 +464,10 @@ ok: for (int i = 0; i < 6; i++) value(i) = 0; - if (hold_ordered) value = output_pose; - else value = apply_zero_pos(value); + if (hold_ordered) + value = last_value; + last_value = value; + value = apply_zero_pos(value); ev.run_events(EV::ev_finished, value); libs.pProtocol->pose(value, raw); |