summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJihoon Jung <jh8801.jung@samsung.com>2020-09-11 14:37:59 +0900
committerJihoon Jung <jh8801.jung@samsung.com>2020-09-11 14:38:38 +0900
commit7bb0f1fe84998568454edfb057198acdf733287a (patch)
tree91594e39da871a6701e922bd91a61bc47f1ce38b
parent4913defef6bc99e5f29a073a5d525ca359207474 (diff)
downloaduwb-manager-accepted/tizen_6.0_unified.tar.gz
uwb-manager-accepted/tizen_6.0_unified.tar.bz2
uwb-manager-accepted/tizen_6.0_unified.zip
Change-Id: Ia72804fe2232b75ccff81b1d8233623c837e1642 Signed-off-by: Jihoon Jung <jh8801.jung@samsung.com>
-rwxr-xr-xplugin/dwm1001/uwb-plugin-dwm1001.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/plugin/dwm1001/uwb-plugin-dwm1001.c b/plugin/dwm1001/uwb-plugin-dwm1001.c
index 93c5bbd..f7ae2d0 100755
--- a/plugin/dwm1001/uwb-plugin-dwm1001.c
+++ b/plugin/dwm1001/uwb-plugin-dwm1001.c
@@ -279,9 +279,16 @@ int uwb_dwm1001_get_own_node(uwb_node_s **own_node)
(*own_node)->is_remote = false;
(*own_node)->node_id = dwm1001_ctx.node_id;
(*own_node)->pan_id = dwm1001_ctx.pan_id;
- (*own_node)->x = pos.x;
- (*own_node)->y = pos.y;
- (*own_node)->z = pos.z;
+
+ if (dwm1001_ctx.mode == DWM_MODE_ANCHOR) {
+ (*own_node)->x = pos.x;
+ (*own_node)->y = pos.y;
+ (*own_node)->z = pos.z;
+ } else {
+ (*own_node)->x = 0;
+ (*own_node)->y = 0;
+ (*own_node)->z = 0;
+ }
UWB_PLUGIN_LOGI("obtained node_id : %" PRIu64, dwm1001_ctx.node_id);
UWB_PLUGIN_LOGI("X: %d Y: %d Z: %d", pos.x, pos.y, pos.z);