View Single Post
  #10   Spotlight this post!  
Unread 22-02-2014, 09:38
kylelanman's Avatar
kylelanman kylelanman is offline
Programming Mentor
AKA: Kyle
FRC #2481 (Roboteers)
Team Role: Mentor
 
Join Date: Feb 2008
Rookie Year: 2007
Location: Tremont Il
Posts: 186
kylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to all
Re: RoboRealm NetworkTables

I wanted to post our solution to this problem in hopes that it can help someone else.

For reasons unknown to us using the SmartDashboard table exhibited the 'stale' or 'static' value affect referenced above.

The Solution:

We are sending one number (double) called HOTTARGET.
0 is Not Hot
1 is Hot

In RoboReam we changed the NetworkTable from SmartDashboard to RoboRealm.

Here is the C++ side of things.

Code:
class Camera2481 : public Subsystem {
private:
NetworkTable* mTable; Camera2481() {
mTable = NetworkTables::GetTable("RoboRealm");
} bool IsHotTarget() {
int ht = mTable->GetNumber("HOTTARGET", 2); SmartDashboard::PutNumber("HOTTARGET", ht); return ht == 1;
}
};
__________________
"May the coms be with you"

Is this a "programming error" or a "programmer error"?

Reply With Quote