Add option to disable signal handlers (#65)

This gives the user the option to create their own signal handler without having create::Create interfere.
They can disable the sigint/sigterm handler and be responsible for disconnecting from the robot themselves.

Signed-off-by: Jacob Perron <jacobmperron@gmail.com>
This commit is contained in:
Jacob Perron 2021-05-05 23:25:40 -07:00 committed by GitHub
parent fbc87dea3f
commit 1563e2b3e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 35 additions and 19 deletions

View file

@ -6,7 +6,7 @@
namespace create {
SerialStream::SerialStream(std::shared_ptr<Data> d, const uint8_t& header) : Serial(d), readState(READ_HEADER), headerByte(header) {
SerialStream::SerialStream(std::shared_ptr<Data> d, const uint8_t& header, bool install_signal_handler) : Serial(d, install_signal_handler), readState(READ_HEADER), headerByte(header) {
}
bool SerialStream::startSensorStream() {