mohankreddy / javadrone

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

Flags return 0 #35

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
the video/vision enabled flags both return false even though info I receive 
through the control port 5559 says they are both true. I'm working with vision 
detect right now, and although it detects tags, I'm getting data like position 
is always (0, 0) and width in dimensions is always 0.

Original issue reported on code.google.com by kroko...@gmail.com on 26 Jul 2012 at 5:26

GoogleCodeExporter commented 9 years ago
I figured out the vision tags issue, it was a bit shift problem. In 
parseVisionTags in NavData, this section:

int type = byteArrayToInt(buf, offset + 4 * i);
int xc = byteArrayToInt(buf, offset + 4 * i + 1 * nb_detected * 4);
int yc = byteArrayToInt(buf, offset + 4 * i + 2 * nb_detected * 4);
int width = byteArrayToInt(buf, offset + 4 * i + 3 * nb_detected * 4);
int height = byteArrayToInt(buf, offset + 4 * i + 4 * nb_detected * 4);
int dist = byteArrayToInt(buf, offset + 4 * i + 5 * nb_detected * 4);
int camsrc = byteArrayToInt(buf, offset + 4 * i + 9 * nb_detected * 4);

All of the nb_detected variables should be replaced with 4--at least since 
Parrot's SDK 1.8, I haven't looked at anything before that.

The video/vision state flags still return false though.

Original comment by jackiegc...@gmail.com on 26 Jul 2012 at 5:59

GoogleCodeExporter commented 9 years ago
Jack, thanks for catching this. We will check your fix and include it in the 
next build (hopefully on Monday).

Original comment by kroko...@gmail.com on 27 Jul 2012 at 5:20

GoogleCodeExporter commented 9 years ago
You are correct. I looked at structure definition in developer guide and your 
patch is correct.

Original comment by kroko...@gmail.com on 1 Aug 2012 at 12:09

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 5230ecda0801.

Original comment by kroko...@gmail.com on 1 Aug 2012 at 12:10