Daniel Agar
40e42a677b
NuttX cmake support optional compressed defconfigs
2019-01-30 10:54:53 -05:00
Daniel Agar
d02685c9f7
cmake nuttx .px4 package fix dependency location
2019-01-29 15:34:36 -05:00
mcsauder
dc5f18bdcd
ToneAlarm class refactoring to implement an interface for hardware specific methods and a single ToneAlarm class.
2019-01-28 18:58:04 -08:00
Matthias Grob
bda60ecfd6
posix main: hotfix for px4 application not exiting anymore
...
Some threads do not exit and are still running when
trying to exit SITL running under Windows in Cygwin.
This problem was introduced with:
- posix shell #10173 because of strating a child process
for the startup script and mixing up the signal handling
(only Ctrl+C broken)
- lockstep #10648 because of simulator threads not
stopping gracefully anymore with timing race conditions
(no graceful exit possible anymore)
I leave the SIGINT handler on its default implementation for
Cygwin which kills the process and all its threads when pressing
Ctrl+C.
This hotfix at least allows the usage of Ctrl+C again instead
of forcing the user to use the task manager to shut down
px4.exe going crazy on CPU load instead of exiting
everytime.
2019-01-28 09:38:49 +01:00
Daniel Agar
739a02022b
position_estimator_inav: move to examples (start deprecation)
2019-01-27 22:15:39 +01:00
David Sidrane
dc73dd7bba
px4_init:Nuttx support boards without a console
2019-01-25 06:32:37 -08:00
David Sidrane
1ef9b5ed81
Updated Nuttx 7.28+
2019-01-25 06:32:37 -08:00
David Sidrane
8f308efa88
upstram NuttX CONFIG_EXAMPLES_NSH_CXXINITIALIZE->CONFIG_SYSTEM_NSH_CXXINITIALIZE
2019-01-25 06:32:37 -08:00
David Sidrane
e7bf0e03d2
px4_nuttx_tasks:Support future removal of env.
...
CONFIG_DISABLE_ENVIRON can prevent task having to allocate
memory for the env.
2019-01-25 06:32:37 -08:00
David Sidrane
91d8c31f7b
Custom board naming, removed need for tools/nuttx_defconf_tool.sh
2019-01-25 06:32:37 -08:00
David Sidrane
7ba81fac4b
Build copies the boards nuttx-config to build at Nuttx level
2019-01-25 06:32:37 -08:00
David Sidrane
d294b40fcb
Changes to suport Nuttx c++ lib rename
2019-01-25 06:32:37 -08:00
David Sidrane
e505fe859d
Update Nuttx and NuttX-apps to 7.28+
2019-01-25 06:32:37 -08:00
Beat Küng
74a3c378b2
drv_hrt: inline hrt_elapsed_time
...
GCC did not do that.
2019-01-25 07:53:37 +01:00
Daniel Agar
2ffb49b734
delete px4_includes.h header and update boards/ to use syslog
2019-01-23 18:25:18 -05:00
Lorenz Meier
3a7deefe6e
IO firmware: Run critical timing operations as atomic
...
This is required as we might be in interrupt context on this bare-metal target.
2019-01-22 23:52:57 +01:00
Lorenz Meier
c6718a5bca
Posix: Add initial stub for atomic HRT
...
The actual implementation is not atomic, as the value on the application layer would be limited.
2019-01-22 23:52:57 +01:00
Daniel Agar
320d2e9383
create PX4 platform layer initialization helper ( #11269 )
...
- starts requirements for PX4 modules (hrt, param, etc)
2019-01-22 14:13:20 -05:00
Beat Küng
4bc59092f4
lockstep_scheduler cmake: spaces -> tabs
2019-01-14 11:08:48 +01:00
Beat Küng
2a47715385
refactor lockstep_scheduler: fix class member naming convention
2019-01-14 11:08:48 +01:00
Beat Küng
828e31d3a9
lockstep_scheduler: optimize performance
...
- use a linked-list instead of std::vector. Insertion and removal are now
O(1)
- avoid malloc and use a thread_local instance of TimedWait.
It gets destroyed when the thread exits, so we have to add protection
in case a thread exits too quickly. This in turn requires a fix to the
unit-tests.
2019-01-14 11:08:48 +01:00
Beat Küng
ecbe2a3e0b
drv_hrt posix: improve performance for hrt_absolute_time()
...
Previously hrt_absolute_time() was at around 5% of the total CPU usage, now
it's around 0.35%.
2019-01-14 11:08:48 +01:00
Beat Küng
ccefc640ac
drv_hrt posix: remove unused code and remove locking from hrt_absolute_time
2019-01-14 11:08:48 +01:00
Beat Küng
5f0e6d70c5
lockstep_scheduler: use a static lock in usleep_until
...
less function calls
2019-01-14 11:08:48 +01:00
Beat Küng
e8cbc49f7a
lockstep_scheduler: remove timed_waits_iterator_invalidated_
...
Not required, since the lock is held during the whole loop iteration.
2019-01-14 11:08:48 +01:00
Beat Küng
8cdb65eed9
lockstep_scheduler: simplify LockstepScheduler::cond_timedwait & reduce locking
...
- the loop is not needed
- we optimize for the fast case and lock only if really needed
2019-01-14 11:08:48 +01:00
Beat Küng
318499f56e
lockstep_scheduler: inline get_absolute_time()
...
This is a small method that is used a lot.
2019-01-14 11:08:48 +01:00
Daniel Agar
195dbf4ab6
NuttX platform remove system (toolchain) stdc++ include path
2019-01-06 19:20:57 -05:00
karliss
6a33b797ac
drv_hrt restore dsp_offset and remove unused qurt code ( #11139 )
...
- Fixes #11134
2019-01-03 14:58:53 -05:00
Julian Oes
032e64aaf2
px4_sem: set errno, return -1 on any error
...
- Don't duplicate the ret variable to err.
- Return -1 on any error, 0 otherwise.
- Set errno to return value of pthread_cond_timedwait.
2019-01-01 20:35:42 +01:00
Julian Oes
23653f9f39
lockstep_scheduler: fix return value, remove errno
...
The API of cond_timedwait was wrong. It used return -1 and set errno
instead of returning the error as specified for pthread_cond_timedwait
which it tries to mock.
2019-01-01 20:35:42 +01:00
Lorenz Meier
0d0a556847
Fix usage of errno in POSIX semaphore error handling
...
Previous commit 98ae0186e9
changed the err variable to errno, which is not the return value we are looking for.
2019-01-01 20:35:42 +01:00
PX4 Build Bot
0636aff5d5
Update submodule nuttx to latest Sun Dec 23 21:16:39 UTC 2018
...
- nuttx in PX4/Firmware (faf082fa1876b3f96ff9c07fc91ab8211d274c60): c225d4a691
- nuttx current upstream: c225d4a691
- Changes: c225d4a691...c225d4a691
2018-12-23 16:20:30 -05:00
David Sidrane
d676325ea5
Update Nuttx with env out of memory fix
2018-12-22 19:09:49 +01:00
Julian Oes
8486b2b917
tests: properly disable shutdown test for Cygwin
2018-12-22 10:32:18 +01:00
Julian
0601214806
tests: disable shutdown and hysteresis for Cygwin
...
It seems that the hysteresis test fails every now and then, presumably
due to timing issues. The tests needs some improvements, e.g. isolating
it from the system time.
2018-12-22 10:32:18 +01:00
Julian Oes
ffb73f6496
platforms: fix redefinition for QURT
2018-12-22 10:32:18 +01:00
Julian Oes
14e5ebbbbc
platforms: fix clock build for macOS (yet again)
2018-12-22 10:32:18 +01:00
Julian Oes
06c5037025
platforms: use CLOCK_MONOTONIC
...
For the non-lockstep case we want to use CLOCK_MONOTONIC if possible.
2018-12-22 10:32:18 +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
5280a4aba1
platforms: prevent wrap-arounds in px4_sleep
...
@bkueng found that the old implementation was likely to wrap-around
given seconds is only a uint32_t. We now cast it directly to uint64_t
and therefore should fix this problem.
2018-12-22 10:32:18 +01:00
Julian Oes
4efe4b0d15
platforms: reorg after rebase on new board config
...
The new board config changed everything, so I needed to move the
lockstep_scheduler repo.
2018-12-22 10:32:18 +01:00
Julian Oes
6d273f3bd8
px4_layer: modernize warnings
2018-12-22 10:32:18 +01:00
Julian Oes
c24f6ef943
platforms: lockstep_scheduler ain't no submodule
2018-12-22 10:32:18 +01:00
Julian Oes
357870377a
platforms: try to get submodule checked out
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
d75389b2e4
platforms: consolidate latency_buckets
...
These symbols were duplicated all over the place.
2018-12-22 10:32:18 +01:00
Julian Oes
843033d530
platforms: remove unused function
2018-12-22 10:32:18 +01:00
Julian Oes
98ae0186e9
px4_sem: use px4_sem on all POSIX system
...
This uses the "fake" px4_sem based on mutex and condition_variable on
all POSIX system, not just macOS and Cygwin. This means that we can
change px4_sem_timedwait under the hood and inject the simulated time.
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