I’m having trouble with using the SmartDashboard’s robot preferences for changing constants without redeploying code. Whenever I run code I was expecting for the “MotorPower” robot preference to show up in the table on my SmartDashboard but it only displays “.type, robotpreferences, String”. Not sure what I should do.
I suspect this won’t be helpful, but… SmartDashboard was deprecated last year and I suspect they’re going to remove it in a season or two. You may want to switch to Shuffleboard.
That could be. Didn’t know it had been deprecated. Thanks
Unlike with putNumber you have to add the variables you are getting yourself. Click add then type in the variable name and choose the type. Then you can modify the value from where you are now.
It may be deprecated but it still functions at least for me.
Quick question: Where do you save/load the preferences? This is needed for actually changing the values, right?
Do you mean in the code or on the dashboard? The dashboard saves them automatically although it has a tendency to be inconsistent. I strongly recommend hard coding them after tuning or writing them down somewhere.
If you haven’t already look at this tutorial by first.
On the dashboard. So after I change a value on the dashboard it should change automatically, I don’t have to save or load it? Right now I’m just trying to alter the motor speed and it doesn’t respond to my changes.
Yeah it should change it automatically once you type in the number then just click out of the box. There’s no save, load or send button you have to press. Most likely you have some sort of issue in your code.
Sounds good. Thank you