AdityaSantosh / aeroquad

Automatically exported from code.google.com/p/aeroquad
0 stars 0 forks source link

class FlightAngle_DCM has no member named 'get' #43

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. #include <Servo.h>
2. #define Camera 
3. compile

What is the expected output? What do you see instead?
expected successful compilation, instead:

---
AeroQuad.cpp: In function 'void loop()':
AeroQuad:352: error: 'class FlightAngle_DCM' has no member named 'get'
AeroQuad:353: error: 'class FlightAngle_DCM' has no member named 'get'
--- 

What version of the product are you using? On what operating system?
AeroQuadMega_v2
FlightAngle_DCM flightAngle;

Please provide any additional information below.
The solution is to use 'getGyroAngle' instead of 'get'. Here is the diff that 
solves the problem:

353,354c353,354
<     rollCamera.write((mCamera * flightAngle.get(ROLL)) + bCamera);

<     pitchCamera.write((mCamera * flightAngle.get(PITCH)) + bCamera);

---
>     rollCamera.write((mCamera * flightAngle.getGyroAngle(ROLL)) + bCamera);

>     pitchCamera.write((mCamera * flightAngle.getGyroAngle(PITCH)) + bCamera);

Regards,
itod

Original issue reported on code.google.com by itodoro...@gmail.com on 14 Nov 2010 at 12:13

GoogleCodeExporter commented 8 years ago
As a matter of fact, 'getGyroAngle' is also a wrong method, compiles OK but 
returns wrong angles. The correct method is 'getData'. Diff files are attached 
to this post. I've also used the opportunity to add the servo control of the 
3rd axis - Yaw, I intend to use it.

Original comment by itodoro...@gmail.com on 20 Nov 2010 at 10:20

Attachments:

GoogleCodeExporter commented 8 years ago
It's been a very long time since I looked at this.  Thanks for the corrections.

Original comment by CaranchoEngineering@gmail.com on 28 Nov 2010 at 10:50