mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00:00
The bulk of this change was tightly coupled and needed to be deleted in one pass. Some of the smaller changes were things that broke as a result of the initial purge and subsequently fixed by further eradicating unnecessary platform differences. Finally, I deleted any dead code I came across in the related files I touched while going through everything.
- DriverFramework (src/lib/DriverFramework submodule) completely removed
- added dspal submodule in qurt platform (was brought in via DriverFramework)
- all df wrapper drivers removed
- all boards using df wrapper drivers updated to use in tree equivalents
- unused empty arch/board.h on posix and qurt removed
- unused IOCTLs removed (pub block, priv, etc)
- Integrator delete methods only used from df wrapper drivers
- commander: sensor calibration use "NuttX version" everywhere for now
- sensors: update to px4_{open, read, close} instead of DevMgr wrapper (adc open for analog differential pressure)
- battery_status: update to px4_{open, read, close} instead of DevMgr wrapper (adc open for analog differential pressure)
- cdev cleanup conflicting typedefs and names with actual OS (pollevent_t, etc)
- load_mon and top remove from linux boards (unused)
- delete unused PX4_MAIN_FUNCTION
- delete unused getreg32 macro
- delete unused SIOCDEVPRIVATE define
- named each platform tasks consistently
- posix list_devices and list_topics removed (list_files now shows all virtual files)
104 lines
2.3 KiB
Bash
104 lines
2.3 KiB
Bash
#!/bin/sh
|
|
|
|
# PX4 commands need the 'px4-' prefix in bash.
|
|
# (px4-alias.sh is expected to be in the PATH)
|
|
. px4-alias.sh
|
|
|
|
uorb start
|
|
muorb start
|
|
|
|
# We need to wait until the DSP side is ready before
|
|
# sending commands with qshell.
|
|
sleep 1
|
|
|
|
# default, generic quad platform
|
|
if param compare SYS_AUTOSTART 4100
|
|
then
|
|
param set MAV_TYPE 2
|
|
|
|
qshell pwm_out_rc_in start -d /dev/tty-2
|
|
|
|
qshell gps start -d /dev/tty-4
|
|
qshell hmc5883 start
|
|
|
|
# Qualcomm 200qx microheli platform
|
|
elif param compare SYS_AUTOSTART 4200
|
|
then
|
|
param set MAV_TYPE 2
|
|
param set MC_YAW_P 7.0
|
|
param set MC_YAWRATE_P 0.08
|
|
param set MC_YAWRATE_I 0.0
|
|
param set MC_YAWRATE_D 0
|
|
param set MC_PITCH_P 7.0
|
|
param set MC_PITCHRATE_P 0.08
|
|
param set MC_PITCHRATE_I 0.0
|
|
param set MC_PITCHRATE_D 0.0001
|
|
param set MC_ROLL_P 7.0
|
|
param set MC_ROLLRATE_P 0.08
|
|
param set MC_ROLLRATE_I 0.0
|
|
param set MC_ROLLRATE_D 0.0001
|
|
param set SENS_BOARD_ROT 0
|
|
|
|
# Qualcomm internal 210qc platform
|
|
elif param compare SYS_AUTOSTART 4210
|
|
then
|
|
param set MAV_TYPE 2
|
|
param set MC_YAW_P 12
|
|
param set MC_YAWRATE_P 0.08
|
|
param set MC_YAWRATE_I 0.0
|
|
param set MC_YAWRATE_D 0
|
|
param set MC_PITCH_P 7.0
|
|
param set MC_PITCHRATE_P 0.08
|
|
param set MC_PITCHRATE_I 0.0
|
|
param set MC_PITCHRATE_D 0.001
|
|
param set MC_ROLL_P 7.0
|
|
param set MC_ROLLRATE_P 0.08
|
|
param set MC_ROLLRATE_I 0.0
|
|
param set MC_ROLLRATE_D 0.001
|
|
param set SENS_BOARD_ROT 0
|
|
|
|
else
|
|
echo "NO AIRFRAME CHOSEN!"
|
|
echo "Please set parameter to select airframe:"
|
|
echo " SYS_AUTOSTART 4100: generic (flight) Quad"
|
|
echo " SYS_AUTOSTART 4200: Microheli 200QX"
|
|
fi
|
|
|
|
|
|
qshell mpu9250 start
|
|
qshell bmp280 start
|
|
qshell rc_update start
|
|
qshell sensors start
|
|
|
|
if param compare SYS_MC_EST_GROUP 1
|
|
then
|
|
qshell attitude_estimator_q start
|
|
qshell local_position_estimator start
|
|
|
|
elif param compare SYS_MC_EST_GROUP 2
|
|
then
|
|
param set EKF2_GBIAS_INIT 0.01
|
|
param set EKF2_ANGERR_INIT 0.01
|
|
qshell ekf2 start
|
|
else
|
|
echo "No estimator chosen"
|
|
exit -1
|
|
fi
|
|
|
|
qshell commander start
|
|
qshell land_detector start multicopter
|
|
qshell mc_pos_control start
|
|
qshell mc_att_control start
|
|
qshell mc_rate_control start
|
|
|
|
logger start -b 200 -t
|
|
|
|
param set MAV_BROADCAST 1
|
|
dataman start
|
|
navigator start
|
|
mavlink start -u 14556 -r 1000000
|
|
mavlink stream -u 14556 -s HIGHRES_IMU -r 50
|
|
mavlink stream -u 14556 -s ATTITUDE -r 50
|
|
mavlink stream -u 14556 -s RC_CHANNELS -r 20
|
|
mavlink boot_complete
|