From 0aea9169b137118e36634dae3c8f3772ab663b1a Mon Sep 17 00:00:00 2001 From: Neil McKechnie Date: Fri, 27 Aug 2021 11:18:15 +0100 Subject: [PATCH] Rename IODevice::isActive(vpin) to isBusy(vpin). --- IODevice.cpp | 6 +++--- IODevice.h | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/IODevice.cpp b/IODevice.cpp index 3269abe..3f33e57 100644 --- a/IODevice.cpp +++ b/IODevice.cpp @@ -156,12 +156,12 @@ void IODevice::writeAnalogue(VPIN vpin, int value, int profile) { #endif } -// isActive returns true if the device is currently in an animation of some sort, e.g. is changing +// isBusy returns true if the device is currently in an animation of some sort, e.g. is changing // the output over a period of time. -bool IODevice::isActive(VPIN vpin) { +bool IODevice::isBusy(VPIN vpin) { IODevice *dev = findDevice(vpin); if (dev) - return dev->_isActive(vpin); + return dev->_isBusy(vpin); else return false; } diff --git a/IODevice.h b/IODevice.h index 691322c..d54b6fa 100644 --- a/IODevice.h +++ b/IODevice.h @@ -130,9 +130,9 @@ public: // write invokes the IODevice instance's _writeAnalogue method (not applicable for digital outputs) static void writeAnalogue(VPIN vpin, int value, int profile); - // isActive returns true if the device is currently in an animation of some sort, e.g. is changing + // isBusy returns true if the device is currently in an animation of some sort, e.g. is changing // the output over a period of time. - static bool isActive(VPIN vpin); + static bool isBusy(VPIN vpin); // check whether the pin supports notification. If so, then regular _read calls are not required. static bool hasCallback(VPIN vpin); @@ -193,9 +193,9 @@ protected: return 0; }; - // _isActive returns true if the device is currently in an animation of some sort, e.g. is changing + // _isBusy returns true if the device is currently in an animation of some sort, e.g. is changing // the output over a period of time. Returns false unless overridden in sub class. - virtual bool _isActive(VPIN vpin) { + virtual bool _isBusy(VPIN vpin) { (void)vpin; return false; } @@ -264,7 +264,7 @@ private: // Device-specific write functions. void _write(VPIN vpin, int value) override; void _writeAnalogue(VPIN vpin, int value, int profile) override; - bool _isActive(VPIN vpin) override; + bool _isBusy(VPIN vpin) override; void _loop(unsigned long currentMicros) override; void updatePosition(uint8_t pin); void writeDevice(uint8_t pin, int value);