Thread: Stall detection
View Single Post
  #7   Spotlight this post!  
Unread 25-03-2013, 11:18
evinugur evinugur is offline
Registered User
FRC #1073
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2010
Location: US
Posts: 13
evinugur is an unknown quantity at this point
Re: Stall detection

My team wrote a library of common FRC tasks to extend off of WPILib.

We wrote code for Stall Detection in the form of an abstract base class, and implemented it with the CANJaguar interface and Analog Channel (PWMs)

Basically we just measure the voltage diffs of what we want to check for stalling, if it hardly varies than you have a stall.

Our Stallable Class:
https://github.com/FRCTeam1073-TheFo.../Stallable.cpp

CANJaguar Implementation (look at line 14):
https://github.com/FRCTeam1073-TheFo...tCANJaguar.cpp

You're fully welcome to use our code, and I'm more than happy to help adapting it for your purposes if you'd like that.