Skip to content

Commit d20fcce

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 39fb4a5 commit d20fcce

File tree

4 files changed

+20
-14
lines changed

4 files changed

+20
-14
lines changed

src/ros_queued_subscribe-python-module-py.cc

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,12 @@ BOOST_PYTHON_MODULE(wrap) {
2626
"Whether signals should read values from the queues, and when.",
2727
bp::args("start_time"))
2828
.def("queueReceivedData", &dg::RosQueuedSubscribe::queueReceivedData,
29-
"Check whether the queue of a given signal has received atleast one data point",
29+
"Check whether the queue of a given signal has received atleast one "
30+
"data point",
3031
bp::args("signal_name"))
31-
.def("setQueueReceivedData", &dg::RosQueuedSubscribe::setQueueReceivedData,
32-
"Set the data reception status of the queue corresponding to a given signal",
33-
bp::args("signal_name","signal_data_acq_status"));
32+
.def("setQueueReceivedData",
33+
&dg::RosQueuedSubscribe::setQueueReceivedData,
34+
"Set the data reception status of the queue corresponding to a "
35+
"given signal",
36+
bp::args("signal_name", "signal_data_acq_status"));
3437
}

src/ros_queued_subscribe.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,20 +148,23 @@ void RosQueuedSubscribe::readQueue(int beginReadingAt) {
148148

149149
std::string RosQueuedSubscribe::getDocString() const { return docstring_; }
150150

151-
bool RosQueuedSubscribe::queueReceivedData(const std::string& signal) const{
152-
std::map<std::string, bindedSignal_t>::const_iterator _bs = bindedSignal_.find(signal);
151+
bool RosQueuedSubscribe::queueReceivedData(const std::string& signal) const {
152+
std::map<std::string, bindedSignal_t>::const_iterator _bs =
153+
bindedSignal_.find(signal);
153154
if (_bs != bindedSignal_.end()) {
154155
return _bs->second->receivedData();
155156
}
156157

157158
return false;
158159
}
159160

160-
void RosQueuedSubscribe::setQueueReceivedData(const std::string& signal, bool status) {
161-
std::map<std::string, bindedSignal_t>::const_iterator _bs = bindedSignal_.find(signal);
161+
void RosQueuedSubscribe::setQueueReceivedData(const std::string& signal,
162+
bool status) {
163+
std::map<std::string, bindedSignal_t>::const_iterator _bs =
164+
bindedSignal_.find(signal);
162165
if (_bs != bindedSignal_.end()) {
163166
_bs->second->receivedData(status);
164167
}
165168
}
166169

167-
} // end of namespace dynamicgraph.
170+
} // end of namespace dynamicgraph.

src/ros_queued_subscribe.hh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,12 @@ struct BindedSignal : BindedSignalBase {
113113

114114
/// @brief Returns the value stored in receivedData_ i.e.
115115
/// whether the signal has received atleast one data point
116-
/// or not
117-
bool receivedData() const {return receivedData_;}
116+
/// or not
117+
bool receivedData() const { return receivedData_; }
118118

119119
/// @brief Set the value of data acquisition status of the signal
120-
/// @param status
121-
void receivedData(bool status) {receivedData_ = status;}
120+
/// @param status
121+
void receivedData(bool status) { receivedData_ = status; }
122122

123123
SignalPtr_t signal;
124124
/// Index of the next value to be read.

src/ros_queued_subscribe.hxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ void BindedSignal<T, N>::writer(const R& data) {
8787
if (!receivedData_) {
8888
receivedData_ = true;
8989
}
90-
90+
9191
backIdx = (backIdx + 1) % N;
9292
}
9393

0 commit comments

Comments
 (0)