![]() |
Setting custom disable behaviors
Tried the following snippet on DisabledInit() and DisabledPeriodic(). Neôther worked.
@Override Public void DisabledInit() { Super.DisabledInit(); LED.disable(); } It didn't like the override. I may have typed it in wrong, as I'm going off of 2-month old memory, but still. How do I get this to work? |
Re: Setting custom disable behaviors
Quote:
Code:
public void disabledInit() |
Re: Setting custom disable behaviors
Note that disabled, by definition, disables all outputs, regardless of what code you write. This is a safety feature (or "feature", depending on who you talk to.) It doesn't look like you're trying to activate any inputs, but it's something to be aware of when customizing disable code.
|
Re: Setting custom disable behaviors
Is there an alternate way to override then?
|
Re: Setting custom disable behaviors
Quote:
|
Re: Setting custom disable behaviors
Quote:
|
Re: Setting custom disable behaviors
Quote:
Quote:
The first definition of DisabledInit() is in the IterativeRobot class, so is you are trying to call super.DisabledInit() inside of IterativeRobot, or CommandBasedRobot, that is probably why its failing. Also do not include any @override annotations, as mentioned already they are not supported by the JVM on the cRIO. Hope this helps, Kevin |
Re: Setting custom disable behaviors
Quote:
|
Re: Setting custom disable behaviors
Quote:
It would be helpful if you pasted you full file so we can better assist you. |
Re: Setting custom disable behaviors
Importantly, it's not DisabledInit(), but rather disabledInit(). Capitalization matters. The same thing goes for DisabledPeriodic() - it's disabledPeriodic().
If you aren't sure if the code is getting called, you can try adding Code:
System.out.println("Yes, I'm working properly."); |
| All times are GMT -5. The time now is 22:38. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi