获取USB鼠标的HID报告

获取USB鼠标的HID报告

问题描述:


我打算创建一个VB.NET界面,以使用USB激光鼠标来获取移动机器人的位置来确定移动机器人的位置.我曾尝试使用VB.NET的"cursor.position"功能,但无法提供超出Windows边界的鼠标位置.

我已经使用了mcHID.dll插件(类似于本网站中的内容- http://digital-diy .com/forum/visual-basic/ihid-t288.html [

Hi,
I''m planning to create a VB.NET interface to determine a mobile robot''s position using the USB laser mouse to get the movement. I have tried using VB.NET ''cursor.position'' function but it is not able to give mouse position beyond the windows border.

I have used the mcHID.dll plugin (something like in this website - http://digital-diy.com/forum/visual-basic/ihid-t288.html[^]) to get the HID report of a USB joystick. When I tried the same to a USB mouse, I''m not getting any report. It only shows that that device is connected. Is there another way to get the USB mouse HID report on VB.NET? Please point me in the right direction.

Thank you.

穷人"的操作方式是每次将鼠标指针重置到屏幕中央的价值观.您可以使用先前的点和新数据确定机器人前进的大致方向以及距离.但是,与惯性导航一样,由于分辨率的限制,每个样本中的少量误差会随着时间的推移而累积.
The "poor man''s" way to do it would be to reset the mouse pointer to the center of the screen every time you get it''s values. You can work out the rough direction the robot was going and how far using the previous points and the new data. Though, like inertial navigation, the small amount of error in every sample due to resolution limitations will add up over time.