| 16 | } |
| 17 | |
| 18 | void Servo::timerIsr() |
| 19 | { |
| 20 | auto& frame = frames[activeFrameIndex]; |
| 21 | hardwareTimer.setInterval(frame.slots[activeSlot]); |
| 22 | if(activeSlot > 0) { |
| 23 | digitalWrite(frame.pins[activeSlot - 1], false); |
| 24 | } |
| 25 | ++activeSlot; |
| 26 | if(activeSlot < frame.slotCount) { |
| 27 | digitalWrite(frame.pins[activeSlot - 1], true); |
| 28 | } else { |
| 29 | activeFrameIndex = nextFrameIndex; |
| 30 | activeSlot = 0; |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | Servo::Servo() |
| 35 | { |
no test coverage detected