Go to Post This is the best experience you will ever get. - Arefin Bari [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, 00:58
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: Accelerometer Code Making Robot Stop Moving

I thought %d was for integers. Doesn't the GetAcceleration() method return a float?
Reply With Quote
  #2   Spotlight this post!  
Unread 16-02-2013, 10:27
SushenaJammi SushenaJammi is offline
Registered User
FRC #0384
 
Join Date: Feb 2013
Location: Richmond, VA
Posts: 1
SushenaJammi is an unknown quantity at this point
Re: Accelerometer Code Making Robot Stop Moving

in ADXL345_SPI.h, it says

Code:
 virtual double GetAcceleration(Axes axis);
Reply With Quote
  #3   Spotlight this post!  
Unread 16-02-2013, 10:40
progal's Avatar
progal progal is offline
Programmer
AKA: Shelby
FRC #0384 (Sparky)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Glen Allen
Posts: 15
progal is an unknown quantity at this point
Re: Accelerometer Code Making Robot Stop Moving

Quote:
Originally Posted by Alan Anderson View Post
I thought %d was for integers. Doesn't the GetAcceleration() method return a float?
%d is for doubles
%f is for floats
%i is for integers

but the accelerometer values return a double as Sushena pointed out.
__________________

C++ Programmer
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:03.

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