Skip to content

Instantly share code, notes, and snippets.

@patrickelectric
Created July 26, 2014 01:37
Show Gist options
  • Save patrickelectric/a6e716b6600a98329bd2 to your computer and use it in GitHub Desktop.
Save patrickelectric/a6e716b6600a98329bd2 to your computer and use it in GitHub Desktop.
/// DEBUG
#if 1
// multwii
#if 1
c_common_datapr_multwii_bicopter_identifier();
c_common_datapr_multwii_motor_pins();
c_common_datapr_multwii_motor(iActuation.escLeftSpeed+2,iActuation.escRightSpeed+2);
c_common_datapr_multwii_attitude(rpy[PV_IMU_ROLL ]*RAD_TO_DEG, rpy[PV_IMU_PITCH ]*RAD_TO_DEG, rpy[PV_IMU_YAW ]*RAD_TO_DEG );
arm_scale_f32(accRaw,RAD_TO_DEG,accRaw,3);
arm_scale_f32(gyrRaw,RAD_TO_DEG,gyrRaw,3);
c_common_datapr_multwii_raw_imu(accRaw,gyrRaw,magRaw);
c_common_datapr_multwii_servos((iActuation.servoLeft*RAD_TO_DEG),(iActuation.servoRight*RAD_TO_DEG));
c_common_datapr_multwii_debug(iActuation.escLeftSpeed,iActuation.escRightSpeed,iActuation.servoLeft*RAD_TO_DEG,iActuation.servoLeft*RAD_TO_DEG);
int Patrick[]={1,2};
float Muito[]={3.3,4.4};
float Top[]={5.5,6.6};
sendEscdata(Patrick,Muito,Top);
c_common_datapr_multwii_sendstack(USART2);
#else
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment