mohankreddy/javadrone

NavData battery, altitude etc

Closed this issue · 6 comments

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:

Thanks for patches. I will review them and incorporate!

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

Patch commited. thanks!  However you also need to update printState method.

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

  • Changed state: Started
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

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:

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

this have been implemented.
see getControlState() method in NavData.

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

  • Changed state: Fixed