浏览代码

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

main
Kurt Eckhardt 6 年前
父节点
当前提交
4857825ddf
共有 2 个文件被更改,包括 3 次插入1 次删除
  1. +1
    -1
      USBHost_t36.h
  2. +2
    -0
      joystick.cpp

+ 1
- 1
USBHost_t36.h 查看文件

const uint8_t *manufacturer(); const uint8_t *manufacturer();
const uint8_t *product(); const uint8_t *product();
const uint8_t *serialNumber(); 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; } bool available() { return joystickEvent; }
void joystickDataClear(); void joystickDataClear();

+ 2
- 0
joystick.cpp 查看文件

Serial.printf("%02x ", data[i]); Serial.printf("%02x ", data[i]);
} }
Serial.printf("\n"); Serial.printf("\n");
connected_ = true;
return true; return true;
} }


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


} }



正在加载...
取消
保存