ovc4/software/ovc4_driver/src/usb_driver.cpp
// libusb function uses a non const pointer so we cannot pass const reference
libusb function uses a non const pointer so we cannot pass const reference
libusb function uses a non const pointer so we cannot pass const reference
bool USBDriver::sendPacket(usb_rx_packet_t& packet)
{
  int num_bytes;
  int ret_val = libusb_bulk_transfer(dev_handle, EP_OUT, packet.data, sizeof(packet), &num_bytes, RX_TIMEOUT);
  if (ret_val != 0)
  {
    std::cout << "Send packet failed" << std::endl;
    return false;
  }
  return true;
}
bool USBDriver :: sendPacket ( usb_rx_packet_t & packet ) { int num_bytes ; int ret_val = libusb_bulk_transfer ( dev_handle , EP_OUT , packet . data , sizeof ( packet ) , & num_bytes , RX_TIMEOUT ) ; if ( ret_val != 0 ) { std :: cout << " " << std :: endl ; return false ; } return true ; }
libusb function uses a non const pointer so we cannot pass const reference
libusb function uses a non const pointer so we cannot pass const reference