Lucas De Marchi
2c38e31c93
Remove use of PSTR
...
The PSTR is already define as a NOP for all supported platforms. It's
only needed for AVR so here we remove all the uses throughout the
codebase.
This was automated with a simple python script so it also converts
places which spans to multiple lines, removing the matching parentheses.
AVR-specific places were not changed.
9 years ago
Andrew Tridgell
d43d070e75
Plane: ensure throttle reverse is obeyed in all states
...
need to use radio_max for failsafe if reversed
10 years ago
Andrew Tridgell
16d06ef0a9
Plane: set throttle trim to min on startup
...
this prevents possibly motor startup for bad RC3_TRIM values
10 years ago
Andrew Tridgell
58fa38cc12
Plane: allow rudder disarm based on ARMING_RUDDER parameter
10 years ago
pepevalbe
da41d85433
Plane: It is possible to disarm with left rudder.
...
Using is_flying() avoid accidentally disarming while flying.
10 years ago
Andrew Tridgell
b92c2409e4
Plane: added local millis() and micros() to reduce code size a bit
10 years ago
Andrew Tridgell
18c37935c9
Plane: convert from .pde to .cpp files
10 years ago
Andrew Tridgell
664c92fb81
Plane: fixed RUDDER_ONLY to not combine direct rudder output
...
this prevents us over-rolling in FBWA
10 years ago
Andrew Tridgell
edec706c12
Plane: added RUDDER_ONLY parameter
...
this gives much easier setup for rudder only aircraft.
10 years ago
Andrew Tridgell
18b277a9d2
Plane: use arm_motors() and disarm_motors()
10 years ago
Andrew Tridgell
64dfc68784
Plane: log mode on arming
...
this ensures the log is recorded with the right flight mode
10 years ago
Andrew Tridgell
059c3769f3
Plane: cope with the changed semantics if airspeed.use()
10 years ago
Grant Morphett
e122c0961e
Plane: Arming updated to use RC channel objects not RC channels directly
...
The code had g.rc_3.control_in which would bypass the channel mapping and meant
arming could only occur if the throttle was always mapped to channel 3.
Updated to use the channel mapping object.
10 years ago
Andrew Tridgell
2f0bc1f202
Plane: setup pwm esc scaling
10 years ago
Evan Slatyer
c4093b159f
ArduPlane failsafes: remove rc_override_active
...
- rc_override_active is never set anywhere in the ArduPlane code; it's only used for Copter and Rover. Removing it significantly simplifies the failsafe code.
- modified code has been tested in SITL. Heartbeat and RC failures in AUTO, CRUISE, and RTL modes (covering the three cases in the failsafe check functions) have been simulated with FS_LONG_ACTN = 0, 1, and 2, FS_SHORT_ACTN = 0, 1, and 2, and FS_GCS_ENABL = 0, 1, and 2. In all cases the results are identical to those with the original code.
10 years ago
Andrew Tridgell
41100a13c3
Plane: setup failsafe trim values for if FMU firmware dies
11 years ago
Andrew Tridgell
aabcc2bb35
Plane: fixed a bug in PWM based throttle failsafe
...
many thanks to Sam Tabor for finding this bug!
11 years ago
Andrew Tridgell
3c33eb3f09
Plane: use new channel output API
11 years ago
Andrew Tridgell
ff70c87f0b
Plane: support 14 RC channels on PX4
11 years ago
Andrew Tridgell
09ed8d5819
Plane: updates for new RCInput API
11 years ago
Andrew Tridgell
3a3397d926
Plane: fixup throttle trim on failsafe
11 years ago
Andrew Tridgell
c9ebd6a175
Plane: improved RC failsafe handling
...
this forces all primary control inputs to the trim value on loss of RC
input, and reduces the timeout for loss of RC input to 1 second from 2
11 years ago
Andrew Tridgell
04f2c07b2b
Plane: use new RC_Channels API
11 years ago
Andrew Tridgell
30a210cfa6
Plane: setup PWM to be used on throttle when safety is safe on PX4
11 years ago
Andrew Tridgell
89366a1ee1
Plane: fixed ARMING_REQUIRED=2 on APM2 to disable rc output on throttle
11 years ago
Andrew Tridgell
a4af83d454
Plane: only allow right rudder for arming
...
copter users may try to use left rudder to ensure aircraft is
disarmed. Making left rudder arm could be dangerous
11 years ago
Andrew Tridgell
77c6e51887
Plane: allow throttle failsafe on no RC input
...
on PX4 we just stop getting input on loss of RC - we need to consider
this to be "throttle failsafe"
11 years ago
Andrew Tridgell
3508a14542
Plane: small arming tidyups
11 years ago
Michael Day
b0a0316dd6
Plane: Now using AP_Arming library.
11 years ago
Andrew Tridgell
56f574684d
Plane: fixed throttle failsafe with reversed throttle
11 years ago
Andrew Tridgell
035ac3800a
Plane: use G_Dt for acro angle integration
...
also cleanup some other uses of performance timing
11 years ago
Andrew Tridgell
8a76d82de4
Plane: set failsafe_radio AP_Notify bits
12 years ago
Andrew Tridgell
43ffe91546
Plane: added FS_ACTION of 2 for glide
...
this allows people without specified settings in their receiver for
failsafe to choose FBWA zero throttle glide on throttle failsafe. That
can be a better choice when flying at a R/C club field
12 years ago
Andrew Tridgell
233b033e8c
Plane: removed old speed/altitude control algorithms
...
Use TECS only. This makes the code a lot simpler and easier to
properly document
12 years ago
Andrew Tridgell
51b9cf3e76
Plane: move failsafe variables into a structure
...
this makes the logic a bit easier to follow
12 years ago
Andrew Tridgell
608345415b
Plane: pass aircraft parameters to attitude controllers
...
also cope with rename of airspeed min/max variables
Pair-Programmed-With: Paul Riseborough <p_riseborough@live.com.au>
12 years ago
Andrew Tridgell
3ba713352f
Plane: use update_aux() for setting up extra channels
12 years ago
Andrew Tridgell
399970e76f
Plane: fixed default deadzone for the throttle channel
...
this is the 2nd half of the fix for issue #303
12 years ago
Randy Mackay
9df93881fb
Plane: set_dead_zone renamed to set_default_dead_zone
...
Change in use of parameter means value passed in should be 1/2 what it
was previously
12 years ago
Andrew Tridgell
f300df5fd1
Plane: added FS_LONG_TIMEOUT and FS_SHORT_TIMEOUT parameters
...
this is to address the issue raised here:
http://diydrones.com/forum/topics/ardupilot-circle-mode
12 years ago
Andrew Tridgell
a5bda3ffef
Plane: changed to using a "aircraft parameters" structure
...
this structure can be passed to libraries to give them easy access to
critical user parameters
12 years ago
Andrew Tridgell
056e0ca40d
Plane: APM2 doesn't have channel 9 PWM output
12 years ago
Andrew Tridgell
6bac13f9e2
Plane: fixed RCMAP_* to fix channel ranges for no-reboot changes
12 years ago
Andrew Tridgell
4c9bc30f58
Plane: make it possible to change control channel ordering without reboot
...
this makes configuration a bit easier
12 years ago
Andrew Tridgell
a1f64d606a
Plane: fixed remaining places where primary channel ordering was assumed
...
should now use rcmap for all inputs
12 years ago
Andrew Tridgell
fb9bf21522
Plane: allow channel mapping of first 4 channels
...
this makes it easier to support DSM and SBUS radios
12 years ago
Andrew Tridgell
515d726ee0
Plane: use RC_Channel::rc_channel() instead of rc_ch[]
12 years ago
Andrew Tridgell
0b8c2da4df
Plane: support 12 output channels on PX4
12 years ago
Andrew Tridgell
8f091e70c8
Plane: move elevon variables into a structure
12 years ago
Andrew Tridgell
c47bc09a3c
Plane: avoid doing radio trim if less than 20% of travel available
...
this prevents problems with awful trim on bootup due to RC TX being
off
12 years ago