|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Hi guys,
I'm wondering if there is any code that runs while your laptop is connected to the field via ethernet but the robot is disabled. Currently using IterativeBot in Java if there's a method we can override that I'm missing. Thinking about calibrating some wonky gyro on the field because if we do it in the pits it'll get all wonky and it's too hard to explain the gyro situation here and the gyro is bagged anyway. We'd have a limit-switch type object that we press on the bot itself and it will calibrate, turning on a certain LED while it is calibrating, and turning off when done. Anybody know? Thanks a bunch ^^ Last edited by jtrv : 04-03-2015 at 15:07. |
|
#2
|
|||
|
|||
|
Re: Does any code run while the laptop is connected to the field,but the bot is disab
overriding disabledInit() or disabledPeriodic() sounds like a match.
|
|
#3
|
||||
|
||||
|
Re: Does any code run while the laptop is connected to the field,but the bot is disab
That's what I thought too, but I honestly wasn't sure if FIRST had a safety system where literally no code will run while your laptop is connected to the field. So i don't know. There's not much of a way to test it until we get there, either, unfortunately.
|
|
#4
|
||||
|
||||
|
Re: Does any code run while the laptop is connected to the field,but the bot is disab
To the best of my knowledge, anything that could run an actuator (so all PWM, digital output, etc) cannot be used when the robot is disabled, but your code still runs. I know because our (C++) program prints to the smart dashboard in DisabledPeriodic().
|
|
#5
|
|||
|
|||
|
Re: Does any code run while the laptop is connected to the field,but the bot is disab
Yes, all output controls are disabled when the robot is disabled (safety feature), however, you can still initialize sensors (calibrate gyros, etc), load values from preferences, etc.
|
|
#6
|
||||
|
||||
|
Re: Does any code run while the laptop is connected to the field,but the bot is disab
Our gyro is a digital gyro that plugs into the SPI port. Will code be able to access that? We initialize it at SPI.Port.kOnboardCS1 ... Yes, we had to write our own driver in Java... it sucked, but it works (kinda).
|
|
#7
|
|||
|
|||
|
Re: Does any code run while the laptop is connected to the field,but the bot is disab
Quote:
|
|
#8
|
||||
|
||||
|
Re: Does any code run while the laptop is connected to the field,but the bot is disab
Quote:
|
|
#9
|
|||
|
|||
|
Re: Does any code run while the laptop is connected to the field,but the bot is disab
It should, yes.
|
|
#10
|
||||
|
||||
|
Re: Does any code run while the laptop is connected to the field,but the bot is disab
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|