194 void Init() noexcept;
214 bool Connect(const std::
string& bluetooth_device_address, uint32_t timeout_ms = 5000) noexcept;
287 const gamepad::input::Tracker&
Update() noexcept;
368 const gamepad::input::Tracker&
input_tracker() const noexcept {
return input_tracker_; }
383 NimBLEClient*
ble_client() const noexcept {
return ble_client_; }
386 static constexpr size_t kInputsQueueMax = 10;
388 bool Connect(
const NimBLEAddress& address,
bool async_connect,
const uint32_t timeout_ms);
389 void OnNotify(
const NimBLERemoteCharacteristic* remote_characteristic,
const uint8_t* data,
const size_t length,
390 const bool is_notify);
393 mutable std::mutex mutex_;
394 NimBLEClient* ble_client_ =
nullptr;
395 std::string remote_device_name_;
396 std::string remote_model_number_;
397 std::array<uint8_t, 3> remote_firmware_version_ = {0, 0, 0};
398 std::queue<gamepad::input::State> inputs_queue_;
399 gamepad::input::Tracker input_tracker_;