180 Commits

Author SHA1 Message Date
Matthias Grob
b85ad98a98 Use defines instead of hardcoded magic values for maximum number of output channels and rpm filter time constant 2024-12-19 07:30:25 +01:00
Matthias Grob
267fa06da8 RPMCapture: fix copyright year, improve comments 2024-12-19 07:30:25 +01:00
Hamish Willee
da8827883f
Use target camera in image capture start/stop messages (#23115)
* Use target camera in image capture start/stop messages

* Add support for MAV_CMD_SET_CAMERA_SOURCE

* Add target ID for NAV_CMD_SET_CAMERA_MODE

* Run make format
2024-10-09 21:10:08 +13:00
Matthias Grob
f2bca92221 Fix duplicate newlines at the end of files 2024-07-19 14:33:36 +02:00
Hamish Willee
b5627f487f
camera_trigger: module docs for camera trigger driver (#23104) 2024-05-29 11:37:27 +02:00
Eric Katzfey
57df7e35b2
uORB: make queue size (ORB_QUEUE_LENGTH) completely static (#22815)
Previously uORB queue size was an awkward mix of runtime configurable (at advertise or IOCTL before allocate), but effectively static with all queue size settings (outside of test code) actually coming from the topic declaration (presently ORB_QUEUE_LENGTH in the .msg). This change finally resolves the inconsistency making the queue size fully static.

Additionally there were some corner cases that the muorb and orb communicator implementation were not correctly handling. This PR provides fixes for those issues. Also correctly sets remote queue lengths now based on the topic definitions.

* Made setting of uORB topic queue size in based on topic definition only
* Fixes to the ModalAI muorb implementation
* Removed libfc sensor from format checks
* msg/TransponderReport.msg ORB_QUEUE_LENGTH 8->16 (was set to higher in AdsbConflict.h

---------

Co-authored-by: Eric Katzfey <eric.katzfey@modalai.com>
Co-authored-by: Daniel Agar <daniel@agar.ca>
2024-03-08 16:28:24 -05:00
Matthias Grob
1c25d65a1e Add missing newline at the end of files 2023-12-01 13:11:00 -05:00
Daniel Agar
15fece7e14 delete SYS_CTRL_ALLOC 2022-09-09 09:14:09 -04:00
Hamish Willee
e6eed43648
Spelling errors (#19935) 2022-07-27 14:33:16 +10:00
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