View Single Post
  #11   Spotlight this post!  
Unread 13-11-2012, 13:48
Dave Flowerday Dave Flowerday is offline
Software Engineer
VRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: Feb 2002
Rookie Year: 1995
Location: North Barrington, IL
Posts: 1,366
Dave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond repute
Re: Driver Station + Space Bar

Quote:
Originally Posted by Roger View Post
I'm also curious that the space key stops the robot even when the driver station program does not have the focus. Not that I doubt you, but that is rather "grabby" of the DS, and the original intention (ha!) of Windows. I'll have to try that. (We use LabVIEW so spacekey use is minimal.)
Years ago before we had the Classmate (when the Driver Station was a blue box with USB and Ethernet ports), I created a Windows app that emulated the driver station. Given that a 130 pound robot moving at up to 20fps can do some real damage to people or property, I was very concerned about the safety issues in releasing it. From the start, the spacebar and ESC keys were used for disable - ESC being an obvious choice, and the spacebar being a nice big easy target to hit quickly. In my first version, I had code that detected if the window lost focus (and thus wouldn't receive the keystrokes), and if so it disabled the robot. In a later version, I replaced it with code that would catch keystrokes regardless of which window was active and if the spacebar was hit it would disable. I was really worried otherwise that someone would pull up some other app on top of the DS and then be unable to disable the robot quickly in an emergency.

It's been a few years since I've worked with the Labview driver station, but as I recall it worked almost exactly the same way that my virtual driver station did regarding the spacebar for disable. I've never been quite sure if this was simply a coincidence or if the developers of the Labview DS borrowed that feature from my virtual DS from 2009...

As for it being "grabby" - you bet. FRC robots are extremely dangerous. There's been countless close calls and a few very serious injuries with people working on the robots. Given that danger, whatever is being used to control the robot needs to have a 100% reliable, always available action that will disable it immediately. Making the spacebar not work just because you pulled up WindRiver or something is a really bad idea.

To the original poster: PLEASE don't try to override this functionality. It was made that way for a good reason. Just think about how you'd feel if something went wrong with your robot and a friend of yours (or you) got seriously injured because someone couldn't disable the robot quickly due to your override hack. Also, consider that you could become legally liable if someone gets hurt due to the changes you're trying to implement. It's just not worth it. Disable the robot when you need to work on your code if you must share the DS laptop.