2018-08-25 12:02:37 -03:00
|
|
|
#!/bin/sh
|
2018-08-06 09:24:15 -03:00
|
|
|
# PX4 commands need the 'px4-' prefix in bash.
|
|
|
|
# (px4-alias.sh is expected to be in the PATH)
|
2018-09-27 14:54:09 -03:00
|
|
|
. px4-alias.sh
|
2018-08-06 09:24:15 -03:00
|
|
|
|
2018-07-24 01:04:47 -03:00
|
|
|
# config for a quad
|
|
|
|
# modified from ../rpi/px4.config
|
|
|
|
|
2022-08-22 12:00:03 -03:00
|
|
|
param select parameters.bson
|
2021-12-23 13:29:35 -04:00
|
|
|
param import
|
2018-07-24 01:04:47 -03:00
|
|
|
|
2020-05-04 14:07:58 -03:00
|
|
|
param set CBRK_SUPPLY_CHK 894281
|
|
|
|
|
2018-07-24 01:04:47 -03:00
|
|
|
# Auto-start script index. Defines the auto-start script used to bootstrap the system.
|
|
|
|
# It seems that SYS_AUTOSTART does not work as intended on posix platform.
|
|
|
|
# For now, find the corresponding settings, and manually set them in ground control.
|
|
|
|
#
|
|
|
|
# 4001: Generic Quadrotor X; 4011: DJI Flame Wheel F450
|
|
|
|
param set SYS_AUTOSTART 4011
|
|
|
|
|
|
|
|
# Broadcast heartbeats on local network. This allows a ground control station
|
|
|
|
# to automatically find the drone on the local network.
|
|
|
|
|
|
|
|
# MAV_TYPE: 1 Fixed wing aircraft, 2 Quadrotor
|
|
|
|
param set MAV_TYPE 2
|
|
|
|
|
|
|
|
# Three possible main power battery sources for BBBlue:
|
|
|
|
# 1. onboard 2S LiPo battery connector, which is connect to ADC channel 6
|
|
|
|
# 2. onboard 9-18V DC Jack, which is connect to ADC channel 5. This is the board default.
|
2018-08-18 15:07:30 -03:00
|
|
|
# 3. other power source (e.g., LiPo battery more than 4S/18V).
|
|
|
|
# Scale the voltage to below 1.8V and connect it to ADC channel # 0, 1, 2 or 3.
|
2020-03-20 07:23:32 -03:00
|
|
|
param set BAT1_V_CHANNEL 5
|
2018-07-24 01:04:47 -03:00
|
|
|
|
|
|
|
# Battery voltage scale factor, from BBBlue schematics: (4.7K + 47K) / 4.7K = 11
|
2020-12-11 22:33:39 -04:00
|
|
|
param set BAT1_V_DIV 11.0
|
2018-07-24 01:04:47 -03:00
|
|
|
|
|
|
|
dataman start
|
|
|
|
|
2020-08-11 19:33:44 -03:00
|
|
|
load_mon start
|
|
|
|
|
2020-01-05 14:33:12 -04:00
|
|
|
bmp280 -I start
|
2018-07-24 01:04:47 -03:00
|
|
|
|
2020-07-26 22:38:35 -03:00
|
|
|
mpu9250_i2c -I start
|
2018-07-24 01:04:47 -03:00
|
|
|
# options: -R rotation
|
|
|
|
|
|
|
|
gps start -d /dev/ttyS2 -s -p ubx
|
|
|
|
|
2020-03-10 09:25:37 -03:00
|
|
|
#rgbled start -I -b 1
|
2020-01-07 12:08:37 -04:00
|
|
|
|
2020-09-08 00:09:20 -03:00
|
|
|
board_adc start
|
2020-01-07 12:08:37 -04:00
|
|
|
battery_status start
|
2018-07-24 01:04:47 -03:00
|
|
|
|
2019-11-24 14:25:11 -04:00
|
|
|
rc_update start
|
2018-07-24 01:04:47 -03:00
|
|
|
sensors start
|
|
|
|
commander start
|
|
|
|
navigator start
|
|
|
|
ekf2 start
|
2018-07-31 02:06:58 -03:00
|
|
|
land_detector start multicopter
|
2018-07-24 01:04:47 -03:00
|
|
|
|
2020-03-11 22:20:54 -03:00
|
|
|
mc_hover_thrust_estimator start
|
2020-10-24 12:09:25 -03:00
|
|
|
flight_mode_manager start
|
2018-07-24 01:04:47 -03:00
|
|
|
mc_pos_control start
|
|
|
|
mc_att_control start
|
2019-11-19 18:03:11 -04:00
|
|
|
mc_rate_control start
|
2018-07-24 01:04:47 -03:00
|
|
|
|
2021-01-31 09:36:27 -04:00
|
|
|
mavlink start -n SoftAp -x -u 14556 -r 1000000 -p
|
2018-08-18 15:07:30 -03:00
|
|
|
# -n name of wifi interface: SoftAp, wlan or your custom interface,
|
2018-07-28 22:55:08 -03:00
|
|
|
# e.g., -n SoftAp . The default is wlan
|
2018-07-24 01:04:47 -03:00
|
|
|
|
|
|
|
sleep 1
|
|
|
|
|
2020-02-03 09:40:27 -04:00
|
|
|
# RC port is mapped to /dev/ttyS4 (auto-detected)
|
2020-01-09 16:34:57 -04:00
|
|
|
#rc_input start -d /dev/ttyS4
|
2018-07-24 01:04:47 -03:00
|
|
|
|
2022-08-24 15:44:17 -03:00
|
|
|
control_allocator start
|
2021-02-25 03:51:05 -04:00
|
|
|
linux_pwm_out start
|
2018-07-24 01:04:47 -03:00
|
|
|
|
|
|
|
logger start -t -b 200
|
2020-01-07 12:08:37 -04:00
|
|
|
|
2018-07-24 01:04:47 -03:00
|
|
|
mavlink boot_complete
|