From 3e4e92e9c03c3494970a10ad98f3faee2198f6d5 Mon Sep 17 00:00:00 2001 From: Martin Trgina Date: Wed, 21 Mar 2018 21:07:43 +0100 Subject: [PATCH 1/4] Adding pwm_out_sim pwm_out_sim driver will be by default part of Aero FC PX4 Nuttx drivers --- cmake/configs/nuttx_aerofc-v1_default.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/configs/nuttx_aerofc-v1_default.cmake b/cmake/configs/nuttx_aerofc-v1_default.cmake index 8e3b5121bee0..e369cdfdfc9e 100644 --- a/cmake/configs/nuttx_aerofc-v1_default.cmake +++ b/cmake/configs/nuttx_aerofc-v1_default.cmake @@ -19,6 +19,7 @@ set(config_module_list drivers/imu/mpu9250 drivers/px4fmu drivers/stm32 + drivers/pwm_out_sim drivers/tap_esc modules/sensors From dacc9a32b09cd4105f05b47b4ed0e23df5fd0884 Mon Sep 17 00:00:00 2001 From: Martin Trgina Date: Wed, 21 Mar 2018 21:17:49 +0100 Subject: [PATCH 2/4] tap_esc is off when SYS_HITL 1 Support for ESCs of motors, when simulating MAV in simulator with HITL mode enabled --- ROMFS/px4fmu_common/init.d/4070_aerofc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ROMFS/px4fmu_common/init.d/4070_aerofc b/ROMFS/px4fmu_common/init.d/4070_aerofc index d842b98f7874..0eb2d773ba17 100644 --- a/ROMFS/px4fmu_common/init.d/4070_aerofc +++ b/ROMFS/px4fmu_common/init.d/4070_aerofc @@ -68,10 +68,14 @@ then param set SYS_LOGGER 1 fi -tap_esc start -d /dev/ttyS0 -n 4 -usleep 300000 +if param compare SYS_HITL 0 +then + tap_esc start -d /dev/ttyS0 -n 4 + usleep 300000 + + set OUTPUT_MODE tap_esc +fi -set OUTPUT_MODE tap_esc set MIXER quad_x set USE_IO no From 4ab3154a30459c289f967255b867289c363fc6c2 Mon Sep 17 00:00:00 2001 From: Martin Trgina Date: Wed, 21 Mar 2018 21:07:43 +0100 Subject: [PATCH 3/4] Adding pwm_out_sim pwm_out_sim driver will be by default part of Aero FC PX4 Nuttx drivers --- cmake/configs/nuttx_aerofc-v1_default.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/configs/nuttx_aerofc-v1_default.cmake b/cmake/configs/nuttx_aerofc-v1_default.cmake index 0facb2edb28e..aa50d777f3ec 100644 --- a/cmake/configs/nuttx_aerofc-v1_default.cmake +++ b/cmake/configs/nuttx_aerofc-v1_default.cmake @@ -19,6 +19,7 @@ set(config_module_list drivers/imu/mpu9250 drivers/px4fmu drivers/stm32 + drivers/pwm_out_sim drivers/tap_esc modules/sensors From 0e075bf683b1ac23ec2dbd98e87eb08b97a3a59d Mon Sep 17 00:00:00 2001 From: Martin Trgina Date: Wed, 21 Mar 2018 21:17:49 +0100 Subject: [PATCH 4/4] tap_esc is off when SYS_HITL 1 Support for ESCs of motors, when simulating MAV in simulator with HITL mode enabled --- ROMFS/px4fmu_common/init.d/4070_aerofc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ROMFS/px4fmu_common/init.d/4070_aerofc b/ROMFS/px4fmu_common/init.d/4070_aerofc index d842b98f7874..0eb2d773ba17 100644 --- a/ROMFS/px4fmu_common/init.d/4070_aerofc +++ b/ROMFS/px4fmu_common/init.d/4070_aerofc @@ -68,10 +68,14 @@ then param set SYS_LOGGER 1 fi -tap_esc start -d /dev/ttyS0 -n 4 -usleep 300000 +if param compare SYS_HITL 0 +then + tap_esc start -d /dev/ttyS0 -n 4 + usleep 300000 + + set OUTPUT_MODE tap_esc +fi -set OUTPUT_MODE tap_esc set MIXER quad_x set USE_IO no