Skip to content

Instantly share code, notes, and snippets.

@DavidYKay
Created September 7, 2012 03:08
Show Gist options
  • Save DavidYKay/3662739 to your computer and use it in GitHub Desktop.
Save DavidYKay/3662739 to your computer and use it in GitHub Desktop.
ARDrone 1.8 -> 2.0 SDK Fixes
// This is the code from the updated navigation example, ardrone_ini.c:189
ardrone_tool_set_progressive_cmd(
enable,
/*roll*/(float)(stick1LR-center_x1)/32767.0f,
/*pitch*/(float)(stick1UD-center_y1)/32767.0f,
/*gaz*/-(float)(stick2UD-center_x2)/32767.0f,
/*yaw*/(float)(stick2LR-center_y2)/32767.0f,
/*psi*/0.0,
/*psi_accuracy*/0.0);
// For reference, here's the definition in ardrone_input.c:233
C_RESULT ardrone_tool_set_progressive_cmd(int32_t flag, float32_t phi, float32_t theta, float32_t gaz, float32_t yaw, float32_t psi, float32_t psi_accuracy)
// Earlier Autopylot Code (AR Drone SDK 1.8)
ardrone_at_set_progress_cmd(enable, phi, theta, gaz, yaw);
// AR Drone SDK 2.0 / 2.0 Hardware
ardrone_tool_set_progressive_cmd(enable, phi, theta, gaz, yaw, 0.0, 0.0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment