mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-08-18 09:29:03 +08:00
[fibre-cpp] fix function calls with multiple args
This commit is contained in:
@@ -621,6 +621,7 @@ std::variant<LegacyCallContext::ContinueWithApp, LegacyCallContext::ContinueWith
|
||||
return ContinueWithApp{kFibreInternalError, app_tx_end_, app_rx_buf_.begin()};
|
||||
}
|
||||
transcoded_pos += arg.protocol_size;
|
||||
tx_pos_ += arg.app_size;
|
||||
}
|
||||
|
||||
tx_buf_ = transcoded;
|
||||
@@ -647,6 +648,7 @@ std::variant<LegacyCallContext::ContinueWithApp, LegacyCallContext::ContinueWith
|
||||
return ContinueWithApp{kFibreInternalError, app_tx_end_, app_rx_buf_.begin()};
|
||||
}
|
||||
transcoded_pos += arg.app_size;
|
||||
rx_pos_ += arg.protocol_size;
|
||||
}
|
||||
|
||||
rx_buf_ = transcoded;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
DEFINE_LOG_TOPIC(LIBFIBRE);
|
||||
USE_LOG_TOPIC(LIBFIBRE);
|
||||
|
||||
static const struct LibFibreVersion libfibre_version = { 0, 1, 1 };
|
||||
static const struct LibFibreVersion libfibre_version = { 0, 1, 2 };
|
||||
|
||||
class FIBRE_PRIVATE ExternalEventLoop final : public fibre::EventLoop {
|
||||
public:
|
||||
|
||||
@@ -22,7 +22,7 @@ USE_LOG_TOPIC(USB);
|
||||
|
||||
// This probably has no noteworthy effect since we automatically restart
|
||||
// timed out operations anyway.
|
||||
constexpr unsigned int kBulkTimeoutMs = 2000;
|
||||
constexpr unsigned int kBulkTimeoutMs = 10000;
|
||||
|
||||
// Only relevant for platforms don't support hotplug detection and thus
|
||||
// need polling.
|
||||
@@ -635,6 +635,9 @@ void LibusbBulkEndpoint<TRes>::on_transfer_finished() {
|
||||
// Sometimes it's LIBUSB_TRANSFER_STALL, sometimes
|
||||
// LIBUSB_TRANSFER_ERROR. Therefore we just check if the device
|
||||
// is still present to determine which error code to return.
|
||||
// TODO: this detection doesn't really work. The device is still in the
|
||||
// device list at this point when it just got unplugged. For now we
|
||||
// just ignore transfer errors.
|
||||
|
||||
bool found = false;
|
||||
|
||||
@@ -644,6 +647,7 @@ void LibusbBulkEndpoint<TRes>::on_transfer_finished() {
|
||||
if (n_devices >= 0) {
|
||||
for (size_t i = 0; i < (size_t)n_devices; ++i) {
|
||||
if (list[i] == dev) {
|
||||
// found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user