From 65966c1497cbcf2c9556a754ab4e1ddef5957cfb Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 19 Jul 2015 17:05:11 +0200 Subject: nix camera settings. fix mappings not saving. --- facetracknoir/trackhat-wizard.ui | 95 ---------------------------------------- facetracknoir/wizard.cpp | 22 ++++------ facetracknoir/wizard.h | 1 - 3 files changed, 8 insertions(+), 110 deletions(-) (limited to 'facetracknoir') diff --git a/facetracknoir/trackhat-wizard.ui b/facetracknoir/trackhat-wizard.ui index 99c44ba9..059f1629 100644 --- a/facetracknoir/trackhat-wizard.ui +++ b/facetracknoir/trackhat-wizard.ui @@ -19,101 +19,6 @@ QWizard::NoCancelButton - - - Introduction - - - - - - - - - This wizard helps you configure TrackHat hardware. Add a logo here. More placeholder text. - - - - - - - - Camera setup - - - - - - Detected PS3 Eye camera. Setting it up now. A logo and some more placeholder text. - - - - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - - - - 640x480, 75 Hz - - - - - 640x480, 60 Hz - - - - - 320x240, 189 Hz - - - - - 320x240, 120 Hz - - - - - - - - Resolution and framerate - - - - - - - Field of view - - - - - - - - 56° - - - - - 75° - - - - - - - - - Select a model diff --git a/facetracknoir/wizard.cpp b/facetracknoir/wizard.cpp index 9ee4ffb8..669a9c27 100644 --- a/facetracknoir/wizard.cpp +++ b/facetracknoir/wizard.cpp @@ -53,20 +53,15 @@ void Wizard::set_data() else // ui.cap_model m = Cap; - auto camera_mode = static_cast(ui.resolution_select->currentIndex()); - - settings_pt pt; State state; set_mapping(state.pose(TZ), tz); set_mapping(state.pose(Yaw), yaw); set_mapping(state.pose(Pitch), pitch); set_mapping(state.pose(Roll), roll); + state.pose.save_mappings(); - pt.threshold = 31; - pt.min_point_size = 2; - pt.max_point_size = 50; - + settings_pt pt; switch (m) { default: @@ -74,9 +69,12 @@ void Wizard::set_data() case ClipRight: pt.t_MH_x = ClipRightX; pt.t_MH_y = 0; pt.t_MH_z = 0; break; case ClipLeft: pt.t_MH_x = ClipLeftX; pt.t_MH_y = 0; pt.t_MH_z = 0; break; } - - pt.camera_mode = camera_mode; - pt.fov = ui.camera_fov->currentIndex(); + pt.threshold = 31; + pt.min_point_size = 2; + pt.max_point_size = 50; + pt.fov = 1; + pt.camera_mode = 0; + pt.b->save(); settings_accela acc; acc.ewma = 49; @@ -84,9 +82,5 @@ void Wizard::set_data() acc.rot_deadzone = 29; acc.trans_deadzone = 33; acc.trans_threshold = 19; - acc.b->save(); - pt.b->save(); - - qDebug() << "wizard done" << "model" << m << "camera-mode" << camera_mode; } diff --git a/facetracknoir/wizard.h b/facetracknoir/wizard.h index 9b0172f5..b0398915 100644 --- a/facetracknoir/wizard.h +++ b/facetracknoir/wizard.h @@ -16,7 +16,6 @@ public: enum Model { Cap, ClipRight, ClipLeft }; enum { ClipRightX = 135, ClipLeftX = -135 }; - enum CameraMode { x640_480_75, x640_480_60, x320_240_189, x320_240_120 }; private slots: void set_data(); }; -- cgit v1.2.3