View Single Post
  #10   Spotlight this post!  
Unread 31-10-2012, 17:13
Brian Selle's Avatar
Brian Selle Brian Selle is offline
Mentor
FRC #3310 (Black Hawk Robotics)
Team Role: Engineer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Texas
Posts: 167
Brian Selle has a spectacular aura aboutBrian Selle has a spectacular aura aboutBrian Selle has a spectacular aura about
Re: Interrupts vs. Polling

Quote:
Originally Posted by Greg McKaskle View Post
While similar, it may be worth distinguishing interrupts and events. The command-based templates is dispatching events and not implementing interrupt handlers.
Greg is correct on this point and I meant to imply that the command-based template provides a high-level "interrupt like behavior" to FRC programmers (post updated). Under the hood, the scheduler uses polling to determine if the input button state has changed. In the limit switch example I gave in my previous post, we created a custom "DigitalIOButton" class that used a DigitalInput class to read the current state of the limit switch from the FPGA.