/* * Output functions * */ extern "C" void sf_MPU6050_2xDriver_GxAyz_Outputs_wrapper(int16_T *x_vel, int16_T *y_acc, int16_T *z_acc, int16_T *x_vel_2, int16_T *y_acc_2, int16_T *z_acc_2, const real_T *xD) { /* %%%-SFUNWIZ_wrapper_Outputs_Changes_BEGIN --- EDIT HERE TO _END */ /* This sample sets the output equal to the input y0[0] = u0[0]; For complex signals use: y0[0].re = u0[0].re; y0[0].im = u0[0].im; y1[0].re = u1[0].re; y1[0].im = u1[0].im; */ if(xD[0] == 1) { #ifndef MATLAB_MEX_FILE x_vel[0]=accelgyro.getRotationX(); y_acc[0]=accelgyro.getAccelerationY(); z_acc[0]=accelgyro.getAccelerationZ(); x_vel_2[0]=accelgyro2.getRotationX(); y_acc_2[0]=accelgyro2.getAccelerationY(); z_acc_2[0]=accelgyro2.getAccelerationZ(); #endif } /* %%%-SFUNWIZ_wrapper_Outputs_Changes_END --- EDIT HERE TO _BEGIN */ }