antares190
Member
Hi, I'm trying to create a custom class so to use a custom device (pretty similar to JOYSTICK_INTERFACE, but with different bit resolution, for few axes, and few more buttons).
The first step I did was modifying the JOYSTICK_INTERFACE (in usb_desc.c), and usb_joystick.c and usb_joystick.h, and everything is working as expected (axis and buttons are recognized).
So I created my custom usb_cougar.c, and usb_cougar.h, which mirrors usb_joystick.c and usb_joystick.h, and modified :
* usb_desc.c
* usb_desc.h
* boards.txt
* usb_inst.cpp
* WProgram.h
The Arduino app shows the new entry "Cougar", under Tools--> USB Type ... But when I compile and upload, it something gets broken (fails to connect to the usb device and returns the error below).
So: question time:
* Am I missing some file that needs to be modified?
* Is it possible to have an USB_TYPE which is only a plain JOYSTICK and not a sort of hub/group of (Serial)+Keyboard+Mouse+Joystick?
* Is it possible to change the names of the axis which are shown in Windows, (e.g. to something more appealing than Rx Ry Rz)?
BTW thanks for the very interesting info in this post!
The first step I did was modifying the JOYSTICK_INTERFACE (in usb_desc.c), and usb_joystick.c and usb_joystick.h, and everything is working as expected (axis and buttons are recognized).
So I created my custom usb_cougar.c, and usb_cougar.h, which mirrors usb_joystick.c and usb_joystick.h, and modified :
* usb_desc.c
* usb_desc.h
* boards.txt
* usb_inst.cpp
* WProgram.h
The Arduino app shows the new entry "Cougar", under Tools--> USB Type ... But when I compile and upload, it something gets broken (fails to connect to the usb device and returns the error below).
No Teensy boards were found on any USB ports of your computer.
Please press the PROGRAM MODE BUTTON on your Teensy to upload your sketch.
So: question time:
* Am I missing some file that needs to be modified?
* Is it possible to have an USB_TYPE which is only a plain JOYSTICK and not a sort of hub/group of (Serial)+Keyboard+Mouse+Joystick?
* Is it possible to change the names of the axis which are shown in Windows, (e.g. to something more appealing than Rx Ry Rz)?
BTW thanks for the very interesting info in this post!