px4-firmware/posix-configs/bbblue/px4_fw.config

76 lines
2.0 KiB
Plaintext
Raw Normal View History

#!/bin/sh
# PX4 commands need the 'px4-' prefix in bash.
# (px4-alias.sh is expected to be in the PATH)
. px4-alias.sh
# config for fixed wing (FW)
# modified from ./px4.config, switch att/pos_control & mixer
param select parameters.bson
param import
param set CBRK_SUPPLY_CHK 894281
# 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.
# 3. other power source (e.g., LiPo battery more than 4S/18V).
2018-08-18 15:07:30 -03:00
# Scale the voltage to below 1.8V and connect it to ADC channel # 0, 1, 2 or 3.
param set BAT1_V_CHANNEL 5
# 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
dataman start
bmp280 -I start
mpu9250_i2c -I start
# options: -R rotation
gps start -d /dev/ttyS2 -s -p ubx
2020-03-10 09:25:37 -03:00
#rgbled start -I -b 1
board_adc start
battery_status start
rc_update start
sensors start
commander start
navigator start
ekf2 start
land_detector start fixedwing
fw_att_control start
fw_pos_control start
mavlink start -n SoftAp -x -u 14556 -r 1000000 -p
# -n name of wifi interface: SoftAp, wlan or your custom interface,
# e.g., -n wlan . The default on BBBlue is SoftAp
sleep 1
# RC port is mapped to /dev/ttyS4 (auto-detected)
rc_input start -d /dev/ttyS4
control_allocator start
linux_pwm_out start
logger start -t -b 200
mavlink boot_complete