Creates a ServoInputManager class with a global ServoInput object to manage a linked list of all ServoInputSignal instances. Users can now call ServoInput.begin() to initialize all objects rather than having to call the begin() function for every object separately. Detaching all interrupts at once with end() is also supported.
On the 328P this adds 12 bytes of memory usage for the static head & tail pointers and the ServoInputManager object. Each ServoInputPin object will use 8 bytes of additional memory for the next pointer and the virtual begin/end memory maps. Program size for all examples increases by about 320 bytes.
So this isn't the most lightweight feature for the library, but it's a nice quality of life change to have an overarching "manager" class and the ability to iterate through all of the objects. Especially once you start dealing with 4 or more input signals.
Creates a
ServoInputManager
class with a globalServoInput
object to manage a linked list of allServoInputSignal
instances. Users can now callServoInput.begin()
to initialize all objects rather than having to call thebegin()
function for every object separately. Detaching all interrupts at once withend()
is also supported.On the 328P this adds 12 bytes of memory usage for the static head & tail pointers and the
ServoInputManager
object. EachServoInputPin
object will use 8 bytes of additional memory for thenext
pointer and the virtual begin/end memory maps. Program size for all examples increases by about 320 bytes.So this isn't the most lightweight feature for the library, but it's a nice quality of life change to have an overarching "manager" class and the ability to iterate through all of the objects. Especially once you start dealing with 4 or more input signals.