|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Disable robot from controller?
Hi! I'm a third year programmer for team 2974 and I've got one question. Is there a way to remotely disable/enable a robot from a controller? This is for a past year's robot and and is still using the 2014 code if that clarifies anything.
|
|
#2
|
||||
|
||||
|
Re: Disable robot from controller?
How creative are you looking to get? You can map one of the controller's buttons to be f1 and one to be enter, but I'm not sure if the driver station is smart enough to catch on to the fact that that input wouldn't be from a physical keyboard. The other option would be to do something crazy ala modifying OpenFMS to recognize a controller button as an enable command.
It's not exactly what you're looking for, but would modifying that robot's code to have an "enable" and "disable" button work? That way you could leave your robot enabled via the DS (you still need a DS connected), but "disable" all robot functions (write all outputs as zero and ignore almost all inputs) until you "enable" the majority of your code via a button on your controller. Especially if you're using simple or iterative templates, that method wouldn't require more than an extra boolean, and an if/else statement. |
|
#3
|
||||
|
||||
|
Re: Disable robot from controller?
If you want to be really, really ghetto you could map a button to a boolean (isDisabled) and just surround everything in teleop and autonomous with
Code:
if(!isDisabled) {
}
|
|
#4
|
||||
|
||||
|
Re: Disable robot from controller?
Quote:
|
|
#5
|
||||
|
||||
|
Anything that interferes with the fields ability to disable a robot would be a bin no no.
|
|
#6
|
||||
|
||||
|
Re: Disable robot from controller?
Quote:
Quote:
And plus, OP said this was for a demo bot, so while safety is definitely more of a concern than at competition, if safety is preserved FIRST legality is close to irrelevant. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|