Skip to content

Commit

Permalink
cuav/nora: some cleanup & rebase fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
bkueng committed Mar 25, 2020
1 parent 66e78e8 commit abe16d7
Show file tree
Hide file tree
Showing 15 changed files with 124 additions and 896 deletions.
24 changes: 24 additions & 0 deletions ROMFS/px4fmu_common/init.d/rc.interface
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,12 @@ then
pwm disarmed -c 6 -p p:PWM_AUX_DIS6 -d ${OUTPUT_AUX_DEV}
pwm disarmed -c 7 -p p:PWM_AUX_DIS7 -d ${OUTPUT_AUX_DEV}
pwm disarmed -c 8 -p p:PWM_AUX_DIS8 -d ${OUTPUT_AUX_DEV}
pwm disarmed -m 0x100 -p p:PWM_MAIN_DIS9 -d ${OUTPUT_AUX_DEV}
pwm disarmed -m 0x200 -p p:PWM_MAIN_DIS10 -d ${OUTPUT_AUX_DEV}
pwm disarmed -m 0x400 -p p:PWM_MAIN_DIS11 -d ${OUTPUT_AUX_DEV}
pwm disarmed -m 0x800 -p p:PWM_MAIN_DIS12 -d ${OUTPUT_AUX_DEV}
pwm disarmed -m 0x1000 -p p:PWM_MAIN_DIS13 -d ${OUTPUT_AUX_DEV}
pwm disarmed -m 0x2000 -p p:PWM_MAIN_DIS14 -d ${OUTPUT_AUX_DEV}

#
# Per channel min settings.
Expand All @@ -289,6 +295,12 @@ then
pwm min -c 6 -p p:PWM_AUX_MIN6 -d ${OUTPUT_AUX_DEV}
pwm min -c 7 -p p:PWM_AUX_MIN7 -d ${OUTPUT_AUX_DEV}
pwm min -c 8 -p p:PWM_AUX_MIN8 -d ${OUTPUT_AUX_DEV}
pwm min -m 0x100 -p p:PWM_MAIN_MIN9 -d ${OUTPUT_AUX_DEV}
pwm min -m 0x200 -p p:PWM_MAIN_MIN10 -d ${OUTPUT_AUX_DEV}
pwm min -m 0x400 -p p:PWM_MAIN_MIN11 -d ${OUTPUT_AUX_DEV}
pwm min -m 0x800 -p p:PWM_MAIN_MIN12 -d ${OUTPUT_AUX_DEV}
pwm min -m 0x1000 -p p:PWM_MAIN_MIN13 -d ${OUTPUT_AUX_DEV}
pwm min -m 0x2000 -p p:PWM_MAIN_MIN14 -d ${OUTPUT_AUX_DEV}

#
# Per channel max settings.
Expand All @@ -301,6 +313,12 @@ then
pwm max -c 6 -p p:PWM_AUX_MAX6 -d ${OUTPUT_AUX_DEV}
pwm max -c 7 -p p:PWM_AUX_MAX7 -d ${OUTPUT_AUX_DEV}
pwm max -c 8 -p p:PWM_AUX_MAX8 -d ${OUTPUT_AUX_DEV}
pwm max -m 0x100 -p p:PWM_MAIN_MAX9 -d ${OUTPUT_AUX_DEV}
pwm max -m 0x200 -p p:PWM_MAIN_MAX10 -d ${OUTPUT_AUX_DEV}
pwm max -m 0x400 -p p:PWM_MAIN_MAX11 -d ${OUTPUT_AUX_DEV}
pwm max -m 0x800 -p p:PWM_MAIN_MAX12 -d ${OUTPUT_AUX_DEV}
pwm max -m 0x1000 -p p:PWM_MAIN_MAX13 -d ${OUTPUT_AUX_DEV}
pwm max -m 0x2000 -p p:PWM_MAIN_MAX14 -d ${OUTPUT_AUX_DEV}

if [ $FAILSAFE_AUX != none ]
then
Expand All @@ -318,6 +336,12 @@ then
pwm failsafe -c 6 -p p:PWM_AUX_FAIL6 -d ${OUTPUT_AUX_DEV}
pwm failsafe -c 7 -p p:PWM_AUX_FAIL7 -d ${OUTPUT_AUX_DEV}
pwm failsafe -c 8 -p p:PWM_AUX_FAIL8 -d ${OUTPUT_AUX_DEV}
pwm failsafe -m 0x100 -p p:PWM_MAIN_FAIL9 -d ${OUTPUT_AUX_DEV}
pwm failsafe -m 0x200 -p p:PWM_MAIN_FAIL10 -d ${OUTPUT_AUX_DEV}
pwm failsafe -m 0x400 -p p:PWM_MAIN_FAIL11 -d ${OUTPUT_AUX_DEV}
pwm failsafe -m 0x800 -p p:PWM_MAIN_FAIL12 -d ${OUTPUT_AUX_DEV}
pwm failsafe -m 0x1000 -p p:PWM_MAIN_FAIL13 -d ${OUTPUT_AUX_DEV}
pwm failsafe -m 0x2000 -p p:PWM_MAIN_FAIL14 -d ${OUTPUT_AUX_DEV}
fi
fi
fi
Expand Down
3 changes: 0 additions & 3 deletions boards/cuav/nora/default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ px4_add_board(
ARCHITECTURE cortex-m7
ROMFSROOT px4fmu_common
BUILD_BOOTLOADER
IO px4_io-v2_default
TESTING
# UAVCAN_INTERFACES 2 - No H7 or FD can support in UAVCAN
SERIAL_PORTS
Expand Down Expand Up @@ -50,7 +49,6 @@ px4_add_board(
# all arch dependant code there
pwm_out_sim
px4fmu
px4io
rc_input

rpm
Expand Down Expand Up @@ -117,7 +115,6 @@ px4_add_board(
ver
work_queue
EXAMPLES
bottle_drop # OBC challenge
fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
hello
hwtest # Hardware test
Expand Down
38 changes: 0 additions & 38 deletions boards/cuav/nora/init/rc.board_defaults
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ then
fi
unset BL_FILE

#
# No px4IO
#
unset IOFW
param set SYS_USE_IO 0


if [ $AUTOCNF = yes ]
then
Expand All @@ -39,35 +33,3 @@ set LOGGER_BUF 64

safety_button start

fmu mode_pwm
pwm rate -a -r 400

pwm disarmed -m 0x100 -p p:PWM_MAIN_DIS9
pwm disarmed -m 0x200 -p p:PWM_MAIN_DIS10
pwm disarmed -m 0x400 -p p:PWM_MAIN_DIS11
pwm disarmed -m 0x800 -p p:PWM_MAIN_DIS12
pwm disarmed -m 0x1000 -p p:PWM_MAIN_DIS13
pwm disarmed -m 0x2000 -p p:PWM_MAIN_DIS14

pwm min -m 0x100 -p p:PWM_MAIN_MIN9
pwm min -m 0x200 -p p:PWM_MAIN_MIN10
pwm min -m 0x400 -p p:PWM_MAIN_MIN11
pwm min -m 0x800 -p p:PWM_MAIN_MIN12
pwm min -m 0x1000 -p p:PWM_MAIN_MIN13
pwm min -m 0x2000 -p p:PWM_MAIN_MIN14

pwm max -m 0x100 -p p:PWM_MAIN_MAX9
pwm max -m 0x200 -p p:PWM_MAIN_MAX10
pwm max -m 0x400 -p p:PWM_MAIN_MAX11
pwm max -m 0x800 -p p:PWM_MAIN_MAX12
pwm max -m 0x1000 -p p:PWM_MAIN_MAX13
pwm max -m 0x2000 -p p:PWM_MAIN_MAX14

pwm failsafe -m 0x100 -p p:PWM_MAIN_FAIL9
pwm failsafe -m 0x200 -p p:PWM_MAIN_FAIL10
pwm failsafe -m 0x400 -p p:PWM_MAIN_FAIL11
pwm failsafe -m 0x800 -p p:PWM_MAIN_FAIL12
pwm failsafe -m 0x1000 -p p:PWM_MAIN_FAIL13
pwm failsafe -m 0x2000 -p p:PWM_MAIN_FAIL14

set PWM_RATE none
4 changes: 0 additions & 4 deletions boards/cuav/nora/init/rc.board_mavlink
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,3 @@
# Start MAVLink on the USB port
mavlink start -d /dev/ttyACM0

# Start MAVLink on the uart port
mavlink start -d /dev/ttyS3

#gps start -d /dev/ttyS2
24 changes: 10 additions & 14 deletions boards/cuav/nora/init/rc.board_sensors
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,25 @@
adc start

# Internal SPI bus ICM-20689
mpu6000 -R 8 -z -T 20689 start
#$icm20948 -R start
mpu6000 -R 8 -s -T 20689 start
#icm20948 -R start

# Internal SPI bus BMI088 accel
bmi088 -A -R 10 start

bmi088 -A -s -R 10 start
# Internal SPI bus BMI088 gyro
bmi088 -G -R 10 start
bmi088 -G -s -R 10 start

#rm3100 -R 1 start
rm3100 start
# Possible external compasses
ist8310 -b 4 start
rm3100 -s start

hmc5883 -C -T -X start
# Possible external compasses
ist8310 -X start
hmc5883 -T -X start
qmc5883 -X start
lis3mdl -X start

# Possible internal compass
ist8310 -b 5 start
ist8310 -I start

# Baro on internal SPI
ms5611 -S start

# Baro on external SPI
ms5611 -s start

5 changes: 5 additions & 0 deletions boards/cuav/nora/nuttx-config/nsh/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ CONFIG_STM32H7_SERIAL_DISABLE_REORDERING=y
CONFIG_STM32H7_SPI1=y
CONFIG_STM32H7_SPI2=y
CONFIG_STM32H7_SPI4=y
CONFIG_STM32H7_SPI5=y
CONFIG_STM32H7_SPI6=y
CONFIG_STM32H7_TIM12=y
CONFIG_STM32H7_TIM15=y
Expand All @@ -217,19 +218,23 @@ CONFIG_TIME_EXTENDED=y
CONFIG_TTY_SIGINT=y
CONFIG_TTY_SIGSTP=y
CONFIG_UART4_BAUD=57600
CONFIG_UART4_DMA=y
CONFIG_UART4_RXBUFSIZE=600
CONFIG_UART4_TXBUFSIZE=1500
CONFIG_UART7_BAUD=57600
CONFIG_UART7_RXBUFSIZE=600
CONFIG_UART7_SERIAL_CONSOLE=y
CONFIG_UART7_TXBUFSIZE=1500
CONFIG_UART8_BAUD=57600
CONFIG_UART8_DMA=y
CONFIG_UART8_RXBUFSIZE=600
CONFIG_UART8_TXBUFSIZE=1500
CONFIG_USART1_BAUD=57600
CONFIG_USART1_DMA=y
CONFIG_USART1_RXBUFSIZE=600
CONFIG_USART1_TXBUFSIZE=1500
CONFIG_USART2_BAUD=57600
CONFIG_USART2_DMA=y
CONFIG_USART2_IFLOWCONTROL=y
CONFIG_USART2_OFLOWCONTROL=y
CONFIG_USART2_RXBUFSIZE=600
Expand Down
Loading

0 comments on commit abe16d7

Please sign in to comment.