Commit Graph

327 Commits

Author SHA1 Message Date
Julian Oes af5d2c488c st24: fix RC lost detection based on error count
The packet_count was actually an error_count, therefore we should
process RC input only when the error_count since the last packet is 0.

Also, this commit fixes the RSSI scaling for st24.
2016-10-19 09:22:57 +02:00
Roman c2a511d81d multirotor mixer slew rate limiting: naming and fixes
- avoid dividing by zero when calculating max delta output
- better comments when calculating max delta output
- better naming of functions and variables

Signed-off-by: Roman <bapstroman@gmail.com>
2016-09-30 13:55:53 +02:00
Roman 2607769470 slew rate limiting: moved logic to multirotor mixer
Signed-off-by: Roman <bapstroman@gmail.com>
2016-09-30 13:55:53 +02:00
Roman 66ddea01d1 implemented slew-rate 2016-09-30 13:55:53 +02:00
Carlo Wood 77d356d275 Target specific optimization control.
This allows one to set a semi-colon separated list of regular
expressions in the environment variable PX4_NO_OPTIMIZATION
to control which (cmake generated) targets should be compiled
without optimization.

Suppressing optimization can be necessary for debugging in
a debugger, especially when trying to step through the code
or needing to print variables that otherwise are optimized out.

EXAMPLE

export PX4_NO_OPTIMIZATION="px4;^modules__uORB;^modules__systemlib$"

will result in the following messages during cmake configuration:

[...]
-- Disabling optimization for target 'platforms__posix__px4_layer'
because it matches the regexp 'px4' in env var PX4_NO_OPTIMIZATION
-- Disabling optimization for target 'modules__systemlib' because it
matches the regexp '^modules__systemlib$' in env var PX4_NO_OPTIMIZATION
-- Disabling optimization for target 'modules__uORB' because it matches
the regexp '^modules__uORB' in env var PX4_NO_OPTIMIZATION
-- Disabling optimization for target 'examples__px4_simple_app' because
it matches the regexp 'px4' in env var PX4_NO_OPTIMIZATION
-- Disabling optimization for target 'modules__uORB__uORB_tests' because
it matches the regexp '^modules__uORB' in env var PX4_NO_OPTIMIZATION
-- Disabling optimization for target 'px4' because it matches the regexp
'px4' in env var PX4_NO_OPTIMIZATION

Note that a list of all (currently used) target names can be printed
with the following command line from within the required build directory:

find . -wholename '*/CMakeFiles/*.dir/flags.make' | xargs dirname | xargs basename -a | sort -u | sed -e 's/.dir$//'
2016-09-13 16:31:08 +02:00
James Goppert 818840b576 Path cleanup, low impact changes (#5340)
* Low impact changes from path_cleanup branch.

This is a step towards minimizing the diff with path_cleanup branch.

* Update ecl.

* Revert matrix update.

* Revert ecl and matrix.

* Update sitl gazebo.

* Revert sitl_gazebo and matrix changes.
2016-08-18 15:37:23 -04:00
Lorenz Meier 102f5b54d7 Revert "Improvements to SITL to make paths more flexible. (#5181)"
This reverts commit 699b6a2cb3.
2016-08-05 21:29:49 +02:00
James Goppert 699b6a2cb3 Improvements to SITL to make paths more flexible. (#5181) 2016-08-05 06:23:59 -04:00
Julian Oes 78a9472b25 px4iofirmware: astyle 2016-07-29 12:46:17 +02:00
Julian Oes dcb7c0e4c2 px4iofirmware: correct newline 2016-07-29 12:46:17 +02:00
Julian Oes 79a1b84b09 px4iofirmware: clean up override decision
The override checking was scattered across two places and is now unified
in controls_tick(). The part in mixer_tick only decides which mixer (or
none) to use give the override flag.
2016-07-29 12:46:17 +02:00
Julian Oes ec035b7268 px4iofirmware: no override in multirotor mode
This fixes a bug where multirotors got into override mode when the FMU
is dead/not responding.
The main bug was that the check was for FMU_OK || MANUAL_OVERRIDE_OK
in order to get further in the override checks.

Also a mixer_tick was called inside the controls_tick even though these
are called in px4io.c after each other anyway.
2016-07-29 12:46:17 +02:00
Julian Oes 57b3bbf657 px4iofirmware: don't set FMU_OK flags immediately
The FMU_OK flags are later checked anyway based on
system_state.fmu_data_received_time.
2016-07-29 12:46:17 +02:00
Julian Oes 31d5c59ab7 px4iofirmware: remove unused define 2016-07-29 12:46:17 +02:00
Andreas Antener af8cd3f880 correctly scale and trim outputs in IO 2016-07-13 09:29:13 +02:00
Roman 08bbd6dbfa px4iofirmware: added scale parameters for roll, pitch and yaw
since pure manual control for fixed wings in handled on the io side
the scale parameters for roll, pitch and yaw had to be introduced there
as well.

Signed-off-by: Roman <bapstr@ethz.ch>
2016-07-13 09:29:12 +02:00
Lucas De Marchi 18330f7ab7 Move __STDC_FORMAT_MACROS to build system
__STDC_FORMAT_MACROS changes the behavior of inttypes.h to allow
defining format macros for printf-like functions. It needs to be defined
before any include is done, otherwise due to include chains and header
guards it may not take effect.

Instead of having to define it everywhere it is used, move the define to the
build system. Also update ecl and DriverFramework submodules to deal with the
changed definitions.
2016-07-10 16:31:36 +02:00
Lorenz Meier 7398164fcc Updated PX4 use / API of low level GPIO and other hardware-centric system facilities 2016-05-28 14:56:17 +02:00
Andrew Tridgell 3f6f030fc4 px4iofirmware: allow override when RAW_PWM is active
if override is enabled then it should apply even if RAW_PWM is being
supplied by the FMU
2016-05-22 13:20:44 +02:00
Andrew Tridgell 9daf6c336b px4iofirmware: removed unused PX4IO_P_CONFIG_CONTROL_GROUP_COUNT 2016-04-18 18:44:05 +02:00
Andrew Tridgell fde635ef5a px4iofirmware: fixed display of sbus rate in px4io status 2016-04-18 11:43:24 +02:00
Andrew Tridgell f19761d278 px4iofirmware: support setting the SBUS output frame rate
this allows for helicopters and multicopters with SBUS output
2016-04-18 11:43:24 +02:00
Jonathan Challinger d5dfb17f0d px4iofirmware: return failure when FORCE_SAFETY_OFF fails 2016-04-17 21:38:16 +02:00
Andrew Tridgell 943e6ffbc9 px4iofirmware: blink blue LED more rapidly when override is active
this makes it easier for a user to test that override is working
correctly in pre-flight checks. Otherwise override is hard to
distinguish from normal manual mode
2016-04-17 19:10:23 +02:00
Lorenz Meier 2fa1673ee0 Make 800 bytes space on IO. From @tridge. 2016-03-24 10:40:29 +01:00
Andreas Antener a1f4ab21bf fixed code style 2016-03-20 14:48:47 +01:00
Andreas Antener 6782bdaf69 prevent alternate flight control group (1) throttle from being active when safety is disabled 2016-03-20 11:19:23 +01:00
Lorenz Meier daeb4a24f3 Fix code style 2016-02-23 13:17:30 +01:00
Lorenz Meier 168f955e0c IO firmware: Ensure that in case of lockdown only the lockdown code writes servo outputs 2016-02-23 13:09:06 +01:00
Lorenz Meier 59c30a4cbf IO firmware: Output a disarmed pulse on lockdown 2016-02-23 13:09:06 +01:00
Lorenz Meier c26b18c153 IO: Initialize PWM pins first 2016-02-18 19:01:44 +01:00
David Sidrane 2949578832 Renamed pwm_timers to more appropriate io timers for use in pwm in/out and capture 2016-02-01 10:10:34 +01:00
Lorenz Meier f2af8a5a5d IO Firmware: Reduce unnecessary buffer space 2016-01-27 09:56:20 +01:00
Lorenz Meier 49f7df5724 IO firmware decode style 2015-12-24 09:47:29 +01:00
Lorenz Meier 7005b18a66 IO: Cleanup DSM input routine 2015-12-24 09:47:29 +01:00
Lorenz Meier 494bccb618 IO: Remove define now part of board config 2015-12-24 09:47:29 +01:00
Lorenz Meier 48bbe8f6ba IO Firmware: Default override behavior to immediate override 2015-12-11 09:28:36 +01:00
Lorenz Meier 47ff8b6bc9 IO Firmware: Let pilot take control if FMU is down 2015-12-11 09:28:36 +01:00
Lorenz Meier 6bc6eda295 Fixed drivers 2015-11-28 09:13:15 +01:00
Lorenz Meier 10a3954232 IO firmware: Depend on external RC lib 2015-11-28 09:13:15 +01:00
Lorenz Meier ba4fdf197e Move S.BUS and DSM decoders into RC lib 2015-11-28 09:13:15 +01:00
Lorenz Meier 083dbbb71b IO firmware: Do mixer load as block operation 2015-11-06 10:24:10 +01:00
jgoppert 8536722861 Firmware rename for px4io to avoid using board label in name. 2015-10-20 13:44:17 -04:00
Lorenz Meier 948ff80b80 IO firmware: Fix code style 2015-10-19 13:46:32 +02:00
Lorenz Meier fa5071b3c5 Remove module.mk files to prevent confusion of adopters upgrading 2015-10-06 11:23:20 +02:00
Lorenz Meier c8e75c98b0 IO configs: Use same filenames for all versions 2015-10-03 17:27:13 +02:00
James Goppert 2a60ffd554 Added stdc_format_macros for all inttypes.h includes. 2015-09-24 17:44:27 -04:00
James Goppert 7b6dff7cdc Fix for romfs generation. 2015-09-19 17:57:54 -04:00
James Goppert cd98cfe555 cmake: ROMFS build overhaul. 2015-09-19 13:44:02 -04:00
James Goppert 7be3afe249 Fixed firmware name. 2015-09-19 12:13:17 -04:00