Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pr crazyflie optflow fix #9514

Merged
merged 2 commits into from
May 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 41 additions & 28 deletions ROMFS/px4fmu_common/init.d/4900_crazyflie
Original file line number Diff line number Diff line change
Expand Up @@ -14,39 +14,52 @@
#
# @maintainer Dennis Shtatov <[email protected]>
#

sh /etc/init.d/4001_quad_x


if [ $AUTOCNF == yes ]
then
param set COM_RC_IN_MODE 2
param set BAT_N_CELLS 1
param set BAT_CAPACITY 240
param set BAT_SOURCE 1

param set PWM_DISARMED 0
param set PWM_MIN 0
param set PWM_MAX 255

param set SYS_COMPANION 20

param set MC_PITCHRATE_D 0.0015
param set MC_PITCHRATE_I 0.05
param set MC_PITCHRATE_P 0.045
param set MC_PITCH_P 6.5
param set MC_ROLLRATE_D 0.0015
param set MC_ROLLRATE_I 0.05
param set MC_ROLLRATE_P 0.045
param set MC_ROLL_P 6.5
param set MC_YAW_P 3.0

param set CBRK_SUPPLY_CHK 894281
param set CBRK_USB_CHK 197848
param set COM_RC_IN_MODE 1
param set BAT_N_CELLS 1
param set BAT_CAPACITY 240
param set BAT_SOURCE 1
param set PWM_DISARMED 0
param set PWM_MIN 0
param set PWM_MAX 255
param set SYS_COMPANION 20
param set MC_PITCHRATE_D 0.002
param set MC_PITCHRATE_I 0.2
param set MC_PITCHRATE_P 0.07
param set MC_PITCH_P 6.5
param set MC_ROLLRATE_D 0.002
param set MC_ROLLRATE_I 0.2
param set MC_ROLLRATE_P 0.07
param set MC_ROLL_P 6.5
param set MC_YAW_P 3.0
param set EKF2_HGT_MODE 2
param set EKF2_AID_MASK 3
param set EKF2_OF_DELAY 10
param set MPC_THR_HOVER 0.7
param set MPC_MANTHR_MAX 1.0
param set MPC_THR_MAX 1.0
param set MPC_Z_P 1.5
param set MPC_Z_VEL_I 0.3
param set MPC_Z_VEL_P 0.4
param set MPC_HOLD_MAX_XY 0.1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor suggestion, sorting these alphabetically and splitting roughly by group makes this a bit easier to read or change.

param set MPC_MAX_FLOW_HGT 3
param set IMU_GYRO_CUTOFF 100
param set IMU_ACCEL_CUTOFF 30
param set MC_DTERM_CUTOFF 70
param set SYS_FMU_TASK 1
param set CBRK_SUPPLY_CHK 894281
param set CBRK_USB_CHK 197848
param set SDLOG_PROFILE 1
param set EKF2_MAG_TYPE 1
param set EKF2_ABL_LIM 2.0
param set MC_AIRMODE 1
param set NAV_RCL_ACT 3
param set SENS_FLOW_MINRNG 0.05
fi

set PWM_MIN none
set PWM_MAX none
set PWM_DISARMED none
# Will run the motors at 328.125 kHz (recommended)
set PWM_RATE 3921
set PWM_RATE 3921
5 changes: 5 additions & 0 deletions src/drivers/pmw3901/pmw3901.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,11 @@ PMW3901::collect()
report.sensor_id = 0;
report.quality = 255;

/* No gyro on this board */
report.gyro_x_rate_integral = NAN;
report.gyro_y_rate_integral = NAN;
report.gyro_z_rate_integral = NAN;

_flow_dt_sum_usec = 0;
_flow_sum_x = 0;
_flow_sum_y = 0;
Expand Down