Commit Graph

315 Commits

Author SHA1 Message Date
Eric Katzfey 69028f37a9
New platform independent Serial interface (#21723) 2024-03-21 21:00:23 -04:00
Eric Katzfey 82a1aa37db
uORB: fix for uORB communicator, only send most recent data for new subscription (#22893) 2024-03-21 20:54:43 -04:00
Eric Katzfey 5f6dc1c5d0
uORB: SubscriptionBlocking purged the broken attempt to set the mutex protocol in constructor 2024-03-21 20:53:34 -04:00
Eric Katzfey f4ebfa6130
parameters: support for an optional remote parameter database (#22836)
The voxl2 has a split architecture. PX4 runs on a posix platform and a Qurt platform. The two communicate uorb topics back and forth with the muorb module. But each has it's own parameters database and they need to stay in sync with each other. This PR adds support to keep the 2 parameter databases in sync. The main parameters database running on Linux has file system support while the Qurt one does not. The Linux side is considered the primary and the Qurt side is considered the remote.
2024-03-11 13:52:22 -04: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
Niklas Hauser 0186d687b2 Add minimal Skynode RC13 config to the PAB manifest 2024-03-04 13:33:20 -05:00
Eric Katzfey 5ad0e68d8e Fix build error for Qurt platform in pab_manifest.c 2024-02-21 11:54:02 -05:00
David Sidrane 84d54c971f PX4:common add PAB manifest
PX4:common add PAB manifest with V5X bases
2024-01-30 11:15:03 -05:00
David Sidrane 46a8eb6335 PX4:Extend manifest types & add CLI query 2024-01-30 11:15:03 -05:00
David Sidrane 136e08652f PX4:comon Support BOARD_HAS_HW_SPLIT_VERSIONING 2024-01-30 11:15:03 -05:00
David Sidrane b556d668f8 RCInput:Add Support for RX-TX SWAP using onewire
A board can optionaly define RC_SERIAL_SWAP_USING_SINGLEWIRE
   If the board is wired board with TX to the input (Swapped) and
   the SoC does not support U[S]ART level RX-TX swapping to allow
   useing onewire to do the swap if and only if:

     RC_SERIAL_SWAP_USING_SINGLEWIRE   is defined
     RC_SERIAL_SWAP_RXTX               is defined
     TIOCSSWAP                         is defined and retuns !OK
     TIOCSSINGLEWIRE                   is defined
2024-01-16 17:09:26 -05:00
Peter van der Perk 84093a07a2 reboot: Add reboot to ISP option 2024-01-04 11:17:16 -05:00
Matthias Grob 3de5c609a4 Differential Rover: PR fixes 2023-12-21 16:27:53 +01:00
Matthias Grob adb22f1407 spi: put brackets such that GCC12 considers it a pointer for sure
otherwise you get the warning/error px4_spi_buses can never be NULL
2023-12-05 12:06:56 -05:00
Beat Küng c5101c70b3 uorb: enure message definitions don't exceed buffer lengths & increase test buffer
There were already checks at runtime, but this ensures the format is not
too long at built-time.
2023-12-05 10:42:23 +01:00
Julian Oes 895ddee16a i2c_spi_buses: method to count instances per bus
Signed-off-by: Julian Oes <julian@oes.ch>
2023-11-22 22:19:52 -05:00
David Sidrane e3f8d53718 nxp:imxrt 1060/1170 bifurcation and restructuring
imxrt:117x Reuse all but io_timer_hw_description and imxrt_pinirq.c

   imxrt:ADC & LPADC bifurcation and restructuring

   imxrt:hrt support Up to GPT6

   nxp/rt117x:adc Corrected
2023-11-15 11:10:47 -05:00
David Sidrane f0bc7d287d px4 allow up to 6 I2C busses 2023-11-15 11:10:47 -05:00
David Sidrane 51cda9edb0 px4 mtd:Support FlexSPI attached Devices 2023-11-15 11:10:47 -05:00
David Sidrane 35b9205b25 px4_platform_common: Break out I2C init if BOARD_I2C_LATEINIT is used 2023-11-15 11:10:47 -05:00
Beat Küng 22acb08406 uorb: add message format compatibility check
This can be used by DDS/ROS 2 to check for matching message definitions.
2023-11-15 13:18:58 +01:00
Beat Küng 1ad5a9de08 uorb: compress format definitions
Reduces flash usage by ~16KB.

- compress formats at build-time into a single string with all formats
- then at runtime iteratively decompress using
  https://github.com/atomicobject/heatshrink
2023-11-08 00:31:26 -05:00
Christian Rauch 7394a20a58 ignore px4_log on "ros2" platform 2023-11-03 11:50:56 -04:00
Matthias Grob 12b291b82f px4_log: comment typo alway{s} 2023-10-25 16:43:06 -04:00
Robbie Drage 68bc90bab5 uorb: fix Subscription::ChangeInstance() bug 2023-10-18 20:56:25 -04:00
Peter van der Perk 019d232911 Add Zenoh pico support 2023-10-18 15:30:36 -04:00
Ville Juven d83b9f3c38 WorkItemSingleShot: Disable priority inheritance for signaling semaphore
WorkItemSingleShot::_sem is a signaling semaphore, disable PI for it.

Set CONFIG_DEBUG_ASSERTIONS=y and the kernel panics due to the semaphore
having no holder, disabling PI fixes this.
2023-10-17 10:08:25 -04:00
Daniel Honies 476b5d5594
fix macos compile issues (#22173)
* fix macos compile issues

* remove unused variable
2023-10-12 09:13:19 +13:00
alexklimaj 23cf0a7317 workqueue: increase hp_default stack 2023-09-26 15:18:31 -04:00
Ville Juven 6cb2c176d5 events: Move implementation of events::send() to lib/events
Events have a global, system-wide sequence number, which must be handled
atomically, (fetching and incrementing the sequence AND sending the event
to uORB must be atomic). Currently in FLAT mode, only one instance of this
sequence number exists, so it is OK to have it in px4_platform.

However, in PROTECTED mode px4_platform is instantiated both in kernel-
and user spaces, which makes two instances of this sequence number, which
causes problems in the mavlink event handling logic.

When mavlink receives and handles events, it expects that:
- The sequence numbers arrive in order (seq n is followed by n+1 etc)
- It increments by 1
- There is only one instance of the sequence number

In PROTECTED mode this is violated, as the kernel and user sequence
numbers run freely on their own. This patch fixes the issue by moving
the event backend to the kernel and by providing user access to it via
ioctl.
2023-09-25 09:54:11 +02:00
Niklas Hauser ad1d72df6f
uORB: fix hardfault in uORB calloc implementation
When running out-of-memory, the malloc returns NULL and the memset then tries to write to address 0 which results in a hardfault.
2023-09-07 14:22:58 -04:00
hskrieg 64c21ad428 uorb: allow for more than 255 uORB messages
Increased size for ORB_ID from uint8_t to uint16_t

Created a type: orb_id_size_t = uint16_t.
There are still a couple of places where the size
of the ORB_ID is assumed to be less than 16-bits.
The places that I have found are commented regarding
this and can be found with a search on orb_id_size_t.
2023-08-08 10:59:34 +02:00
Peter van der Perk e739afe362 MR-CANHUBK3 ADAP board support, add ADC support 2023-06-27 07:24:07 -04:00
Beat Küng e65a0a01d6 fix WorkQueueManager: wait until running to prevent race conditions 2023-05-31 07:45:20 +02:00
Patrick José Pereira 643d89f54b uORB: Use snprintf over sprintf
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2023-05-22 07:46:54 +02:00
Patrick José Pereira dc2428a348 px4_log: Use snprintf over sprintf
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2023-05-22 07:46:54 +02:00
Jukka Laitinen b26669b085 Add crypto_deinit function for crypto_backend module
Bootloader needs to have a mechanism to de-initialize crypto, in case some HW accelerator
is being used. This adds the needed function for it

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-03-20 21:54:40 -04:00
Silvan Fuhrer d5e1f0fdaa uorb_graph: remove handling for actuator_controls topic
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2023-03-16 11:55:45 +01:00
Daniel Agar 435c799f57 uORB: print more decimal places for float32 and float64 2023-03-10 07:39:34 +01:00
Eric Katzfey daa302cdbe
Changes to allow the commander module to be built and run on Qurt (#21186)
* Changed exclusion to rely on the definition of PX4_STORAGEDIR
2023-03-06 09:49:07 -05:00
Daniel Agar a06a635da3
drivers/inv/vectornav: fix official vectornav library NuttX support
- vectornav library (libvnc) fixed for NuttX
   - open serial port O_NONBLOCK (like __APPLE__)
   - set serial port baud rate with cfsetspeed (like __APPLE__)
 - vectornav backend thread increase stack and run at higher priority (SCHED_FIFO)
2023-02-24 16:59:38 -05:00
Beat Küng e4cef9f303 logger: update watchdog
- reduce boost priority to PX4_WQ_HP_BASE - 6
- add cli command 'trigger_watchdog' to manually trigger watchdog
- add perf counters when triggering watchdog
- reduce top measurement to 300ms
- restore priorities after 1.5s

There are precautions in case the SD card code itself has a busy-loop.
2023-02-21 11:32:30 -05:00
Eric Katzfey ddd1527305
Qurt PX4_INFO_RAW send to apps for display (#21080) 2023-02-07 17:22:09 -05:00
Eric Katzfey a4aa76f0ac
VOXL2 board updates and new Kconfig option for ROOTFSDIR
- also includes a couple of miscellaneous changes to VOXL2 support to show Qurt messages on px4 console and put logs in the proper spot
2023-01-30 12:03:40 -05:00
alexklimaj 7c2da8d1ef Enable ARKV6X SPIX SYNC, enable icm426889 and iim42652 CLKIN 2023-01-18 21:52:11 -05:00
Daniel Agar 45912066d2 fix copyright header year range 2023-01-14 09:16:16 -05:00
Peter van der Perk 7d92d4893e VSCode C/C++ include path and config hints 2023-01-13 20:03:53 -05:00
Eric Katzfey 2a315f86ca
Qurt specific drivers for testing and some updates to the startup process (#20917)
* Added a couple of Qurt specific drivers for testing and some updates to Qurt startup code
2023-01-12 20:17:30 -05:00
Eric Katzfey 89180ac0f9 Fixed Kconfig and px4board files for voxl2 2023-01-11 09:53:18 -05:00
Peter van der Perk 4c2c06060d PX4Board kconfig add dependency chain for QURT & POSIX modules 2023-01-04 09:40:17 -05:00