Author Topic: Joystick Library - Increasing number of buttons !?  (Read 2808 times)

ricardojlrufino

  • Newbie
  • *
  • Posts: 3
Joystick Library - Increasing number of buttons !?
« on: October 28, 2014, 10:01:30 pm »
I wonder how do I increase the number of buttons, I need 32.
I tried to move on DigiJoystick.h gcn64_usbHidReportDescriptor, but I could not work.

A library is like this:
https://www.pjrc.com/teensy/td_joystick.html

thanks

ricardojlrufino

  • Newbie
  • *
  • Posts: 3
Re: Joystick Library - Increasing number of buttons !?
« Reply #1 on: October 28, 2014, 10:04:52 pm »
Code: [Select]
Please add this method

void setButtons(unsigned long buttons) {
last_built_report[8] = (int)((buttons >> 8) & 0XFF);
last_built_report[9] = (int)((buttons & 0XFF)); 
}

/*
        for 32
void setButtons(unsigned long buttons) {
// last_built_report[6] = (int)((buttons >> 24) & 0xFF);
// last_built_report[7] = (int)((buttons >> 16) & 0xFF);
// last_built_report[8] = (int)((buttons >> 8) & 0XFF);
// last_built_report[9] = (int)((buttons & 0XFF)); 
}*/

mybook4

  • Newbie
  • *
  • Posts: 12
Re: Joystick Library - Increasing number of buttons !?
« Reply #2 on: November 12, 2014, 04:11:05 am »
Did this work?  Were you able to increase the number of buttons to 32?