Skip to content
Snippets Groups Projects
Commit 58a2b061 authored by Fabien Mottier's avatar Fabien Mottier
Browse files

process serialization working | need to check rotation matrice

parent a7b84832
Branches
No related tags found
No related merge requests found
Showing
with 11 additions and 14 deletions
...@@ -108,28 +108,22 @@ void MainWindow::reloadListRealSenseDevices() { ...@@ -108,28 +108,22 @@ void MainWindow::reloadListRealSenseDevices() {
* Use the serialization of the API to save the configuration * Use the serialization of the API to save the configuration
*/ */
void MainWindow::saveConfiguration() { void MainWindow::saveConfiguration() {
ofstream out("./device"); remove("./device");
ofstream out;
out.open("./device");
pteConsole_cursor.insertText("Serialize\n"); pteConsole_cursor.insertText("Serialize\n");
sandbox.serialize(out); sandbox.serialize(out);
pteConsole_cursor.insertText("Serialized\n"); pteConsole_cursor.insertText("Serialized\n");
out.close(); out.close();
pteConsole_cursor.insertText(sandbox.getA()); ifstream in;
pteConsole_cursor.insertText("\n"); in.open("./device");
pteConsole_cursor.insertText(QString::number(sandbox.getB()));
pteConsole_cursor.insertText("\n");
ifstream in("./device");
pteConsole_cursor.insertText("Deserialize\n"); pteConsole_cursor.insertText("Deserialize\n");
sandbox.deserialize(in); sandbox.deserialize(in);
pteConsole_cursor.insertText("Deserialized\n"); pteConsole_cursor.insertText("Deserialized\n");
out.close(); out.close();
pteConsole_cursor.insertText(sandbox.getA());
pteConsole_cursor.insertText("\n");
pteConsole_cursor.insertText(QString::number(sandbox.getB()));
pteConsole_cursor.insertText("\n");
} }
...@@ -171,7 +165,7 @@ void MainWindow::configure() { ...@@ -171,7 +165,7 @@ void MainWindow::configure() {
} }
case 2: case 2:
{ {
if (!crcToDetectBeamer.empty()) if (!crcToDetectBeamer.empty() && crcToDetectBeamer.size() == 1)
{ {
sandbox.capturePointToDetectBeamer(crcToDetectBeamer); sandbox.capturePointToDetectBeamer(crcToDetectBeamer);
indexCapturedPointToToSetDetectedPoint++; indexCapturedPointToToSetDetectedPoint++;
......
...@@ -36,7 +36,7 @@ private: ...@@ -36,7 +36,7 @@ private:
Sandbox sandbox; Sandbox sandbox;
int selectedPoint = -1; int selectedPoint = -1;
int stepConfiguration = 0; int stepConfiguration = 0;
vector<int> crcToDetectBeamer; vector<Vec3f> crcToDetectBeamer;
int indexPointToDetectBeamer = 0; int indexPointToDetectBeamer = 0;
int indexCapturedPointToToSetDetectedPoint = 0; int indexCapturedPointToToSetDetectedPoint = 0;
const int nbPointToDetectBeamer = 3; const int nbPointToDetectBeamer = 3;
......
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
...@@ -111,6 +111,7 @@ DIST = /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_pre.prf \ ...@@ -111,6 +111,7 @@ DIST = /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_pre.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_config.prf \ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_config.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qmake.conf \ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qmake.conf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_post.prf \ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_post.prf \
../sandbox/.qmake.stash \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exclusive_builds.prf \ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exclusive_builds.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/toolchain.prf \ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/toolchain.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_pre.prf \ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_pre.prf \
...@@ -209,6 +210,7 @@ Makefile: ../sandbox/sandbox.pro /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ ...@@ -209,6 +210,7 @@ Makefile: ../sandbox/sandbox.pro /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_config.prf \ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_config.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qmake.conf \ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qmake.conf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_post.prf \ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_post.prf \
.qmake.stash \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exclusive_builds.prf \ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exclusive_builds.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/toolchain.prf \ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/toolchain.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_pre.prf \ /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_pre.prf \
...@@ -287,6 +289,7 @@ Makefile: ../sandbox/sandbox.pro /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ ...@@ -287,6 +289,7 @@ Makefile: ../sandbox/sandbox.pro /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_config.prf: /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_config.prf:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qmake.conf: /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qmake.conf:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_post.prf: /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_post.prf:
.qmake.stash:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exclusive_builds.prf: /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exclusive_builds.prf:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/toolchain.prf: /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/toolchain.prf:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_pre.prf: /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_pre.prf:
......
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment