Go to Post I urge teams to look beyond what you are given in the kit of parts and strive for more - sanddrag [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 21-03-2016, 18:52
DanG100 DanG100 is offline
DanG!
FRC #2367
Team Role: Programmer
 
Join Date: Mar 2015
Rookie Year: 2013
Location: California
Posts: 6
DanG100 is an unknown quantity at this point
NetworkTables compile issues

I'm trying to use network tables in C++ on windows, using Visual Studio.
After building with gradle and including the proper directories, I get several errors.

Code:
Error 5 error C4996: 'ITable::GetNumber': Raises an exception if key not found; use GetNumber(StringRef key, double defaultValue) instead	C:\ntcore\include\networktables\NetworkTable.h 477	1 GoalDetection
I get similar error for GetString and GetBoolean
  #2   Spotlight this post!  
Unread 21-03-2016, 18:58
jreneew2's Avatar
jreneew2 jreneew2 is offline
Alumni of Team 2053 Tigertronics
AKA: Drew Williams
FRC #2053 (TigerTronics)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Vestal, NY
Posts: 192
jreneew2 has a spectacular aura aboutjreneew2 has a spectacular aura aboutjreneew2 has a spectacular aura about
Re: NetworkTables compile issues

All you have to do is use the same function with different parameters. Instead of:

table->GetNumber("x");

do this instead

table->GetNumber("x", 0.0);

This just sets a default value for that value in the table in case the robot is not connected to the driver station yet. If it didn't it would throw an exception, like it says in the error.
  #3   Spotlight this post!  
Unread 21-03-2016, 19:10
DanG100 DanG100 is offline
DanG!
FRC #2367
Team Role: Programmer
 
Join Date: Mar 2015
Rookie Year: 2013
Location: California
Posts: 6
DanG100 is an unknown quantity at this point
Re: NetworkTables compile issues

The error I'm getting is in NetworkTable.h, I got the error as soon as included the file.
  #4   Spotlight this post!  
Unread 21-03-2016, 20:58
jreneew2's Avatar
jreneew2 jreneew2 is offline
Alumni of Team 2053 Tigertronics
AKA: Drew Williams
FRC #2053 (TigerTronics)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Vestal, NY
Posts: 192
jreneew2 has a spectacular aura aboutjreneew2 has a spectacular aura aboutjreneew2 has a spectacular aura about
Re: NetworkTables compile issues

Have you looked at this link:

https://wpilib.screenstepslive.com/s...client-pc-side

It is for java, but I'm sure you could easily translate it.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 09:52.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi