21859 Commits

Author SHA1 Message Date
Mohammed Kabir
e8e4e5be49 land detector : add stbs for altitude 2017-04-02 21:52:18 +02:00
Lorenz Meier
1adbf37cbe PWM command: Do not use return value of read 2017-04-02 21:52:18 +02:00
Lorenz Meier
dbd065a307 Add PWM out sim trim settings 2017-04-02 21:52:18 +02:00
Lorenz Meier
306d4b8817 Makefile: Add Gazebo clean step 2017-04-02 21:52:18 +02:00
Lorenz Meier
5f135acf33 Land detector: Add mode for rovers 2017-04-02 21:52:18 +02:00
Lorenz Meier
bbd1906dfb Add Rover SITL config 2017-04-02 21:52:18 +02:00
Lorenz Meier
63a84900e6 Add rover model 2017-04-02 21:52:18 +02:00
bharath374
6e64bff494 Updated PID gains in 200qx config file 2017-04-02 12:15:37 +02:00
FantasyJXF
d1c3b771ee Update navigator_main.cpp
fix a spell error
2017-04-02 12:15:10 +02:00
Beat Küng
2a175aa2f9 logger: use nullptr instead of NULL 2017-04-01 20:19:52 +02:00
Beat Küng
bfcbe4b6c3 log_writer_file: rename perf counters
To be more consistent with the rest of the system
2017-04-01 20:19:52 +02:00
Beat Küng
190c14c186 logger: add preflight & postflight process usage & perf counters to the log
For the process usage: we need to measure over a certain period of time,
then we can use the results. To avoid blocking, this does:
- after log is started, initialze the load counters, then one second later
  add the results to the log
- after disarming: continue logging for one more second, then add the process
  load to the log and stop logging.
- to avoid a delay, 'logger stop' will stop immediately and not log
  postflight process usage.
2017-04-01 20:19:52 +02:00
Beat Küng
e75f5a4642 perf_counter: add perf_print_counter_buffer & perf_iterate_all
These can be used to print the perf counters to a buffer.
2017-04-01 20:19:52 +02:00
Beat Küng
446c734edc perf_counter: use a mutex to protect concurrent access to the perf_counters linked list
perf_counters is read from and written to by different threads and thus
requires synchronization. Without it we risk accessing invalid memory.

There are still remaining issues (see comment in code), they will not lead
to a crash however.
2017-04-01 20:19:52 +02:00
Beat Küng
4b01e5b6b6 printload: add print_load_buffer() method
Instead of printing to an fd, this prints to a buffer and calls a callback
for each line. To avoid code duplication, the print_load has been refactored
to print to a buffer first, then print to an fd. The overhead is not
noticable, and the behavior of print_load is unchanged.
2017-04-01 20:19:52 +02:00
Beat Küng
9f3043f9ca printload: store total_runtime in a separate loop
Because during the printf, the total_runtime could be changed by another
task. This is still not entirely race-free though.
2017-04-01 20:19:52 +02:00
Beat Küng
23d0355979 printload: reduce memory usage of print_load_s
assuming CONFIG_MAX_TASKS = 32, this saves 256B of RAM
2017-04-01 20:19:52 +02:00
Beat Küng
c46274043f printload: use sched_lock to protect access to tcb
what could have gone wrong before? A scheduling switch during the printload
could have led to a task exit, rendering the tcb invalid. After switching
back, printload would access invalid memory.

This keeps the sched_lock() section as small as possible, just grabbing the
tcb variables we need.
2017-04-01 20:19:52 +02:00
Daniel Agar
4b8bedef48 avoid double promotions 2017-04-01 20:19:28 +02:00
Daniel Agar
412f956636 clang-tidy enable performance-type-promotion-in-math-fn 2017-04-01 20:19:28 +02:00
Julian Oes
3c1d785d86 mavlink_mission: set INT frame correctly
Also when formatting malvink mission items from internal mission items,
the INT flag should be obeyed.
2017-04-01 20:07:55 +02:00
Julian Oes
80ce1b6dd8 mavlink_mission: support INT altitude frames
The relative altitude flag was not set correclty when waypoints are sent
using the INT protocol.
2017-04-01 20:07:55 +02:00
Henry Zhang
982fe91fa8 Commander: fix LED status bug when system is armed 2017-04-01 11:39:05 +02:00
David Sidrane
0b91fd0e20 Backport stm32f7:Serial fix for dropped data
1) Revert the inherited dma bug from the stm32
       see df9ae3c13f
       for details.

       2) Most all CR1-CR3 settings can not be configured while UE
          is true. Threfore we make all operation atomic and disable
          UE and restore it's originalstate on exit.

       N.B. This backport omits all upstream breaking changes.
2017-04-01 11:37:47 +02:00
David Sidrane
ba1de2cc0b Renamed to indicate stm32 2017-04-01 11:37:47 +02:00
David Sidrane
cd7a57ca1b fmuv5:cr2 was written to cr1 2017-04-01 11:37:47 +02:00
David Sidrane
3eada2c3df fmuv5:Using wrong Sbus Serial port 2017-04-01 11:37:47 +02:00
David Sidrane
36731e13c6 Allow levels of Sbus debugging 2017-04-01 11:37:47 +02:00
Nate Weibley
3ba3aff505 Correct MPU6/9k external detection 2017-03-31 11:04:14 +02:00
David Sidrane
eb86730dca Removed all SPEKTUM Power and Bind Control
FMUv4 PRO HW does not have a controlable V3.3 on the connector
   it therefore can not support the SPEKTUM binding.
   This PR removes the Power switch controls or binding control
   interfaces from the board config
2017-03-30 16:19:26 -10:00
David Sidrane
9f0ea7ff4f aerofc-v1 Remove GPIO_RC_OUT and vetted RC_IN wiring
Removed the legacy FMUv4 define that was activating a nonexistent
   pull up and on some HW driving the PPM_IN aka RC_IN aka SPEKTRUM_RX
   to VDD.

   Also detailed the connections of this pins for the board.

   The simplest connection is RC_IN to a timer capture pin
   and a UART.
   In this case the UART_RX pin and just be left as is.
   While the pin can be configured as the PPM_IN (Timer capture)
   or as SPEKTRUM_RX_AS_GPIO_OUTPUT to use it as and GPIO to
   facilitate binding.

  Renamed the macros and defines to be more explicit as to what
  Is being done and the sense of the parameters
2017-03-30 16:19:26 -10:00
David Sidrane
a8f76a3319 px4nucleoF767ZI-v1 Remove GPIO_RC_OUT and vetted RC_IN wiring
Removed the legacy FMUv4 define that was activating a nonexistent
   pull up and on some HW driving the PPM_IN aka RC_IN aka SPEKTRUM_RX
   to VDD.

   Also detailed the connections of this pins for the board.

   The simplest connection is RC_IN to a timer capture pin
   and a UART.
   In this case the UART_RX pin and just be left as is.
   While the pin can be configured as the PPM_IN (Timer capture)
   or as SPEKTRUM_RX_AS_GPIO_OUTPUT to use it as and GPIO to
   facilitate bindin

  Renamed the macros and defines to be more explicit as to what
  Is being done and the sense of the parameters
2017-03-30 16:19:26 -10:00
David Sidrane
3ed5cedea3 px4io-v2 Remove GPIO_RC_OUT and vetted RC_IN wiring
Removed the legacy FMUv4 define that was activating a nonexistent
   pull up and on some HW driving the PPM_IN aka RC_IN aka SPEKTRUM_RX
   to VDD.

   Also detailed the connections of this pins for the board.

   The simplest connection is RC_IN to a timer capture pin
   and a UART.
   In this case the UART_RX pin and just be left as is.
   While the pin can be configured as the PPM_IN (Timer capture)
   or as SPEKTRUM_RX_AS_GPIO_OUTPUT to use it as and GPIO to

  Renamed the macros and defines to be more explicit as to what
  Is being done and the sense of the parameters
2017-03-30 16:19:26 -10:00
David Sidrane
784abf2c19 px4io-v1 Remove GPIO_RC_OUT and vetted RC_IN wiring
Removed the legacy FMUv4 define that was activating a nonexistent
   pull up and on some HW driving the PPM_IN aka RC_IN aka SPEKTRUM_RX
   to VDD.

   Also detailed the connections of this pins for the board.

   The simplest connection is RC_IN to a timer capture pin
   and a UART.
   In this case the UART_RX pin and just be left as is.
   While the pin can be configured as the PPM_IN (Timer capture)
   or as SPEKTRUM_RX_AS_GPIO_OUTPUT to use it as and GPIO to
   facilitate binding.

  Renamed the macros and defines to be more explicit as to what
  Is being done and the sense of the parameters
2017-03-30 16:19:26 -10:00
David Sidrane
4574feaee6 px4fmu-v5 Remove GPIO_RC_OUT and vetted RC_IN wiring
Removed the legacy FMUv4 define that was activating a nonexistent
   pull up and on some HW driving the PPM_IN aka RC_IN aka SPEKTRUM_RX
   to VDD.

   Also detailed the connections of this pins for the board.

   The simplest connection is RC_IN to a timer capture pin
   and a UART.
   In this case the UART_RX pin and just be left as is.
   While the pin can be configured as the PPM_IN (Timer capture)
   or as SPEKTRUM_R
   facilitate binding.

  Renamed the macros and defines to be more explicit as to what
  Is being done and the sense of the parameters
2017-03-30 16:19:26 -10:00
David Sidrane
29dd41db1d px4fmu-v4pro Remove GPIO_RC_OUT and vetted RC_IN wiring
Removed the legacy FMUv4 define that was activating a nonexistent
   pull up and on some HW driving the PPM_IN aka RC_IN aka SPEKTRUM_RX
   to VDD.

   Also detailed the connections of this pins for the board.

   The simplest connection is RC_IN to a timer capture pin
   and a UART.
   In this case the UART_RX pin and just be left as is.
   While the pin can be configured as the PPM_IN (Timer capture)
   or as SPEKTRUM_RX_AS_GPIO_OUTPUT to use it as and GPIO to
   facilitate binding.

  Renamed the macros and defines to be more explicit as to what
  Is being done and the sense of the parameters
2017-03-30 16:19:26 -10:00
David Sidrane
a161c05dc6 px4fmu-v4 Remove GPIO_RC_OUT and vetted RC_IN wiring
Removed the legacy FMUv4 define that was activating a nonexistent
   pull up and on some HW driving the PPM_IN aka RC_IN aka SPEKTRUM_RX
   to VDD.

   Also detailed the connections of this pins for the board.

   The simplest connection is RC_IN to a timer capture pin
   and a UART.
   In this case the UART_RX pin and just be left as is.
   While the pin can be configured as the PPM_IN (Timer capture)
   or as SPEKTRUM_RX_AS_GPIO_OUTPUT to use it as and GPIO to
   facilitate binding.

  Renamed the macros and defines to be more explicit as to what
  Is being done and the sense of the parameters
2017-03-30 16:19:26 -10:00
David Sidrane
dace50c2aa mindpx-v2 Remove GPIO_RC_OUT and vetted RC_IN wiring
Removed the legacy FMUv4 define that was activating a nonexistent
   pull up and on some HW driving the PPM_IN aka RC_IN aka SPEKTRUM_RX
   to VDD.

   Also detailed the connections of this pins for the board.

   The simplest connection is RC_IN to a timer capture pin
   and a UART.
   In this case the UART_RX pin and just be left as is.
   While the pin can be configured as the PPM_IN (Timer capture)
   or as SPEKTRUM_RX_AS_GPIO_OUTPUT to use it as and GPIO to
   facilitate binding.

  Renamed the macros and defines to be more explicit as to what
  Is being done and the sense of the parameters
2017-03-30 16:19:26 -10:00
David Sidrane
78d7508800 dsm Use the abstaction SPEKTRUM_POWER to enable the interface
Use the abstaction SPEKTRUM_POWER to enable the interface not
   the define for the GPIO pin.

   Use the clearer macro definitions
2017-03-30 16:19:26 -10:00
David Sidrane
d80a322961 fmu: Remove Legacy FMUv4 and use the abstaction SPEKTRUM_POWER
Removed the legacy FMUv4 define that was activating a nonexistent
   pull up and on some HW driving the PPM_IN aka RC_IN aka SPEKTRUM_RX
   to VDD.

   Use the abstaction SPEKTRUM_POWER to enable the interface not
   the define for the GPIO pin.
2017-03-30 16:19:26 -10:00
David Sidrane
26d50d2c98 tap-v1 Remove GPIO_RC_OUT and vetted RC_IN wiring
Removed the legacy FMUv4 define that was activating a nonexistent
   pull up and on some HW driving the PPM_IN aka RC_IN aka SPEKTRUM_RX
   to VDD.

   Also detailed the connections of this pins for the board.

   The simplest connection is RC_IN to a timer capture pin
   and a UART.
   In this case the UART_RX pin and just be left as is.
   While the pin can be configured as the PPM_IN (Timer capture)
   or as SPEKTRUM_RX_AS_GPIO_OUTPUT to use it as and GPIO to
   facilitate binding.

  Renamed the macros and defines to be more explicit as to what
  Is being done and the sense of the parameters
2017-03-30 16:19:26 -10:00
Matthias Grob
5a00cb4770 MPU6000 driver: change default accelerometer range to +-16g
This range amkes much more sense for MAV applications.
It reduces vibration vulnerability caused by measurement range clipping.
2017-03-30 19:07:59 +02:00
Dennis Mannhart
419c474d53 mc_pos_control: manual input temporary yaw fix 2017-03-30 16:43:43 +02:00
Beat Küng
cb87f1ea85 unittests: handle visibility.h correctly 2017-03-29 23:02:09 +02:00
Beat Küng
74f4aecbf8 random.c: remove unused & conflicting RAND_MAX 2017-03-29 23:02:09 +02:00
Beat Küng
358bcb6ae0 visibility.h: add #pragma GCC poison getenv setenv putenv
Just to make sure that it will never be used on NuttX. This is not an
architectural limitation, just a memory optimization, since we call
clearenv() on NuttX.
2017-03-29 23:02:09 +02:00
Beat Küng
4a7e02c640 systemlib/visibility.h: remove this file
This is duplicated in src/include/visibility and is directly included via
compiler flag '-include'
2017-03-29 23:02:09 +02:00
Beat Küng
e87aa6f6c1 cmake: remove ${PX4_INCLUDE_DIR}visibility.h
This is already added in px4_base.cmake and PX4_INCLUDE_DIR is not set
either.
2017-03-29 23:02:09 +02:00
Beat Küng
d72133a380 rcS: increase log buffer by 4kB
To reduce dropouts, and because we have enough RAM :)
2017-03-29 23:02:09 +02:00
Beat Küng
be2d10ff45 px4_nuttx_tasks: call clearenv() before task_create
Frees up around 6kB of RAM on Pixracer & Pixhawk.
2017-03-29 23:02:09 +02:00