Go to Post I remember seeing that hair do. It is what inspired me to become an MC one day. - Tetraman [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 11-01-2017, 21:28
niwhsa9 niwhsa9 is offline
Registered User
FRC #2496
 
Join Date: Jan 2017
Location: CA
Posts: 1
niwhsa9 is an unknown quantity at this point
Exclamation What is the replacement method for initDigitalPort?

I've come into a little problem with some legacy code from the 2016 control system. I'm trying to control the adis16448 board with this library
which compiled fine in the 2016 wpilibj, but doesn't compile in the 2017 version. Now, I'd like to get this up and running quickly without having to wait for the dev to update, and there are actually only two errors.
Relevant code here:
Code:
private static class InterruptSource extends DigitalSource {
    public InterruptSource(int channel) {
      initDigitalPort(channel, true);
    }
  }
First is that the InterruptSource class has some unimplemented methods from the parent class. I just added empty definitions for these and that error obviously went away. Next is that the method initDigitalPort is not defined from the parent class. This is the part that I get stuck on. Upon examination of the API Javadoc, the Source Code on github, and the context of this code, I still can't seem to figure out what this does or how to fix it. I'm guessing this has been depreciated in the 2017 wpilibj library.

My question is, what is the replacement method for initDigitalPort?

Forgive me for anything simple I've overlooked, we are a new FRC team so we have 0 experience with using wpilibj.

Also, it might help if I understood what the DigitalSource class actually does, could someone explain this to me?

Thanks, help is greatly apreciated!
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 22:56.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi