From ca67a74901d41905cb5c234aae96b48038a8c44c Mon Sep 17 00:00:00 2001 From: Shawn Silverman Date: Tue, 22 Jan 2019 04:33:59 -0800 Subject: [PATCH] Making Sender::isPaused() and Sender::isTransmitting() const. --- src/Sender.cpp | 2 +- src/TeensyDMX.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Sender.cpp b/src/Sender.cpp index cc0fc47..a9fcab9 100644 --- a/src/Sender.cpp +++ b/src/Sender.cpp @@ -251,7 +251,7 @@ void Sender::resumeFor(int n, void (*doneTXFunc)(Sender *s)) { enableIRQs(); } -bool Sender::isTransmitting() { +bool Sender::isTransmitting() const { // Check these both atomically disableIRQs(); //{ diff --git a/src/TeensyDMX.h b/src/TeensyDMX.h index 18c9593..8b2d2f3 100644 --- a/src/TeensyDMX.h +++ b/src/TeensyDMX.h @@ -482,7 +482,7 @@ class Sender final : public TeensyDMX { // Returns whether we are currently paused. This will occur after pause() // is called and after any "resumed" messages are sent. Note that it is // possible that a packet is still in the middle of being transmitted. - bool isPaused() { + bool isPaused() const { return paused_; } @@ -527,7 +527,7 @@ class Sender final : public TeensyDMX { // // An alternative to this function is to use onDoneTransmitting to be // notified when transmission is complete. - bool isTransmitting(); + bool isTransmitting() const; // Sets the function to call when the sender is paused and transmission // of the current packet is done. This can be used instead of polling