From: Jihoon Jung Date: Fri, 11 Sep 2020 05:37:59 +0000 (+0900) Subject: Change to not update own position when TAG mode X-Git-Tag: submit/tizen/20200911.055427^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Faccepted%2Ftizen_6.0_unified;p=platform%2Fcore%2Fconnectivity%2Fuwb-manager.git Change to not update own position when TAG mode Change-Id: Ia72804fe2232b75ccff81b1d8233623c837e1642 Signed-off-by: Jihoon Jung --- 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);