Skip to content

Commit

Permalink
Backport bug fix from upkie working branch
Browse files Browse the repository at this point in the history
  • Loading branch information
stephane-caron committed Jul 2, 2024
1 parent 73458c0 commit 978b094
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ All notable changes to this project will be documented in this file.

- Spine: log when dictionary logger is full

### Fixed

- Fix duplicate ``data_`` attribute in pi3hat actuation interface

## [2.5.0] - 2024-06-11

### Added
Expand Down
2 changes: 0 additions & 2 deletions vulp/actuation/Pi3HatInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ void Pi3HatInterface::process_action(const Dictionary& action) {}

void Pi3HatInterface::cycle(
std::function<void(const moteus::Output&)> callback) {
const moteus::Data& data = this->data_;
std::lock_guard<std::mutex> lock(mutex_);
if (ongoing_can_cycle_) {
throw std::logic_error(
Expand All @@ -64,7 +63,6 @@ void Pi3HatInterface::cycle(

callback_ = std::move(callback);
ongoing_can_cycle_ = true;
data_ = data;

can_wait_condition_.notify_all();
}
Expand Down
3 changes: 0 additions & 3 deletions vulp/actuation/Pi3HatInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,6 @@ class Pi3HatInterface : public Interface {
//! Callback function called upon completion of a CAN cycle
std::function<void(const moteus::Output&)> callback_;

//! Buffer to read commands from and write replies to.
moteus::Data data_;

//! Thread for CAN communication cycles
std::thread can_thread_;

Expand Down

0 comments on commit 978b094

Please sign in to comment.