View Single Post
  #2   Spotlight this post!  
Unread 16-08-2016, 22:23
euhlmann's Avatar
euhlmann euhlmann is offline
CTO, Programmer
AKA: Erik Uhlmann
FRC #2877 (LigerBots)
Team Role: Leadership
 
Join Date: Dec 2015
Rookie Year: 2015
Location: United States
Posts: 361
euhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud of
Re: PID onTarget() Updated

Just a few notes with git:

- don't put binary files on git. That means you should add bin, build, and dist to your .gitignore
- don't manually version files. That's what git is for. Instead of "SirAntsABot_Summer_YYYY_MM_DD_HHMM", you can use branches or tags to keep track of the versions.
​ ​ ​ ​- use branches if you have several different versions of the code that you'd like to develop independently of each other
​ ​ ​ ​- use tags if there are previous versions of the code that you'd like to name for easy reference

Now looking at NordicSpeedController, I'm confused as to why you are extending SpeedController yourself. You shouldn't be doing that when you're just wrapping a CANTalon. Second, the Talons have built-in PID control which has a much faster update loop since it's internal to the Talon itself. Just connect the encoder directly to the Talon and call PID methods on the CANTalon object - see section 10 of the software manual and section 1.4 of the user's guide. The Talon's own PID also isn't subject to WPILib bugs (such as the one with onTarget()) so it's more reliable to use.
__________________
Creator of SmartDashboard.js, an extensible nodejs/webkit replacement for SmartDashboard


https://ligerbots.org
Reply With Quote