|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Buttons without Scheduler
I need to implement functionality with buttons on the SmartDashboard which do things to the robot. I do not want to use Scheduler, since we are not using command-based. Is there a way to do this without making a smartdashboard widget and hack network tables backwards?
|
|
#2
|
||||
|
||||
|
Re: Buttons without Scheduler
Quote:
and put in this data somewhere Code:
public String getSmartDashboardType(){
return "Button";
}
private ITable table;
public void initTable(ITable table){
this.table = table;
if(table!=null){
table.putBoolean("pressed" false);
}
}
/**
* {@inheritDoc}
*/
public ITable getTable(){
return table;
}
Code:
table.getBoolean("pressed");
e/ No. send it to the dashboard via Code:
SmartDashboard.putData(yourButton) Code:
SmartDashboard.getData(yourButton |
|
#3
|
||||
|
||||
|
Re: Buttons without Scheduler
SmartDashboard.getData() is no longer a method in the wpilibj. It was removed in 2013...
|
|
#4
|
||||
|
||||
|
Re: Buttons without Scheduler
We've decided to not bother with it because the feature really isn't needed, but thank you for helping anyway.
|
|
#5
|
||||||
|
||||||
|
Re: Buttons without Scheduler
I haven't tried it, but have you looked at NetworkButton?
|
|
#6
|
||||
|
||||
|
Re: Buttons without Scheduler
Never tried it either.
|
|
#7
|
||||
|
||||
|
Re: Buttons without Scheduler
than just call it from the ITable..
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|