Browse Source

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

main
Kurt Eckhardt 5 years ago
parent
commit
4857825ddf
2 changed files with 3 additions and 1 deletions
  1. +1
    -1
      USBHost_t36.h
  2. +2
    -0
      joystick.cpp

+ 1
- 1
USBHost_t36.h View File

@@ -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 View File

@@ -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;

}


Loading…
Cancel
Save