93 Commits

Author SHA1 Message Date
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
Silvan Fuhrer
b16f16598b VTOL: remove virtual actuator_controls and instead use virtual torque/thrust topics
MC/FW rate controller and auto tuner: remove actuator_controls

AirshipAttControl: remove actuator_controls

MulticopterLandDetector: remove actuator_controls

mavlink streams vfr_hud and high_latency2: remove actuator_controls

RoverPositionController: remove actuator_controls

UUVAttitudeController: remove actuator_controls

battery: use length of thrust_setpoint for throttle compensation

VehicleMagnetometer: use length of thrust_setpoint for throttle compensation

Signed-off-by: Silvan Fuhrer
2023-03-16 11:55:45 +01:00
JaeyoungLim
3f5d7f38cd
Handle waypoint altitude acceptance radius for boats (#20508)
This corrects the waypoint handling logic to include boat type vehicles
2022-10-31 09:13:13 +01:00
Matthias Grob
46e6e83e14 Commander: allow disarmin not-landed boat like rover
This is a hotfix and a boat should never even detect a takeoff
in normal operation.
2022-10-05 09:07:18 -04:00
Junwoo Hwang
f66c3914f6 Give priority to power off tune over other tunes (e.g. Battery Low)
Make Power Off tune not interruptable

This solves the case of Low Battery warning tune overriding the power
off tune, as now the Power off tune is not interruptable by any other
tune unless override flag is specified

commander_helper: resolve "redundant boolean literal in ternary expression result"
2022-07-08 14:51:15 +02:00
Junwoo Hwang
652b153383 Cleanup set_tune() functions in the commander_helper
- Existing code was hard to read and quite ambiguous
- Also it allowed constantly re-sending the tune_control request for a
fixed duration tunes like "TUNE_ID_BATTERY_WARNING_SLOW", while not
respecting the tune duration
2022-07-08 14:51:15 +02:00
Daniel Agar
98623f69a3 update mavlink submodule to latest
- update MAV_TYPE VTOL usage for current mavlink
2022-04-07 20:35:41 +02:00
Daniel Agar
36e6527013 ROMFS: MAV_TYPE cleanup
- set MAV_TYPE as a parameter default per vehicle type, or airframe if necessary
 - cleanup MAV_TYPE param metadata and commander helper to only include
what's currently used in PX4
2022-03-17 09:28:10 -04:00
Julian Oes
90a33d59e4 commander: blink red on invalid mission
It doesn't make sense to blink green when something is not good.
2021-05-20 10:50:54 -04:00
Julian Oes
4ccc60e2b0 commander: neutral beep on mission with warning
When a mission is uploaded we should beep consistenly:
- valid -> positive
- warn -> neutral
- invalid -> negative

Before this, it was:
- valid -> positive
- warn -> negative
- invalid -> negative
2021-05-20 10:50:54 -04:00
Matthias Grob
d97fba67e5 Commander: switch helper functions to pass by reference 2021-03-30 22:33:01 -04:00
Daniel Agar
08bf71b73d
drivers/tone_alarm and tune_control small improvements/cleanup
- drivers/tone_alarm: move to ModuleBase and purge CDev (/dev/tone_alarm0)
 - drivers/tone_alarm: only run on tune_control publication (or scheduled note) rather than continuously
 - drivers/tone_alarm: use HRT to schedule tone stop (prevents potential disruption)
 - msg/tune_control: add tune_id numbering
 - systemcmds/tune_control: add "error" special case tune_id
 - move all tune_control publication to new uORB::PublicationQueued<>
 - start tone_alarm immediately after board defaults are loaded to fix potential startup issues
 - for SITL (or other boards with no TONE output) print common messages (startup, error, etc)
2020-10-05 21:39:26 -04:00
Beat Küng
8bfbfa033c fix commander: avoid LED printf errors on every SITL startup 2020-01-22 12:07:51 -05:00
Daniel Agar
f3cd5b19c8 emlid navio2: update RGB LED driver (move away from DriverFramework)
- delete unused linux gpio wrapper
2020-01-07 17:47:15 -05: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
Julien Lecoeur
8f910f8435 ATTITUDE_QUATERNION: fill repr_offset_q for tailsitters (#13249)
* Conversions lib: add quaternion getter

* vehicle_status: add flag is_vtol_tailsitter

* ATTITUDE_QUATERNION: fill repr_offset_q for tailsitters
2019-10-28 09:27:53 +01:00
Matthias Grob
e843090383 Replace a lot of memset with {} initializers 2019-10-15 10:01:03 -04:00
Daniel Agar
e69398c09f introduce uORB::PublicationQueued and transition most orb_advertise_queue usage 2019-08-04 10:08:09 -04:00
Beat Küng
72ddf3e0aa tune_control: use orb queue advertisement consistently 2019-07-25 10:38:57 -04:00
Timothy Scott
a134da6e12 Removed is_rotor_wing, replaced with vehicle_type 2019-06-13 10:04:26 +02:00
mcsauder
31f23c1e76 Rename tune_control_s strength to volume to match Nuttx and Linux standard nomenclature for audio (loudness) control. 2019-02-19 10:07:53 +01:00
Daniel Agar
48d9484ceb commander fix and enforce code style 2018-11-28 20:42:03 -05:00
Daniel Agar
abb3817d31 boards new split VENDOR_MODEL naming convention 2018-11-26 14:40:14 -08:00
Daniel Agar
6396e486bd commander cleanup battery failsafe handling 2018-08-21 02:38:51 -04:00
Bob-F
2ece14bad1 Port PX4 to BeagleBone Blue Board using library librobotcontrol instead of a submodule 2018-08-06 13:32:36 +02:00
Lorenz Meier
f87fa9131b FMUv5: Fix RGB led usage - these are individual status leds. 2018-06-06 23:03:28 +02:00
Beat Küng
11f4631b2a fix commander: initialize tune_durations (#9468)
Fixes #9451
2018-05-16 10:20:28 -04:00
Daniel Agar
ea3acb7121 cmake remove circular linking and reorganize
- px4_add_module now requires MAIN
 - px4_add_library doesn't automatically link
2018-04-29 21:48:54 -04:00
Julian Oes
4cac6d1a44 tune_control: added define for tune strength
This adds a define for the tune strength instead of hard-coding it with
a magic number.
2018-02-22 15:24:46 +01:00
Simone Guscetti
08490b0182 commander_helper: Modify to use the tunes library 2018-01-29 09:45:59 -05:00
David Sidrane
34cd7563fb commander:Removed PX4FMUv1 LED support 2017-09-10 13:37:23 -04:00
Simone Guscetti
1e4b79034f commander_helper: Add rgbled function
with priority and blink period
2017-03-14 14:25:49 +01:00
Beat Küng
95e8e26ae0 commander: use led_control uorb topic 2017-03-12 00:08:35 +01:00
Beat Küng
b0439836f6 refactor drv_led.h: rename to drv_board_led.h
This makes it clear that it's used to control the board LED's, not external
LED's.
2017-03-12 00:08:35 +01:00
Anton Matosov
3a17c07b1e Implement RC and DL failsafe action handling for multirotors
Move RC and DL failsafe actions handling from navigator to commander (credits to @AndreasAntener)
Separate manual kill switch handling via manual_lockdown to prevent override and release of software lockdown by RC switch

Other changes:
Add failsafe tune
Fix LED blinking for Pixracer
Return back support for rc inputs in simulator but now it is configurable via cmake
2016-12-27 00:38:13 +01:00
Beat Küng
241fd629ce ERROR macro: get rid of the many 'oddly, ERROR is not defined for c++', use PX4_ERROR 2016-09-30 13:50:51 +02:00
Hidenori
ff647e7bc8 Navio: GPIO driver command fix and update ifdefs 2016-08-06 20:47:55 +02:00
Hidenori
3049b9af01 Navio2: add support for GPIO and RGBLED 2016-08-06 20:47:55 +02:00
Lorenz Meier
670b0f7c6d Commander: MAVLink is an off-vehicle API we should not depend internally on 2016-08-02 14:54:16 +02:00
Daniel Agar
c22a9137dd commander cleanup headers 2016-06-15 20:35:16 +02:00
Sander Smeets
1815b47fbf Add reserved type, fixes #4466 (#4476)
* Add reserved type, fixes #4466

* Additional reserved vtol types added to is_vtol
2016-05-07 10:59:49 +02:00
Julian Oes
2cd05dea4d commander: try different mavlink include 2016-04-11 18:01:48 +02:00
Julian Oes
5c9713f05b commander: try to get the travis include right 2016-04-11 18:01:48 +02:00
Julian Oes
32c3135788 commander: move battery calculations to systemlib
The commander used to consume the battery_status topic and write the
contents after some calculations into the system state. Instead, the
calculations now happen in library calls in systemlib/battery.

This moves the battery fields out of the vehicle_status message into the
battery_status topic.

This brought quite some changes in all modules that need battery
information. The current state is compiling but untested.
2016-04-11 18:01:47 +02:00
Julian Oes
74072dbe74 vehicle_status.msg: delete unused mavlink stuff
The MAV_TYPE enum was not in sync with the mavlink specs anymore. It
makes therefore sense to remove the duplication and include the correct
mavlink header file where it is needed.
Also, error counts which are not populated, can be scrapped.
2016-04-11 18:01:47 +02:00
Lorenz Meier
835208e070 Commander: Fix dev handle init 2015-12-04 10:51:37 +01:00
Mark Charlebois
af155b8e59 Fixed SITL build
The SITL build seems to run correctly now

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-11-18 13:02:39 -08:00
Mark Charlebois
b8c40ecb6b Enabled DriverFramework drivers for SITL build
The code here works only for SITL at the present time.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-11-18 11:58:21 -08:00
jgoppert
6cce823dc6 Replaced wigen with custom matrix lib. 2015-10-24 15:10:20 -04:00
Lorenz Meier
d1f8edb346 Merged beta into master 2015-07-04 23:02:47 +02:00