Hi,
I've implemented Mac specific portion of generic input devices, and am testing
it.
The Mac specific source (including some local modification on FGEventInput.*
and Makefile.am files) ATM are available at:
http://macflightgear.sourceforge.net/wp-content/uploads/eventinput/FGMacEventInput.tgz
The source files are still in progress, but these work fine on my Mac.
Anyway, I have some questions and comments on this:
1. Is AxisEvent::fire suppose to set a raw input value (e.g. -1024 to 1024), or
normalized value (-1.0 to 1.0) to its relevant node?
I assume it's latter, but the normalization portion seems missing. If it is
assumed that the OS specific FGInputDevice must pass a normalized
input value to HandleEvent, then I'll add such code to
FGMacOSXEventInput.cxx, but then FGAxisEvent's MinRange, MaxRange, etc will be
useless.
2. /input/event/device[N]/event[M]/setting seems missing. Is such node set on
Linux?
It is good to have the "setting" for adjusting some control (like throttle
using controls.throttleAxis())
3. Hot plug thing seems missing, so I modified FGEventInput.* for
attaching/detaching both property nodes and FGInputDevice.
it works fine on Mac OS X, so please take a look at my
FGEventInput.*[ch]xx.
The key thing is that FGMacOSXInputDevice must know an index of a device
node, device handler (Mac specific), and an instance of FGInputDevice.
So I modified FGEventInput::AddDevice to return an index for the added
device, and let FGMacOSXEventInput to map the index with
a device handler. This allows me to find a node index when HID Manager
tells me a device handler to be detached.
By calling FGEventInput::RemoveDevice(index) will remove both FGInputDevice
and its relevant property nodes.
What do you think about this?
4. What is the naming convention for event names?
I read "Universal Serial Bus HID Usage Tables"
(http://www.usb.org/developers/devclass_docs/Hut1_12.pdf)
but there's no -translate, -rotate things in its definition.
I guess it is good to have some convention so we can add new events in a
consistent fashion.
I added some event names on my code, and most of the names (except the ones
you defined) are directly
converted from HID usage table's definition (by changing capital letters to
small, replacing white spaces with '-' ).
I'm not offensive so -translate or -rotate is ok, but I'm not so sure how
to convert vrbx....
James,
Thanks for your concern.
Some portion of my code is based on PLIB's js implementation (like element
enumerator, and opening device interfaces, etc)
I'll ask you for some advice if needed.
I wish I could use a new HID Manager code but it is only available on Mac OS
10.5 so I stay with old one.
Best,
tat
On Aug 21, 2009, at 7:02 PM, Torsten Dreyer wrote:
>> Hi,
>>
>> This indeed is a good idea.
>> I took a look at the code, and I believe I can implement the Mac
>> portion of the new input event model using HID Manager.
>>
>> I'll post the patch when I finish implementing it.
>>
>> -----
>> Tatsuhiro Nishioka
> Great! Looking forward to receiving your patch.
>
> Torsten
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Flightgear-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/flightgear-devel
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel