Go to Post How about we make parts in America that are so amazing that everyone will want to buy them. - rsisk [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 25-02-2015, 21:10
BitTwiddler's Avatar
BitTwiddler BitTwiddler is offline
electronics/programming mentor
AKA: Mr Tanguay
FRC #1726 (N.E.R.D.S.)
Team Role: Mentor
 
Join Date: Oct 2008
Rookie Year: 2006
Location: Sierra Vista, AZ
Posts: 240
BitTwiddler is on a distinguished road
Smart Dashboard - passing integers

Hi,
We've added a control that we hope will write integer values to the robot. We didn't see any problems changing the control to an I32 and passing that to the robot using the write numeric value VI. However on the robot side the read numeric value VI wants to return a floating point value. I don't see a way to specify that the value should be an integer. Can I safely use the floating point to I32 conversion to get the original integer value?
We don't have a practice robot to test our code on and I'd hate to find out on the first day of the regional that we will have to do something else.
Basically we set up a dashboard knob control with ten positions and want to test which position the knob is in on the robot for selecting different autonomous modes.
Thanks.
  #2   Spotlight this post!  
Unread 25-02-2015, 21:22
Ben Wolsieffer Ben Wolsieffer is offline
Dartmouth 2020
AKA: lopsided98
FRC #2084 (Robots by the C)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Manchester, MA (Hanover, NH)
Posts: 520
Ben Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud of
Re: Smart Dashboard - passing integers

Yes, that should work fine. NetworkTables used to have explicit support for integers (in 2012/2013? and earlier), but now all numbers are represented in floating point form, probably to keep the protocol simpler.
__________________



2016 North Shore District - Semifinalists and Excellence in Engineering Award
2015 Northeastern University District - Semifinalists and Creativity Award
2014 Granite State District - Semifinalists and Innovation in Control Award
2012 Boston Regional - Finalists
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 10:04.

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