Commit Graph

72 Commits

Author SHA1 Message Date
Jacob Dahl ce3e62841f module_base: remove CRTP template pattern to reduce flash bloat (#26476)
* module_base: claude rewrite to remove CRTP bloat

* module_base: apply to all drivers/modules

* format

* fix build errors

* fix missing syntax

* remove reference to module.h in files that need module_base.h

* remove old ModuleBase<T>

* add module_base.cpp to px4_protected_layers.cmake

* fix IridiumSBD can_stop()

* fix IridiumSBD.cpp

* clang-tidy: downcast static cast

* get_instance() template accessor, revert clang-tidy global

* rename module_base.h to module.h

* revert changes in zenoh/Kconfig.topics
2026-02-19 15:17:17 +13:00
Silvan Fuhrer d2e4d85bce Add Altitude Cruise mode
-add new NAVIGATION_STATE_ALTITUDE_VOYAGER
-this mode does require manual control to enter
-but you can disable the manual control loss failsafe to continue
flying in case of manual control loss
-for MC: in throttle and yaw are controlled like in Altitude mode,
the tilt is controlled via integrated rate input (similar to Acro,
but with tilt limit)

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2025-09-18 15:50:10 +02:00
Hamish Willee c2f872c558 docs: put RC modules into their own category (#24847) 2025-05-20 07:34:20 +02:00
Julian Oes 3c39095271 [Sponsored by Holybro] Support for Kakute H743-Wing (#24669)
* hrt: Fix PPM input on channel 2

The CCMR1_PPM define for PPM input on channel 2 was incorrectly set to 2,
which was setting bits for channel 1 instead of channel 2. This prevented
PPM input from functioning properly on channel 2.

Changed CCMR1_PPM for channel 2 from 2 to (1 << 8), which correctly
configures the CC2S bits for input capture mode on TI2.

This fixes an issue noted in the existing code comment:
"FIXME! There is an interaction in the CCMR registers that prevents
using Chan 1 as the timer and chan 2 as the PPM"

Tested on STM32H743 with PPM input on PC7 (TIM8_CH2).

* rc_input: enable sharing serial and PPM pin

By setting RC_SERIAL_PORT_SHARED_PPM_PIN_GPIO_RX it is now possible to
use the same pin on the STM32 for PPM input as well as serial input.

* boards: Add support for Holybro KakuteH7-Wing
2025-05-04 14:44:11 -08:00
Tony Cake ba31054992 Add RSSI in dBm support, plus LQ, to GHST protocol (#24351) 2025-02-28 00:53:32 -09:00
BazookaJoe1900 4d83badba1 fix files tags on the header comments (#23564) 2024-09-19 09:25:18 +03:00
Matthias Grob f2bca92221 Fix duplicate newlines at the end of files 2024-07-19 14:33:36 +02:00
Silvan Fuhrer 33701aa3d5 BatteryStatus: remove voltage_filtered_a
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-07-03 16:41:49 +02:00
Silvan Fuhrer c2ae6a7e24 BatteryStatus: remove current_filtered_a
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-07-03 16:41:49 +02:00
Alex Klimaj 297ddabe70 drivers: rc_input only publish if more than 0 rc channels filled (fixes GHST auto scan) 2024-04-09 11:19:41 -04: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
Matthias Grob 1c25d65a1e Add missing newline at the end of files 2023-12-01 13:11:00 -05:00
Beat Küng d1266c856f rc_input: prevent error output during boot on boards with px4io
output:
INFO  [rc_input] valid device required
ERROR [rc_input] Task start failed (-1)
2023-09-14 10:40:54 -04:00
Sergei Grichine f000238987 SensorGps.msg: switch to double precision for lat/lon/alt
To match https://github.com/PX4/PX4-GPSDrivers/pull/132 - adding high precision RTK lat/lon/alt components
2023-07-13 07:50:09 +02:00
Matthias Grob 7d0596d244 RCInput: follow topic name convention 2023-05-23 17:24:17 +02:00
chris1seto 77fdce9f3c drivers/rc/crsf_rc: update standalone driver for CRSF and direct support for lq/rssi (#20084)
Co-authored-by: Chris Seto <chris1seto@gmail.com>
2022-09-23 19:19:25 -04:00
Daniel Agar 54b5d4c5b8 drivers/rc_input: don't allow starting on the px4io serial port 2022-09-14 21:23:30 -04:00
Tony Cake f321117568 GHST: Add support for GPS Telemetry (#19953)
Add support for the basic GPS telemetry values when using the GHST protocol.

* Fix formatting in GHST GPS telemetry changes

* GHST GPS Telemetry formatting cleanup

* GHST GPS Telemetry, Last formatting change
2022-08-03 10:44:21 +02:00
Daniel Agar 15223009d2 combine sensor_gps + vehicle_gps_position msgs (keeping separate topics) 2022-07-07 10:24:11 -04: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
Alessandro Simovic fb71e7587c failure_detector: add motor/ESC failure detection 2022-05-12 07:58:56 +02:00
Daniel Agar fba7c972d1 drivers/rc_input: ensure RC inversion is disabled initially and latch RC_INPUT_PROTO conservatively
- this allows jumping straight to a non-SBUS RC protocol
 - increased the scan time per protocol 300->500 ms, which the newer DSM parser seems to need in some cases.
 - only set RC_INPUT_PROTO if we've had a successful RC lock for > 3 seconds
2022-05-11 14:30:41 -04:00
Daniel Agar a15432fac1 drivers/rc_input: RC_INPUT_PROTO parameter minimal implementation (#19539)
Co-authored-by: chris1seto <chris12892@gmail.com>

Co-authored-by: chris1seto <chris12892@gmail.com>
2022-04-27 21:06:43 -06:00
Daniel Agar 0b9f60a037 drivers/rc_input: always provide RC_PORT_CONFIG parameter
- RC_PORT_CONFIG is disabled by default if the board doesn't have
CONFIG_BOARD_SERIAL_RC set
 - allows user facing custom RC configuration that overrides board
defaults
2022-02-10 09:41:32 -05:00
Silvan Fuhrer f02786d112 Navigator/Commander: make GPS failsafe consitent: switch to Descend also for FW and VTOL
- remove GPS failsafe mode
- for VTOL: transition to hover in Descend (unless NAV_FORCE_VT is not set)

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-11-05 12:09:39 +03:00
Beat Küng 8a2b310b83 topic_listener: avoid code generation, use existing metadata at runtime
This reduces flash size for v5 by ~110KB, the topic listener now only adds
about 1.2KB.
2021-10-20 08:10:05 +02: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
Daniel Agar 089c962d92 px4io: moving mixing to FMU side
Using mixers on the IO side had a remote benefit of being able to
override all control surfaces with a radio remote on a fixed wing.
This ended up not being used that much and since the original design
10 years ago (2011) we have been able to convince ourselves that the
overall system stability is at a level where this marginal benefit,
which is not present on multicopters, is not worth the hazzle.

Co-authored-by: Beat Küng <beat-kueng@gmx.net>
Co-authored-by: Daniel Agar <daniel@agar.ca>
2021-09-25 19:15:05 -04:00
Daniel Agar ca685490a9 drivers/rc_input: only print vrssi if analog stable 2021-08-30 12:45:56 -07:00
Daniel Agar 15c01a9732 drivers/rc_input: flush buffers when beginning new scan state 2021-08-30 12:45:56 -07:00
Daniel Agar a305fc9c34 drivers/rc_input: only invert RC when starting/ending SBUS 2021-08-30 12:45:56 -07:00
Daniel Agar 79703c9c7a drivers/rc_input: don't resume scanning if armed 2021-08-30 12:45:56 -07:00
Daniel Agar 98f89aae9b drivers/rc_input: always report new lock 2021-08-30 12:45:56 -07:00
David Sidrane 4aa7bff8c6 rc_input:Use inttypes 2021-06-16 17:07:47 +02:00
benjinne 9b7eae4043 rc: enable crsf and ghst telemetry on supported boards
Co-authored-by: Benjamin Linne <benjamin.linne.civ@mail.mil>
2021-04-07 08:51:49 +02:00
Daniel Agar 2d6deb4f1c drivers/rc_input: don't accept RX_PAIR cmd when armed 2021-03-24 15:13:38 -04:00
Lorenz Meier 435ef38eda RC Input: Reset lock state when switching to a new protocol 2021-03-24 15:13:38 -04:00
jciberlin 6f5efbeab5 ghst_telemetry: send battery status
Send battery status (ghst_telemetry). Apply factors to show correct values of volts, amps and mAh. Change ghost protocol code to follow more MISRA C++ guidelines.
2021-03-15 09:42:53 +01:00
Daniel Agar bb12fce66c delete RATTITUDE flight mode 2021-03-09 10:47:00 -05:00
Daniel Agar 6b1e7ffdb8 rc_input: fix possible string truncation (-Werror=stringop-truncation) 2021-02-26 17:56:14 -05:00
jciberlin 64342f568d Ghost protocol
ghst: add ghost protocol
2021-02-20 11:29:57 +01:00
Daniel Agar 53a14e847d drivers/rc_input: support RC_RSSI_PWM_CHAN 2021-01-26 18:19:52 -05:00
Lorenz Meier a444d2610a Spektrum passive power: Only use if present 2020-12-31 13:22:52 +01:00
Lorenz Meier 641cc33d79 RC input: Always report DSM state 2020-12-31 13:22:52 +01:00
Lorenz Meier 6529e1444f RC input: Better monitoring
The output is now less confusing in terms of which protocol is currently active.
2020-12-31 13:22:52 +01:00
Lorenz Meier 8445a08bff RC input: Acknowledge binding (or indicate that feature is not implemented) 2020-12-31 13:22:52 +01:00
FengShun eac9a6b68b Replace PublicationQueued with Publication to automatically configure ORB_QUEUE_LENGTH 2020-10-26 13:01:13 +01:00
Daniel Agar ddce711acb drivers/rc_input: command line bind use vehicle_command 2020-10-04 22:23:47 -04:00
Daniel Agar 63a23957b1 rc/dsm: decode improvements
- always check system field for validity
 - reject any data outside of "servo position" valid range from Spektrum specification
 - properly support XPlus channels (12+)
 - debug message if channel count changes
2020-08-02 12:52:16 -04:00
rfu 8787780de4 some printf format and conversion fixes 2020-05-04 09:49:23 +02:00