********************************************************
* XHC-HB04 wireless MPG pendant LinuxCNC HAL module    *
* Copyright (C) 2013 Frederic Rible (frible@teaser.fr) *
********************************************************

For up to date instructions, please go to http://wiki.linuxcnc.org/cgi-bin/wiki.pl?Using_A_XHC-HB04_Wireless_MPG_Pendant

This HAL module is designed for the XHC-HB04 V3.0 identified as USB device 10CE:EB70.
Most of the pendant features are handled:
- buttons converted to hal pins
- jog wheel with variable scale (use STEP button to select scale)
- LCD screen

The xhc-HB04.hal file shows a typical configuration to be integrated by the following line in you .ini file:

[HAL]
....
HALFILE = xhc-hb04.hal

It assumes MDI commands 06 to 09 are reserved for the following 4 pendant buttons:
* X=0
* Y=0
* Z=0 
* Goto zero

[HALUI]
MDI_COMMAND=...
MDI_COMMAND=...
MDI_COMMAND=...
MDI_COMMAND=...
MDI_COMMAND=...
MDI_COMMAND=...
MDI_COMMAND=G10 L20 P1 X0
MDI_COMMAND=G10 L20 P1 Y0
MDI_COMMAND=G10 L20 P1 Z0
MDI_COMMAND=G0 X0 Y0 Z0

You must add the file /etc/udev/rules.d/90-xhc.rules with the following content to get access to USB
without root privileges

SYSFS{idProduct}=="eb70", SYSFS{idVendor}=="10ce", MODE="666", OWNER="root", GROUP="users"

-----------------
History

2013-06-19 V01 Initial release
2013-06-20 V02 Fix Makefile. Remove cache for LCD refresh
2013-07-02 V03 Add configuration file for keyboard layout
2013-07-03 V04 Add support for world mode
2013-07-04 V05 Add smoothing filter for velocity calculation in world mode
2014-01-21 V06 Fix for erroneous display of negative values - Handle USB errors

