summaryrefslogtreecommitdiffhomepage
path: root/tracker-hatire
diff options
context:
space:
mode:
Diffstat (limited to 'tracker-hatire')
-rw-r--r--tracker-hatire/ftnoir_tracker_hat.cpp20
-rw-r--r--tracker-hatire/ftnoir_tracker_hat.h2
2 files changed, 11 insertions, 11 deletions
diff --git a/tracker-hatire/ftnoir_tracker_hat.cpp b/tracker-hatire/ftnoir_tracker_hat.cpp
index 6e1b6586..29381eaa 100644
--- a/tracker-hatire/ftnoir_tracker_hat.cpp
+++ b/tracker-hatire/ftnoir_tracker_hat.cpp
@@ -43,27 +43,27 @@ void hatire::get_info( int *tps )
*tps=frame_cnt;
frame_cnt=0;
}
-void hatire::start_tracker(QFrame*)
+module_status hatire::start_tracker(QFrame*)
{
- CptError=0;
- frame_cnt=0;
+ CptError=0;
+ frame_cnt=0;
t.Log("Starting Tracker");
serial_result ret = t.init_serial_port();
+ t.start();
+
switch (ret.code)
{
case result_ok:
- break;
+ return status_ok();
case result_error:
- QMessageBox::warning(0, tr("Error"), ret.error, QMessageBox::Ok,QMessageBox::NoButton);
- break;
+ return error(ret.error);
case result_open_error:
- QMessageBox::warning(0, tr("Error"), tr("Unable to open ComPort: %1").arg(ret.error), QMessageBox::Ok,QMessageBox::NoButton);
- break;
+ return error(tr("Unable to open ComPort: %1").arg(ret.error));
+ default:
+ return error("Unknown error");
}
-
- t.start();
}
void hatire::serial_info()
diff --git a/tracker-hatire/ftnoir_tracker_hat.h b/tracker-hatire/ftnoir_tracker_hat.h
index fa8b8448..45b3f250 100644
--- a/tracker-hatire/ftnoir_tracker_hat.h
+++ b/tracker-hatire/ftnoir_tracker_hat.h
@@ -22,7 +22,7 @@ public:
hatire();
~hatire();
- void start_tracker(QFrame*);
+ module_status start_tracker(QFrame*);
void data(double *data);
//void center();
//bool notifyZeroed();