frc1418 / 2015-ui

Team 1418's Driver Station code for 2015. DEPRECATED, use https://github.com/FRCDashboard/FRCDashboard
Apache License 2.0
7 stars 5 forks source link

Use the global table stuff to make the websocket forwarder simpler #68

Closed virtuald closed 9 years ago

virtuald commented 9 years ago

@lleontan this will make your life a lot simpler. You need to update pynetworktables for it to work. Instead of individual table/subtables, it will just send all keys up to the websocket. The keys will come in the form /SmartDashboard/value or /SmartDashboard/subTable/value so it will break any existing UI code you guys have written. However, this should make dealing with subtables easier.

Similarly, when you write values to the robot, just send the right value down, specifying the full networktable path -- not just the key name.

Sorry that we didn't do this sooner, I'm sure you spent a lot of time on the subtable stuff.

virtuald commented 9 years ago

Note that in setKeyValue in SocketController, that you should just accept values of any type, be it string, number, or boolean. If they send the right type -- json will serialize it to the right type, and python will pass it on to NetworkTables using the right type.