mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-12-24 13:21:23 +01:00
Rename IODevice::isActive(vpin) to isBusy(vpin).
This commit is contained in:
parent
0c218e1e13
commit
0aea9169b1
@ -156,12 +156,12 @@ void IODevice::writeAnalogue(VPIN vpin, int value, int profile) {
|
|||||||
#endif
|
#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.
|
// the output over a period of time.
|
||||||
bool IODevice::isActive(VPIN vpin) {
|
bool IODevice::isBusy(VPIN vpin) {
|
||||||
IODevice *dev = findDevice(vpin);
|
IODevice *dev = findDevice(vpin);
|
||||||
if (dev)
|
if (dev)
|
||||||
return dev->_isActive(vpin);
|
return dev->_isBusy(vpin);
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
10
IODevice.h
10
IODevice.h
@ -130,9 +130,9 @@ public:
|
|||||||
// write invokes the IODevice instance's _writeAnalogue method (not applicable for digital outputs)
|
// write invokes the IODevice instance's _writeAnalogue method (not applicable for digital outputs)
|
||||||
static void writeAnalogue(VPIN vpin, int value, int profile);
|
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.
|
// 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.
|
// check whether the pin supports notification. If so, then regular _read calls are not required.
|
||||||
static bool hasCallback(VPIN vpin);
|
static bool hasCallback(VPIN vpin);
|
||||||
@ -193,9 +193,9 @@ protected:
|
|||||||
return 0;
|
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.
|
// 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;
|
(void)vpin;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -264,7 +264,7 @@ private:
|
|||||||
// Device-specific write functions.
|
// Device-specific write functions.
|
||||||
void _write(VPIN vpin, int value) override;
|
void _write(VPIN vpin, int value) override;
|
||||||
void _writeAnalogue(VPIN vpin, int value, int profile) 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 _loop(unsigned long currentMicros) override;
|
||||||
void updatePosition(uint8_t pin);
|
void updatePosition(uint8_t pin);
|
||||||
void writeDevice(uint8_t pin, int value);
|
void writeDevice(uint8_t pin, int value);
|
||||||
|
Loading…
Reference in New Issue
Block a user