summaryrefslogtreecommitdiffhomepage
path: root/logic
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-05-04 12:42:03 +0200
committerStanislaw Halik <sthalik@misaki.pl>2018-05-05 12:34:52 +0200
commit79aa6295923ad94cf565ad395e61de9e24b0a4d0 (patch)
tree1bc66156a33baf9bdf7f63600c912ffe45964f6e /logic
parent13171dea89657b71072f5e665c71b7cc7fc467d3 (diff)
logic/pipeline: cleanup, use aggregate init
Diffstat (limited to 'logic')
-rw-r--r--logic/pipeline.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/logic/pipeline.cpp b/logic/pipeline.cpp
index 7f390ae1..5420c112 100644
--- a/logic/pipeline.cpp
+++ b/logic/pipeline.cpp
@@ -75,7 +75,7 @@ euler_t reltrans::rotate(const rmat& R, const euler_t& in, vec3_bool disable) co
Pose reltrans::apply_pipeline(reltrans_state state, const Pose& value,
const vec6_bool& disable, bool neck_enable, int neck_z)
{
- euler_t rel(static_cast<const double*>(value));
+ euler_t rel((const double*)(value));
if (state != reltrans_disabled)
{
@@ -320,7 +320,7 @@ void pipeline::maybe_set_center_pose(const Pose& value, bool own_center_logic)
rotation.inv_rot_center = rotation.rotation.t();
//scaled_rotation.rot_center = scaled_rotation.rotation.t();
- t_center = euler_t(static_cast<const double*>(value));
+ t_center = euler_t((const double*)(value));
}
}
}
@@ -451,20 +451,18 @@ void pipeline::logic()
const bool own_center_logic = center_ordered && libs.pTracker->center();
const bool hold_ordered = get(f_enabled_p) ^ get(f_enabled_h);
- Pose value, raw;
- vec6_bool disabled;
-
{
Pose tmp;
libs.pTracker->data(tmp);
- nan_check(tmp);
ev.run_events(EV::ev_raw, tmp);
newpose = tmp;
}
- std::tie(raw, value, disabled) = get_selected_axis_value(newpose);
+ auto [raw, value, disabled] = get_selected_axis_value(newpose);
logger.write_pose(raw); // raw
+ nan_check(newpose, raw, value);
+
value = clamp_value(value);
{