Lucas13013 / javadrone

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

NavData battery, altitude etc #6

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The current NavData only contains the state flags, the attached patch enables 
float and int data like altiture, battery, pitch etc. in NavData.java

Original issue reported on code.google.com by normen667 on 21 May 2011 at 9:15

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks for patches. I will review them and incorporate!

Original comment by kroko...@gmail.com on 22 May 2011 at 2:44

GoogleCodeExporter commented 8 years ago
Patch commited. thanks!  However you also need to update printState method.

Original comment by kroko...@gmail.com on 22 May 2011 at 2:53

GoogleCodeExporter commented 8 years ago
Ok, will do that. Another thing I found was that sometimes the byte count would 
be lower, I now added a check for less than 27 and 43 bytes..

Original comment by normen667 on 22 May 2011 at 11:01

GoogleCodeExporter commented 8 years ago
Added the data to the printState() method and also added a fix for when the 
data bytes are fewer than expected, see attached patch.

Original comment by normen667 on 22 May 2011 at 12:01

Attachments:

GoogleCodeExporter commented 8 years ago
We need to detect takeoff/landing in NavData. For this wee need to be able to 
parse following state information in NavData:

 CVARZ( CTRL_DEFAULT ),
 CVAR( CTRL_INIT ),
 CVAR( CTRL_LANDED ),
 CVAR( CTRL_FLYING ),
 CVAR( CTRL_HOVERING ),
 CVAR( CTRL_TEST ),
 CVAR( CTRL_TRANS_TAKEOFF ),
 CVAR( CTRL_TRANS_GOTOFIX ),
 CVAR( CTRL_TRANS_LANDING ),

See:

Soft/Common/navdata_common.h
Soft/Common/control_states.h

in Parrot SDK.

Original comment by kroko...@gmail.com on 24 May 2011 at 11:02

GoogleCodeExporter commented 8 years ago
this have been implemented.
see getControlState() method in NavData.

Original comment by kroko...@gmail.com on 26 May 2011 at 7:20