Replace boost features with C++11 equivalents (#58)

* Replace boost features with C++11 equivalents

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Include <cmath> in util.h

Needed for std::abs

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
This commit is contained in:
Jacob Perron 2020-11-01 18:05:17 -08:00 committed by GitHub
parent 850b011a55
commit 2b9591f0f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 95 additions and 87 deletions

View file

@ -1,4 +1,5 @@
#include <iostream>
#include <memory>
#include "create/serial_query.h"
#include "create/types.h"
@ -7,7 +8,7 @@
namespace create {
SerialQuery::SerialQuery(boost::shared_ptr<Data> d) : Serial(d),
SerialQuery::SerialQuery(std::shared_ptr<Data> d) : Serial(d),
streamRecoveryTimer(io),
packetID(ID_BUMP_WHEELDROP),
packetByte(0),
@ -30,7 +31,8 @@ namespace create {
send(requestPacket, 2);
// Automatically resend request if no response is received
streamRecoveryTimer.expires_from_now(boost::posix_time::milliseconds(50));
streamRecoveryTimer.async_wait(boost::bind(&SerialQuery::restartSensorStream, this, _1));
streamRecoveryTimer.async_wait(
std::bind(&SerialQuery::restartSensorStream, this, std::placeholders::_1));
}
void SerialQuery::restartSensorStream(const boost::system::error_code& err) {