94 Commits

Author SHA1 Message Date
Eric Katzfey
d30ccb2b1d
initial board and platform support for the ModalAI VOXL 2 (POSIX + QuRT) 2022-09-23 12:03:05 -04:00
Daniel Agar
cfc579542e
new Ignition Gazebo simulation interface architecture (#20057)
- much simpler direct interface using Ignition Transport 
 - in tree models and worlds
 - control allocation output configuration, no more magic actuator mapping to mavlink and back
 - currently requires no custom Gazebo plugins (keeping things as lightweight and simple as possible)

Co-authored-by: Jaeyoung-Lim <jalim@ethz.ch>
2022-08-22 10:58:19 -04:00
Beat Küng
84b0a889a4 cmake: add clion support 2022-07-20 01:14:04 -04:00
Beat Küng
f22dc80ecc system: add missing includes (added indirectly via visibility.h for normal builds) 2022-07-20 01:14:04 -04:00
Daniel Agar
38731662c6 parameters use bitset for mark_unsaved 2021-12-24 14:32:40 -05:00
Daniel Agar
3269ee8df1 sensors/vehicle_angular_velocity: accumualted notch filtering and reset improvements
- apply sensor scaling immediately to keep things simple (FIFO vs regular)
 - inline filter helpers (minor performance improvement)
 - dynamic notch filtering
    - reorder by axis (applied per axis)
    - don't remove notch filters immediately if ESC or FFT data times out
    - constrain notch filter frequency and bandwidth to safe range (minimum bandwidth for flaot precision, Nyquist, etc)
 - add safe constraint on dt
2021-05-31 10:26:45 -04:00
Jukka Laitinen
64d264b49a bootloader: Move chip specific things under chip specific folders
- move systick.c under chip specific sources
- move do_jump into chip specific main.c as arch_do_jump
- wrap flash writes to "arch_flash_write" and implement in chip specific main.c
- add bootloader TOC check
- sync image_toc.h with the version currently in use with old bootloader

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-05-26 12:57:37 -07:00
Jukka Laitinen
15ab477e73 Add header file describing px4 image table-of-contents
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-01-27 08:36:08 +01:00
Yashom Dighe
5daca6c2c4
IntrusiveSortedList.hpp: let operator* return a reference
So that clang 12 does not complain:
loop variable 'child' is always a copy because the range of type 'List<ModuleParams *>' does not return a reference

Co-authored-by: Yashom Dighe <yashom7@gmail.com>
2020-09-21 16:55:04 -04:00
Beat Küng
5ac0c7c799 List.hpp: let operator* return a reference
So that clang 12 does not complain:
loop variable 'child' is always a copy because the range of type 'List<ModuleParams *>' does not return a reference
2020-09-21 09:23:21 -04:00
Daniel Agar
b6a17a6538
new IntrusiveSortedList container used for uORB, WorkQueues, and WorkItems
- new intrusive linked list container (c++ template) that sorts on insertion
 - primarily for convenience inspecting things in the system like uORB or WorkQueues
 - uorb status or top sorted alphabetically 
 - work_queue status threads sorted by priority, then items sorted alphabetically within each
2020-08-04 11:09:41 -04:00
Daniel Agar
d96a841050 List: handle re-inserting
- clear sibling on removal
 - add reinsertion test case to test_list
2020-04-17 11:56:24 -04:00
Beat Küng
1fe79818d9 fix IntrusiveQueue::remove: several bugs that led to improper state of the queue
We also have to set removeNode->next to null, as it is used to test if the
item is in the queue.
2020-03-21 12:00:09 -04:00
Daniel Agar
9585055e9e
uORB: add bitset for faster orb_exists check and remove uORB::Subscription lazy subscribe hack/optimization
- add PX4 bitset and atomic_bitset with testing
 - add uORB::Subscription constructor to take ORB_ID enum
 - move orb test messages into msg/
2020-03-11 09:06:33 -04:00
Daniel Agar
cc7807c066 mixer: update to List<> container 2019-11-22 15:00:25 -05:00
Beat Küng
a203475489 BlockingList: fix unsafe getLockGuard() API
getLockGuard relies on copy elision to work correctly, which the compiler
is not required to do (only with C++17).
If no copy elision happens, the mutex ends up being unlocked twice, and the
CS is executed with the mutex unlocked.

The patch also ensures that the same pattern cannot be used again.
2019-11-05 12:14:20 +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
9f4258f6ff clang-tidy: partially fix hicpp-explicit-conversions 2019-10-28 10:50:31 -04:00
Daniel Agar
2f222d6cbf containers/List add nullptr check 2019-08-09 07:55:13 +02:00
Daniel Agar
aee8f13289 List fix remove() and update testing 2019-06-13 10:47:27 -04:00
Daniel Agar
1623de8bd0 IntrusiveQueue add remove method, iterators, and update test 2019-06-13 10:47:27 -04:00
Julian Oes
29915cbc6d BlockingQueue: default initialize _data
This was reported by coverity.
2019-05-29 08:57:46 -04:00
Daniel Agar
e9ca5d5aba PX4 general work queue 2019-05-24 12:58:55 -04:00
Julian Oes
12374490cb visibility.h: clean up includes, add comments
This tries to make the visibility.h header clearer and better
structured. We don't actually need the ifdef for lockstep enabled or
disabled because that's now handled elsewhere.
2019-05-20 12:39:02 -04:00
Julian Oes
84537921e9 visibility.h: fix missing headers 2019-05-20 12:39:02 -04:00
Matthias Grob
f5f95635b4 gtest: fix poisoned exit in compile flags
visibility.h is included globally in PX4 via cmake compile flags.
It contains poisoning the exit() command which is used by gtest
to close the test application. Removing the flag for gtest compilation
fixes the compile error:
gtest.cc:4757:7: error: attempt to use poisoned "exit"
2019-05-09 09:42:46 +02:00
Matthias Grob
63b967f5df Add unit testing possibility using googletest on POSIX 2019-05-09 09:42:46 +02:00
Daniel Agar
edad4c40c3 containers add IntrusiveQueue and testing 2019-03-14 09:22:19 +01:00
Daniel Agar
e2bf4b1894 List container improvements and testing
- support range based for loops
 - add remove() method to remove a node
 - add clear() to empty entire list and delete nodes
 - add empty() helper
2019-03-01 21:01:04 -05:00
Daniel Agar
2ffb49b734 delete px4_includes.h header and update boards/ to use syslog 2019-01-23 18:25:18 -05:00
Daniel Agar
652c9dfc49 containers/Array.hpp cleanup and remove data initialization 2019-01-20 12:03:53 +01:00
Daniel Agar
edeb59a8c3 move logger array.h -> containers/Array.hpp 2019-01-20 12:03:53 +01:00
Julian Oes
547dd8511b platforms: use define for lockstep scheduler
Instead of using the define __PX4_POSIX_SITL it makes more sense to have
a define just to determine if the lockstep scheduler should be used.
2018-12-22 10:32:18 +01:00
Julian Oes
e41518a08b platforms: clean up various build/linking issues
This makes sure lockstep is only built for SITL builds and fixes the
existing builds.
2018-12-22 10:32:18 +01:00
Julian Oes
8cbe26c6f6 platforms: fix linking issues for NuttX build 2018-12-22 10:32:18 +01:00
Julian Oes
d1514cd667 POSIX: add defines system clock calls 2018-12-22 10:32:18 +01:00
Julian Oes
3e6e1f5c2b POSIX: use lockstep_scheduler to fake time
This integrates the lockstep_scheduler, so that the system time is set
by the mavlink HIL_SENSOR message.

This means that the speed factor is removed and the speed is entirely
given by the simulator.
2018-12-22 10:32:18 +01:00
Julian Oes
db6de38b19 Work in progress to support a speed factor in SITL
These contains some rough changes trying to get SITL to speed up by a
SPEED_FACTOR.

This platform time code probably requires some more thought and refactor
but this gets a demo at 4x working.
2018-12-22 10:32:18 +01:00
Julian Oes
d70b0f1c8c Replace sleep with px4_sleep
This is another step to isolate time from the system.
2018-12-22 10:32:18 +01:00
Julian Oes
5b9dea5604 Replacing usleep with px4_usleep
This is a step towards isolating time from the system.
2018-12-22 10:32:18 +01:00
Daniel Agar
023e267e9b uORB replace ORBMap with linked list 2018-11-23 08:15:48 +01:00
Lukas Woodtli
3d29e2e76f Fix some test code related leaks (#10488)
These leaks are not critical but the address-sanitizer complains.
And it's better programming practice anyway.

Signed-off-by: Lukas Woodtli <woodtli.lukas@gmail.com>
2018-09-16 17:38:50 -04:00
Beat Küng
4e6139d9fb Posix: add '#pragma GCC poison exit'
Generally exit() should not be used on Posix, because it exits the whole
program instead of only the task.
2018-08-31 18:11:58 +02:00
Daniel Agar
3ba97297d5 tests simple timing microbenchmark 2018-07-01 09:25:22 +00:00
Daniel Agar
f46ea75c9d mag declinataion test switch to ut_compare_float 2018-03-26 23:16:55 -04:00
Beat Küng
0d26aeafe2 px4_parameter.h: remove this file - it's not used anymore 2018-03-13 17:35:15 +01:00
Daniel Agar
59fd22be1b parameters import/export test 2018-01-30 09:17:56 -05:00
Daniel Agar
545ce9ae24 modules remove extra semicolons 2017-09-16 21:29:52 +01:00
Daniel Agar
08fbd022af lib remove extra semicolons 2017-09-16 21:29:52 +01:00
Daniel Agar
9f44279488 include remove extra semicolons 2017-09-16 21:29:52 +01:00