-
Notifications
You must be signed in to change notification settings - Fork 9
Feat/dot and path mode #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
sample.py
Outdated
sdk_instance.play_event("shoot_test", duration=2) | ||
time.sleep(0.2) | ||
sdk_instance.stop_all() | ||
sdk_instance.play_path_mode( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@westside 상원님
path mode를 이렇게 불렀는데, 원하는대로 작동이 안되고 이상한 dot mode처럼 작동을 하는데요. (Android에서 구현해주신 것 보고 추측하면서 호출했습니다.) 한번 봐주실 수 있을까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
방금 테스트해보니 잘 적용된 느낌입니다.
dot모드와 다른건, 가상의 point를 울리게 하다는 것만 달아서 dot mode처럼 동작한다고 느끼실 수 있을 것 같습니다.
x_list = [0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1]
for i in x_list:
sdk_instance.play_path_mode(
x_list=[i],
y_list=[0.5],
intensity_list=[5],
duration=1
)
time.sleep(0.5)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
위에 코드처럼 보내야 되는군요?
그러면 sample.py를 남겨주신 comment의 코드로 변경해 놓겠습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
확인했습니다. 잘 되는 거 같은데요?
x_list = [0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9]로 하고,
requestId를 고정하시면 돌아가는 느낌을 받으실 수 있습니다.
def play_path_mode(self, x_list, y_list, intensity_list, pos=0, duration=1):
"""Play an dot mode event."""
if self.client is None:
return -1
request_id = 100
play_message = {
"requestId": request_id,
"pos": pos,
"durationMillis": duration * 1000,
"x": x_list,
"y": y_list,
"intensity": intensity_list
}
message = generate_message("SdkPlayPathMode", play_message)
self.client.send_message(message)
return request_id
말씀해주신대로 내용 업데이트하고 주석이라 로그도 추가했습니다. Merge 하겠습니다. |
add play_dot_mode() and play_path_mode()