Commit Graph
74 Commits
Author SHA1 Message Date
Lorenz Meier 3d2d6c4fdc IO: Add lazy atomic OR, AND and CLEAR functions for flags
IO needs atomic updates of a few critical status flags, but doing these always atomic (with interrupts disabled) might cause a too high interrupts disabled interval. In order to avoid this only operations that change the state of the target variable are done with interrupts disabled, while operations without an effect on the target variable are not executed.
2017-05-04 07:46:57 +02:00
Werner Stern dc6b688a6a fixed px4io firmware read-modify-write bug 2017-05-04 07:46:57 +02:00
Benoit3 83e9e1c382 The goal of this patch is to allow compatibility with GR12/GR16/GR24 graupner receiver by :
- allowing decoding of SUMD frame with failsafe bit set
- updating stack failsafe state with the sumd failsafe info

Refer to #5817 issue
2016-11-12 14:28:57 +01:00
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
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 31d5c59ab7 px4iofirmware: remove unused define 2016-07-29 12:46:17 +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
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 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 c9fefe236b Merged release into master 2015-06-13 11:06:01 +02:00
Lorenz Meier 0c0500f8da IO Firmware: Do not build ADC code if there is no ADC input for RSSI 2015-06-04 19:08:28 +02:00
Lorenz Meier 75ad5875cb Low-pass analog RSSI stronger 2015-06-04 18:45:45 +02:00
Lorenz Meier 9a16d9ebfa IO Firmware: Code style fix, fix RSSI ADC lowpass 2015-06-04 18:44:05 +02:00
Mark Charlebois f63ab3d5e3 Merge branch 'master' into linux
Signed-off-by: Mark Charlebois <charlebm@gmail.com>

Conflicts:
	makefiles/firmware.mk
2015-04-22 10:38:46 -07:00
Lorenz Meier 09ae879b82 RC input: Replace magic numbers with better numbers, cap output to 0-100 2015-04-21 17:46:21 +02:00
Lorenz Meier 4440c6383c IO RSSI handling: Make 0-RSSI value consistent for all input sources 2015-04-21 10:48:40 +02:00
Lorenz Meier 027919302d IO RSSI handling: Fix RSSI for all protocols. 2015-04-21 10:40:42 +02:00
Mark Charlebois 9758112e31 Use px4_config.h instead of nuttx/config.h
Modified code to use OS independent header file for config settings.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 10:55:41 -07:00
NosDE 04f4206371 Graupner HoTT SUMD/SUMH Receiver Protocol added 2015-03-07 11:39:00 +01:00
Lorenz Meier a9c8f2331b IO firmware: Make error checking more obvious 2015-01-21 08:58:47 +01:00
Lorenz Meier 4a66b29e55 Merge pull request #1420 from PX4/rctype
Encode RC type in RSSI field for GCS
2014-11-17 00:03:31 +01:00
Don Gagne 852fa61173 Correct setting of DSM and ST24 flags 2014-11-16 14:12:58 -08:00
Andrew Tridgell ba81125453 px4io: added OVERRIDE_IMMEDIATE arming flag
this allows the flight code to choose whether FMU failure gives
immediate manual pilot control, or waits for the mode switch to go
past the override threshold
2014-11-16 21:02:14 +01:00
Don Gagne d907b030ee Initialize RSSI so it doesn't remain uninitialized
Spektrum doesn’t support rssi so it is not set by st24_decode.
2014-11-05 13:15:52 -08:00
Lorenz Meier f490331632 Enable flaps, avoid mode switch position 2014-10-16 22:57:27 +02:00
Lorenz Meier 0d917576d4 Enable flaps in manual override 2014-10-15 22:19:06 +02:00
Lorenz Meier 7bb9b3efa7 IO firmware hot fix: Use right pointer type for RSSI value. 2014-10-09 09:27:25 +02:00
Lorenz Meier 6436db1a99 Fix parser return type handling 2014-10-07 22:24:32 +02:00
Lorenz Meier 35caa8bd99 PX4IO Controls: compile fixes 2014-10-07 09:28:36 +02:00
Lorenz Meier c2687a7774 ST24 integration in IO firmware 2014-10-07 08:05:45 +02:00
Lorenz Meier 69109b6227 Compile and link ST24 parser in IO firmware 2014-09-01 00:45:41 +02:00
Lorenz Meier 93dcd90404 Merge pull request #919 from TickTock-/hotfix_override_threshold
Changed low threshold in px4io firmware to 10%...
2014-07-03 12:31:51 +02:00
Lorenz Meier 97fb361ea9 Set an RC status flag so that we can read out the RC status in parallel to the RC data 2014-05-14 08:00:00 +02:00
TickTock- 559c62b6bc Changed low threshold in px4io firmware to 10% to ensure compatibility with user configured single channel, mode switches 2014-05-09 15:17:38 -07:00
Lorenz Meier 1eb0b19409 Merged minimal S.BUS failsafe changes 2014-04-05 11:14:19 +02:00
Lorenz Meier 3e4841b6fe px4io: Guard against the RC failsafe value of channel 5 causing a manual override action if set to manual in failsafe 2014-04-05 11:10:41 +02:00
Lorenz Meier 09d1064327 px4io: Remove unused variable 2014-04-05 11:06:07 +02:00
Holger Steinhaus 745ef4f485 px4io: do not include failsafe condition into rc_lost flag 2014-04-05 11:05:17 +02:00
Lorenz Meier 9a0b2b7610 Make throttle failsafe depend on the failsafe threshold parameter. Make the parameter optional (no harm if not found). 2014-04-05 11:02:22 +02:00
Lorenz Meier c6d98a32f8 Proper failsafe handling onboard, including throttle failsafe condition if enabled 2014-04-05 10:27:43 +02:00
Holger Steinhaus 409fa565f4 px4io: do not include failsafe condition into rc_lost flag 2014-03-25 17:12:27 +01:00
Lorenz Meier 0393b2aa12 Build fix for IO control input parsing. 2014-01-26 16:01:39 +01:00
Lorenz Meier 00a3270dc6 Differentiate between failsafe having kicked in (which stops the normal output mixing based on RC outputs and prevents unwanted control commands due to failsafe) and a true loss of the receiver, where we stop outputting RC channel readings downstream on FMU. 2014-01-26 15:52:51 +01:00
Lorenz Meier 16eb68f2e9 Allow the setup flags to control the S.BUS / RSSI port instead of doing some wild, likely incorrect, guesses. 2014-01-26 14:13:57 +01:00
Lorenz Meier 57d38bc8ce Clean up RC related metadata, put everything into the RC data page. This ensures atomic reads, makes the reads more efficient and allows for some headroom for more RC flags. The IO driver side is updated as well, however, these flags are not published yet. 2014-01-26 00:17:26 +01:00