171 Commits

Author SHA1 Message Date
Junwoo Hwang
32ae00fd44
Move Vehicle Command Result Enum defs to Vehicle Command Ack (#19729)
- As it is always only used for the vehicle command ack message
- It was a duplicate, hence making it error prone for maintainment
- The uORB message comments were updated to make the relationship with
the MAVLink message / enum definitions clear
2022-07-07 16:15:11 +02:00
Michael Schaeuble
064a602962 Add PPS capture message to logged topics, simplify timestamp logic and small cleanup 2021-12-17 07:56:08 +01:00
Michael Schaeuble
5ad8b84dec Fix PPS based UTC timestamp in camera trigger and capture messages
The existing implementation has about 100ms difference to a reference clock. With the changes this error less than 25us.
- Use sensor_gps messages with hrt timestamps as RTC reference and not the system realtime clock. The PPS interrupt can then be aligned with the GPS clock system.
- Keep fallback based on system RTC when no PPS pulse was captured
2021-12-17 07:56:08 +01:00
Michael Schaeuble
ebb657bcf4 Fix camera trigger via MAVLink when camera capture feedback is enabled
- camera_trigger module always publishes the camera_trigger msg (independent of the camera feedback)
- Use camera_trigger msg and set the feedback flag
- Subscribing modules determine if the message is relevant based on the feedback message
2021-12-17 07:56:08 +01:00
Igor Mišić
8eca35111e camera_trigger: update to use PPS correction for UTC time 2021-12-17 07:56:08 +01:00
Daniel Agar
43a04c9bca fix PARAM_PREFIX for boards with px4io (CONFIG_BOARD_IO) 2021-12-16 07:20:12 +01:00
Beat Küng
6d993a9301 camera_trigger: use output functions for pin configuration if SYS_CTRL_ALLOC==1 2021-11-05 12:36:04 -04:00
Peter van der Perk
d5e3e9a7bc [Kconfig] Decompose Kconfig, now each module has its own Kconfig
Which is better for versioning and decomposability
2021-10-07 10:09:01 -04:00
Igor Mišić
3a148bc777 camera_trigger: remove camera trigger secondary
camera_trigger: publish trigger when capture feedback is not enabled
2021-09-23 09:21:56 +02:00
Julian Oes
faca2b17d0 camera_trigger: only get param if available 2021-09-17 12:23:30 +02:00
Beat Küng
1ee423e3c8 pwm_out, dshot: remove mode_* handling and capture ioctl's
They now use all unused pins, whereas camera_capture, camera_trigger and
pwm_input modules start before to reserve their pins.
2021-09-08 16:10:24 -04:00
Beat Küng
062dd28f4d camera_capture: use up_input_capture_set directly
It reserves the channel and pwm_out will not use it
2021-09-08 16:10:24 -04:00
Beat Küng
847bd120fa io_timer: reserve pins & timers on first use
This allows modules to do a first-come-first-serve pin/timer reservation
on bootup.
E.g. camera trigger reserves any of the pins, and then PWM/DShot output
will just use the rest of the available pins.
2021-09-08 16:10:24 -04:00
DonLakeFlyer
0af1716864 Fix incorrect max for INT32 2021-07-20 16:29:39 -04:00
Sander Swart
aa60d76963
camera trigger: don't keep triggering while enabled but paused 2021-06-24 06:56:58 +02:00
David Sidrane
c12a3330b8 camera_trigger: Use proper types 2021-06-16 17:07:47 +02:00
David Sidrane
7b2a1d4742 drivers:camera_trigger Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane
e0fab172a4 camera_trigger:Support more than 8 channles 2021-06-11 15:13:23 +02:00
Daniel Agar
6cdc034f08
camera_trigger: cleanup
- add copyright headers and update year
 - move initializers to header
 - add PX4_DEBUG messages
2021-03-15 12:35:41 -04:00
xdwgood
89878fcc88 clean up 2021-02-03 17:54:27 +01:00
Igor Campos
9c3b70d517 remove default value for roll angle 2020-12-09 17:54:53 +01:00
Igor Campos
bbad1bdd6e add comment. 2020-12-09 17:54:53 +01:00
Igor Campos
33b831efe3 rename variables 2020-12-09 17:54:53 +01:00
Igor Campos
dfcd6a7c16 fix typo 2020-12-09 17:54:53 +01:00
Igor Campos
c316af6ec7 update to match new feature as a new mavlink command Oblique Survey 260 2020-12-09 17:54:53 +01:00
Igor Campos
390ed3765f disable pseudo-oblique mode if param4 is 0. 2020-12-09 17:54:53 +01:00
Igor Campos
38a5b8a502 fix comment description for pitch angle 2020-12-09 17:54:53 +01:00
Igor Campos
d0ae931543 adjust minimum number of positions to 2. 2020-12-09 17:54:53 +01:00
Igor Campos
0cb3ce4886 fix readability 2020-12-09 17:54:53 +01:00
Igor Campos
e1e06364da fix formatting 2020-12-09 17:54:53 +01:00
Igor Campos
73f7b08873 add Camera Auto Mount Pseudo Oblique Solution (CAMPOS)
add target system and component ids to vmount commands

Signed-off-by: Igor Campos <igor.gama.90@gmail.com>
2020-12-09 17:54:53 +01:00
FengShun
eac9a6b68b Replace PublicationQueued with Publication to automatically configure ORB_QUEUE_LENGTH 2020-10-26 13:01:13 +01:00
Beat Küng
e28395a58b TRIG_MODE: update description to support 78 2020-08-05 09:02:58 +02:00
Beat Küng
46208edfac fix camera_trigger: no need to check for '_pins[i] < num_gpios'
_pins[i] >= num_gpios is a valid config.
2020-08-04 13:37:40 +02:00
Daniel Agar
466b5db36f
uORB::Publication improvements and cleanup (#14784)
- create common uORB::PublicationBase
 - uORB::PublicationQueued types are now type aliases
 - ORB_PRIO use enum type everywhere to avoid accidental misuse
 - PX4Accelerometer/PX4Gyroscope/etc driver libs explicitly advertise on construction, unadvertise on destruction. This is a workaround for any potential issues that might appear when accel/gyro cdev and uORB indexing doesn't align.
2020-05-04 11:09:30 -04:00
Dusan Zivkovic
3d44077f2c camera_trigger: lower the polling rate from 200Hz to 20Hz to reduce the CPU load 2020-03-25 16:23:11 -04:00
Lorenz Meier
027e52d402 Camera trigger: Improve code readability
This helps to trace the code, no functional changes.
2020-03-14 17:50:40 +01:00
Lorenz Meier
8842977d80 Camera trigger: Handle trigger distance handling better 2020-03-14 17:50:40 +01:00
Beat Küng
685be9b3d1 io pins: avoid using GPIO_GPIOx_OUTPUT, use timer_io_channels instead
The whole system now uses timer_io_channels, which will allow the redundant
GPIO_GPIOx_OUTPUT definitions to be removed.
2020-02-13 03:49:16 -08:00
David Sidrane
e847698c9f PX4 System changes Supporting STM32H7
stm32:ToneAlarmInterfacePWM TIM15-TIM17 have a BDTR Register

common:board_crashdump Add H7 support

stm32/board_mcu_version:Support H7

PX4 ADC:Use 32 interface and resoution abstraction

Added PX4 stm32h7 ADC driver

stm32h7:adc fix ADC ready check

fmu: handle BOARD_HAS_PWM==5

cmake: improve error handling for NuttX olddefconfig failures

WorkQueueManager:Quiet loadmon stack warning

camera_trigger:GPIO support < 6 GPIO

Adjust stack sizes (under hw stack check)

PX4 System changes Supporting STM32H7 PX4IO Driver

aerotenna_ocpoc:ADC add px4_arch_adc_dn_fullcount

init.cmake:Track Upstream change needing Make.def at config time

PX4 System changes Supporting STM32H7

NuttX CMakeLists.txt Track upstream changes

Common board_crashdump add header and px4 config

NuttX simplify callinb make libapps

Use UINT32_MAX for error return

drivers:uavcannode NuttX chip is now hardware

drivers:uavcanesc NuttX chip is now hardware

px4io:Avoid Race on AP to PX4 IO upgrade
2019-11-16 11:43:42 +01:00
Beat Küng
3198610f85 src/platforms: move all headers to platforms/common/include/px4_platform_common
and remove the px4_ prefix, except for px4_config.h.

command to update includes:
for k in app.h atomic.h cli.h console_buffer.h defines.h getopt.h i2c.h init.h log.h micro_hal.h module.h module_params.h param.h param_macros.h posix.h sem.h sem.hpp shmem.h shutdown.h tasks.h time.h workqueue.h; do for i in $(grep -rl 'include <px4_'$k src platforms boards); do sed -i 's/#include <px4_'$k'/#include <px4_platform_common\/'$k/ $i; done; done
for in $(grep -rl 'include <px4_config.h' src platforms boards); do sed -i 's/#include <px4_config.h/#include <px4_platform_common\/px4_config.h'/ $i; done

Transitional headers for submodules are added (px4_{defines,log,time}.h)
2019-10-30 11:48:47 +01:00
Daniel Agar
c284198bec clang-tidy: partially fix hicpp-use-override 2019-10-28 10:50:31 -04:00
Daniel Agar
4192414576 clang-tidy: partially fix cppcoreguidelines-pro-type-reinterpret-cast 2019-10-28 10:50:31 -04:00
Daniel Agar
26364d44c9
px4_work_queue: command line status output and shutdown empty queues
* adds a work_queue systemcmd that will bring a tree view of all active work queues and work items
 * WorkQueues now track attached WorkItems and will shutdown when the last WorkItem is detached
2019-10-02 12:23:17 -04:00
Daniel Agar
78ef8aab2d STACK_MAIN increase default 1024 -> 2048 2019-08-30 19:11:51 -07:00
Beat Küng
f8e0441e7b src/platforms/common: move to platforms/common
Script to update include paths:
for i in $(grep -rl 'include <px4_work_queue' src platforms); do sed -i 's/#include <px4_work_queue/#include <px4_platform_common\/px4_work_queue/' $i; done
2019-08-30 07:59:44 +02:00
Hamish Willee
c1c253d9be TRIG_PINS: clarify TRIG_PINS on FMU (#12714) 2019-08-19 14:45:59 +02:00
RomanBapst
cfba41d2f4 posix configs: set trigger interface to mavlink as it's the only one
supported on posix

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-08-06 08:08:56 +02:00
RomanBapst
cd85f584cf camera trigger: do not try to start if interface was not created
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-08-06 08:08:56 +02:00
Daniel Agar
e69398c09f introduce uORB::PublicationQueued and transition most orb_advertise_queue usage 2019-08-04 10:08:09 -04:00