Commit Graph

12591 Commits

Author SHA1 Message Date
Florent Martel
e43b2a73da AP_Frsky_Telem: increase sending params priority
If there's a lot of messages in the queue, params would not be
transmitted for a while, until the queue is empty, which can take a bit
of time during init.
2016-11-04 12:17:40 -07:00
Florent Martel
75905be376 AP_Frsky_Telem: simplified set_is_flying and moved to header file 2016-11-04 12:00:02 -07:00
Florent Martel
bc4ab70c1c AP_Frsky_Telem: added const to some declarations 2016-11-04 11:18:28 -07:00
floaledm
68b10979c3 AP_Frsky_Telem: added extra parentheses around pointed to values for readability
As suggested by tridge
2016-11-04 11:18:28 -07:00
Florent Martel
328e6d6886 AP_Frsky_Telem: removed sending redundant VSpd, Alt, and VFAS sensor values, which can now be handled by OpenTX 2016-11-04 11:10:09 -07:00
Ralf Ramsauer
530d3230df Linux: Scheduler: don't ignore return values
Several return values in the constructor of the scheduler were ignored
before, while they should be respected.

I found that bug while strac'ing ardupilot as it failed at some later
point.

Signed-off-by: Ralf Ramsauer <ralf.ramsauer@othr.de>
2016-11-03 17:27:37 -03:00
Lucas De Marchi
3ff965a0c0 DataFlash: remove infinite loop from loop() method
Remove the while() loop inside loop() method so the new signal handlers
correctly notify the mainloop to exit.

This makes SIGTERM/SIGINT work again.
2016-11-02 16:28:20 -02:00
Lucas De Marchi
2b5f9fdd6b AP_HAL_Linux: teardown scheduler threads 2016-11-02 16:28:20 -02:00
Lucas De Marchi
89420e4b2d AP_HAL_Linux: add signal handler for normal termination
This allows to terminate the flight stack nicely, ensuring it returns 0
so init system can check by return code if it terminated nicely or if it
was due to a crash.
2016-11-02 16:28:20 -02:00
Lucas De Marchi
fa540429f9 AP_HAL_Linux: allow to teardown bus threads
Add code to teardown all bus threads. This can be called while exiting
to wait for threads to finalize.
2016-11-02 16:28:20 -02:00
Lucas De Marchi
312a27dd20 AP_HAL: RCInput: rename deinit() to teardown() 2016-11-02 16:28:20 -02:00
Lucas De Marchi
89599f7bea AP_HAL_Linux: add unit tests for Thread implementations 2016-11-02 16:28:20 -02:00
Lucas De Marchi
992abd170d AP_HAL_Linux: allow to join threads 2016-11-02 16:28:20 -02:00
Lucas De Marchi
3b2de6de46 AP_HAL_Linux: allow PeriodicThread to stop
This takes the simplest approach of just waiting for the next time we
will process events.
2016-11-02 16:28:20 -02:00
Lucas De Marchi
20650e14b7 AP_HAL_Linux: allow PollerThread to stop 2016-11-02 16:28:20 -02:00
Lucas De Marchi
da65a5c349 AP_HAL_Linux: allow to wakeup pollable
This allows to wakeup the thread that is sleeping on Poller::poll()
[ which in our case is an epoll_wait() call ]. This is usually achieved
by using a special signal and using the pwait() variant of the sleeping
function (or using signalfd). However integrating the signal in the
Thread class is more complex than simply use the eventfd syscall which
can serve our needs.
2016-11-02 16:28:20 -02:00
Lucas De Marchi
efe819e21e AP_HAL_Linux: Poller: allow to fail constructor 2016-11-02 16:28:20 -02:00
Lucas De Marchi
e5003c3116 AP_HAL_Linux: Poller: add some documentation 2016-11-02 16:28:20 -02:00
Lucas De Marchi
da821e69eb AP_HAL_Linux: Thread: allow to use Thread from stack
Up until now we rely on Thread objects and variants thereof to be allocated
on heap or embedded in another object that's zero'ed on initialization.
However sometimes it's convenient to be able to use them on stack as
will be the case when writting unit tests.

Initialize all relevant fields to allow them to be used on stack. While
at it, prefer C++11 initialization on Poller since it's only setting the
default (invalid) value.
2016-11-02 16:28:20 -02:00
murata
c808ee2f49 Global: To nullptr from NULL.
RC_Channel: To nullptr from NULL.

AC_Fence: To nullptr from NULL.

AC_Avoidance: To nullptr from NULL.

AC_PrecLand: To nullptr from NULL.

DataFlash: To nullptr from NULL.

SITL: To nullptr from NULL.

GCS_MAVLink: To nullptr from NULL.

DataFlash: To nullptr from NULL.

AP_Compass: To nullptr from NULL.

Global: To nullptr from NULL.

Global: To nullptr from NULL.
2016-11-02 16:04:47 -02:00
floaledm
5386edb791 AP_Frsky_Telem: fix setting of land_complete flag
When is_flying is true, land_complete should be set to 0, and
conversely.
2016-11-02 10:26:50 +11:00
floaledm
1aab5eec38 AP_Frsky_Telem: send ap_status only once initialized
Same as what is found in GCS_MAVLink.cpp for copter
2016-11-02 08:31:35 +11:00
murata
e15c234a4f AP_ADSB: Set in the sprintf method. 2016-11-01 08:36:52 -07:00
murata
0028bd7b3c AP_ADSB: Set in the sprintf method. 2016-11-01 08:36:52 -07:00
Peter Barker
b9dcf1108d AP_ADSB: do not transmit by default
In various countries transmitting on the ADSB frequencies is a
federal offence.

Let's not have our users do that be default.
2016-11-01 14:21:07 +09:00
Michael Oborne
c5f8d8a695 AP_GPS_SBF: change reported altitude from geoid to MSL 2016-11-01 13:06:59 +09:00
Andrew Tridgell
df23c4857e AP_RangeFinder: disabled LeddarOne driver
this driver is broken and could cause a vehicle to crash. It does busy
waits on a UART from the main thread.

It will be re-enabled when fixed
2016-10-31 13:40:49 +11:00
Randy Mackay
aeb1de08f5 AP_GPS: fix MAV compile error 2016-10-29 16:45:00 +09:00
Peter Barker
1997a4e044 SITL: include mass of sprayer payload in vehicle mass 2016-10-29 15:02:56 +09:00
Peter Barker
0cea47ae54 AC_Sprayer: disentangle ENABLED from permission-to-run 2016-10-29 15:02:52 +09:00
Peter Barker
bae89d43fa AC_Sprayer: correct HOWTO, minor cleanups (NFC) 2016-10-29 15:02:50 +09:00
Peter Barker
a7867603a0 SITL: SIM_Sprayer: a simulated sprayer 2016-10-29 15:02:48 +09:00
Peter Barker
1bd96ae558 AP_Stats: ability to reset statistics 2016-10-29 14:53:25 +09:00
Peter Barker
e6adbceb3e AP_Stats: runtime 2016-10-29 14:53:25 +09:00
Peter Barker
77064852c4 AP_Stats: AP_Stats flighttime 2016-10-29 14:53:25 +09:00
Peter Barker
be13de79a4 AP_Stats: a periodic update function, flttime and runtime 2016-10-29 14:53:25 +09:00
Peter Barker
7eff99b053 AP_Stats: keeps track of vehicle usage statistics 2016-10-29 14:53:25 +09:00
Randy Mackay
9290ee65cc AP_GPS: MAV driver uses existing baud rates
GPS_INPUT messages can arrive through any mavlink serial port so we shouldn't be modifying any port's baud rates.
2016-10-29 14:33:44 +09:00
Peter Barker
066d066048 AP_BoardConfig: correct parameter metadata 2016-10-27 09:15:03 -07:00
Peter Barker
dee3bdbae9 AP_SerialManager: correct parameter metadata 2016-10-27 09:15:03 -07:00
Peter Barker
58a03b83ca AP_Terrain: add missing parameter metadata 2016-10-27 09:15:03 -07:00
Peter Barker
daf9a45efd AP_TECS: correct parameter metadata
Correct incomplete Description of LAND_PDAMP

Add DisplayName for LAND_PDAMP
2016-10-27 09:15:03 -07:00
Peter Barker
c1f455f904 AP_RangeFinder: correct parameter metadata 2016-10-27 09:15:03 -07:00
Peter Barker
ecd061dad5 AP_RPM: add missing parameter metadata 2016-10-27 09:15:03 -07:00
Peter Barker
06b616f761 AP_Motors: add missing parameter metadata 2016-10-27 09:15:03 -07:00
Peter Barker
9d0d451c48 AP_Mission: add missing parameter metadata 2016-10-27 09:15:03 -07:00
Peter Barker
755e76ced9 AP_L1_Control: add missing parameter metadata 2016-10-27 09:15:03 -07:00
Peter Barker
7b75a4ec09 AP_GPS: add missing parameter metadata 2016-10-27 09:15:03 -07:00
Peter Barker
e4001e67e2 AP_Compass: add missing parameter metadata 2016-10-27 09:15:03 -07:00
Peter Barker
a660ffa3fc AP_BoardConfig: add missing parameter metadata 2016-10-27 09:15:03 -07:00