![]() |
How to Write From SmartDashboard
This sounds like a really stupid question, and it is. Quite simply, we can't figure out how to use the SmartDashboard to input information into our program. Our SmartDashboard.putNumber() works perfectly fine, but when we try using the .getNumber() or .getBoolean(), or any of the gets, nothing happens. If we don't set a default value, no value is set.
For printing on the SmartDashboard, we are simply using the methods in our code, and the corresponding widgets are automatically created. |
Re: How to Write From SmartDashboard
You have to first put the value to the SmartDashboard before you can get its updated value. So, you call SmartDashboard.putNumber("this is a number", some_default_value), which causes the field to appear on the SmartDashboard. Then you can edit this number in the SmartDashboard GUI, and when you call SmartDashboard.getNumber("this is a number"), it will return the updated value.
|
Re: How to Write From SmartDashboard
You also may need to hit tab for the value to be set in the dashboard
|
Re: How to Write From SmartDashboard
We got it to work! Thanks, lopsided98. That was extremely simple, but we tried so hard to figure it out. You made our lives a lot easier.
|
| All times are GMT -5. The time now is 00:42. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi