Is this the bit you mean.
void sendjs() // function for sending the JS values
{
// nicohoodHID - send joystick state
// write analog axes - nocohoodHID library
// elevator sent as X axis, rudder sent as y axis
Gamepad.xAxis(elev_out);
Gamepad.yAxis(rudder_out);
Gamepad.write();
Gamepad.releaseAll();
}
Do I just copy it into the other code then add the HID links again