Go to Post FIRST is not about winning awards, it's about learning and advancing the human culture - crispyc [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 16-02-2013, 15:36
CFrank13's Avatar
CFrank13 CFrank13 is offline
Registered User
FRC #0599
 
Join Date: Jan 2013
Location: California
Posts: 9
CFrank13 is an unknown quantity at this point
broken potentiometer 'get' functions

We are using a potentiometer analog channel for the angle of our shooter. However, all 'get' functions (i.e. getValue() and getVoltage()) are not working. Code compiles and uploads, but does not print out any value to driver station or smartdashboard, and causes all other code to not run. Any ideas for fixing the get functions or a work-around to read voltage out of the pot without using a get?
Reply With Quote
  #2   Spotlight this post!  
Unread 17-02-2013, 01:20
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: broken potentiometer 'get' functions

The functions themselves aren't broken; other teams are using them without problem. How are you using them? Show us the code that is misbehaving and we can help you figure out what's going wrong.
Reply With Quote
  #3   Spotlight this post!  
Unread 17-02-2013, 06:21
CFrank13's Avatar
CFrank13 CFrank13 is offline
Registered User
FRC #0599
 
Join Date: Jan 2013
Location: California
Posts: 9
CFrank13 is an unknown quantity at this point
Re: broken potentiometer 'get' functions

Wow, turns out the solution was to create the object in the main file instead of a header of a lower file. Just had to write a work-around for using the value in the lower files. Works fine now
Reply With Quote
Reply


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 13:06.

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