InterruptSource class - #9

Closed
red-green opened this Issue Jan 11, 2017 · 1 comment

Projects

None yet

2 participants

@red-green

I have tried to use this class with the 2017 control system, and I'm encountering an error that I'm not sure how to solve.

private static class InterruptSource extends DigitalSource {
    public InterruptSource(int channel) {
      initDigitalPort(channel, true);
    }
  }

This piece of code is throwing two errors in Eclipse: First it asks to implement several required methods from the interface. Easy enough, though I'm not sure what effect it would have on the code.

The second error is on the initDigitalPort( function, which I assume sets the digital input for the interrupt and then enables it. This function seems to be missing from the 2017 WPIlibj implementation of DigitalSource. Not only is it missing, but I can't seem to find any mention of any way to set the interrupt pin through DigitalSource or any of its parent classes. I feel like this is an oversight, though it would be greatly appreciated if someone could point me in the right direction to fixing this.

@orangelight

#8 the owner said the Java and C++ versions will be updated soon.

@juchong juchong closed this in #10 Jan 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment