Fix double disable segfaulting interrupts (#2132)

Also fixes DigitalOutput not closing correctly.
This commit is contained in:
Thad House
2019-11-25 21:43:58 -08:00
committed by Peter Johnson
parent 6ceafe3cd0
commit 3fcfc8ea72
2 changed files with 13 additions and 3 deletions

View File

@@ -44,6 +44,7 @@ public class DigitalOutput extends DigitalSource implements Sendable, AutoClosea
@Override
public void close() {
super.close();
SendableRegistry.remove(this);
// Disable the pwm only if we have allocated it
if (m_pwmGenerator != invalidPwmGenerator) {