Explorar el Código

BT Joystick - hopefully show device in use when BT connects...

main
Kurt Eckhardt hace 5 años
padre
commit
4857825ddf
Se han modificado 2 ficheros con 3 adiciones y 1 borrados
  1. +1
    -1
      USBHost_t36.h
  2. +2
    -0
      joystick.cpp

+ 1
- 1
USBHost_t36.h Ver fichero

@@ -837,7 +837,7 @@ public:
const uint8_t *manufacturer();
const uint8_t *product();
const uint8_t *serialNumber();
operator bool() { return (((device != nullptr) || (mydevice != nullptr)) && connected_); } // override as in both USBDriver and in USBHIDInput
operator bool() { return (((device != nullptr) || (mydevice != nullptr || (btdevice != nullptr))) && connected_); } // override as in both USBDriver and in USBHIDInput

bool available() { return joystickEvent; }
void joystickDataClear();

+ 2
- 0
joystick.cpp Ver fichero

@@ -669,12 +669,14 @@ bool JoystickController::process_bluetooth_HID_data(const uint8_t *data, uint16_
Serial.printf("%02x ", data[i]);
}
Serial.printf("\n");
connected_ = true;
return true;
}

void JoystickController::release_bluetooth()
{
//btdevice = nullptr;
connected_ = false;

}


Cargando…
Cancelar
Guardar