summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorWei Shuai <cpuwolf@gmail.com>2018-02-08 06:45:52 +0800
committerWei Shuai <cpuwolf@gmail.com>2018-02-08 06:45:52 +0800
commitb62f4a94932785203ad133565575bc5cf0f0f408 (patch)
treee3ccfcbb2720af4ac05f31dfcb3c3bd919d3491e
parent9b6440c355f6540caa2fc0d7a7b65b6b7078d3ab (diff)
tracker/wii: enhance friendly UI
1. add new status wii_cam_wait_for_dongle 2. show "insert USB dongle" in preview window
-rw-r--r--tracker-wii/wii_camera.cpp2
-rw-r--r--tracker-wii/wii_frame.cpp2
-rw-r--r--tracker-wii/wii_frame.hpp2
3 files changed, 4 insertions, 2 deletions
diff --git a/tracker-wii/wii_camera.cpp b/tracker-wii/wii_camera.cpp
index 9b6da4e1..1186afc1 100644
--- a/tracker-wii/wii_camera.cpp
+++ b/tracker-wii/wii_camera.cpp
@@ -115,7 +115,7 @@ wii_camera_status WIICamera::_pair()
bt_param.dwSize = sizeof(bt_param);
hbt = BluetoothFindFirstRadio(&bt_param, hbtlist + ibtidx);
- if (!hbt) { return ret; }
+ if (!hbt) { ret = wii_cam_wait_for_dongle; return ret; }
do
{
ibtidx++;
diff --git a/tracker-wii/wii_frame.cpp b/tracker-wii/wii_frame.cpp
index 16bcfab2..9332a704 100644
--- a/tracker-wii/wii_frame.cpp
+++ b/tracker-wii/wii_frame.cpp
@@ -50,6 +50,8 @@ WIIPreview::WIIPreview(int w, int h)
QImage WIIPreview::get_bitmap()
{
switch (status) {
+ case wii_cam_wait_for_dongle:
+ return QImage(":/Resources/usb.png");
case wii_cam_wait_for_sync:
return QImage(":/Resources/sync.png");
case wii_cam_wait_for_connect:
diff --git a/tracker-wii/wii_frame.hpp b/tracker-wii/wii_frame.hpp
index 3ad23734..31967d10 100644
--- a/tracker-wii/wii_frame.hpp
+++ b/tracker-wii/wii_frame.hpp
@@ -16,7 +16,7 @@
namespace pt_module {
-enum wii_camera_status : unsigned { wii_cam_wait_for_sync, wii_cam_wait_for_connect, wii_cam_data_no_change, wii_cam_data_change };
+enum wii_camera_status : unsigned { wii_cam_wait_for_dongle, wii_cam_wait_for_sync, wii_cam_wait_for_connect, wii_cam_data_no_change, wii_cam_data_change };
struct wii_info_points {
unsigned ux;