Michael Day
497c95de8e
Plane: Add support for rally points.
...
Added parameter RALLY_TOTAL.
Added handlers for new MAVLink messages RALLY_POINT and
RALLY_FETCH_POINT.
defines.h modified to make room in EEPROM to store rally points.
rally.pde added and is responsible for ensuring rally points get
stored in the correct spot in EEPROM.
Multiple Rally/RTL point support now done. If rally points have
been defined, then when RTL mode is entered, the closest Rally
point is chosend and the plane loiters at that point.
Note only 10 rally points can be defined; this is to save space in
the APM's EEPROM.
2013-10-03 12:21:08 +10:00
Randy Mackay
21360aeebf
Plane: sent current as -1 to GCS when can't be monitored
2013-10-03 11:16:33 +09:00
Randy Mackay
9722276827
Plane: batt curr and remaining should be int16
2013-10-03 11:16:26 +09:00
Randy Mackay
c64d444b5a
Plane: integrate BattMonitor
2013-10-03 11:16:08 +09:00
Kevin Hester
996eda0080
Plane: Report MAV_STATE_ACTIVE if flying, MAV_STATE_STANDBY otherwise
...
(There are also various error states MAV_STATE_CRITICAL that are unchanged
by this check in).
The is_flying() check is similar to the code in suppress_throttle, but
I wanted to make it very optimistic on thinking we are flying - which is
not what you want for set_throttle...
(AC has similar MAV_STATE_ACTIVE vs MAV_STATE_STANDBY behavior now)
2013-09-21 21:57:07 +10:00
Andrew Tridgell
bcce2e4fc5
Plane: use new Baro API
2013-09-21 21:31:03 +10:00
Andrew Tridgell
36466e91ed
Plane: run SENSOR_OFFSETS message at 1/10 of the requested rate
...
this message wastes bandwidth, as the values change very slowly
2013-09-21 09:35:45 +10:00
Andrew Tridgell
c4dcdcf5a2
Plane: only send RC_CHANNELS_SCALED in HIL
...
saves a bit of telemetry bandwidth
2013-09-21 09:30:29 +10:00
Andrew Tridgell
21a4da0d29
Plane: removed flash_leds() calls
2013-09-19 18:38:28 +10:00
Andrew Tridgell
4bd6b2f428
Plane: use new usb_connected() function
2013-09-19 16:23:58 +10:00
Andrew Tridgell
4a8c9a7765
Plane: support reboot to bootloader
2013-09-04 11:59:16 +10:00
Andrew Tridgell
a93f7c39a9
Plane: updates for new notify API
2013-08-30 13:01:35 +10:00
Andrew Tridgell
8733391315
Plane: call airspeed MAVLink logging function
2013-08-30 13:01:34 +10:00
Andrew Tridgell
364790414c
Plane: support new RADIO_STATUS msg
2013-08-24 17:59:13 +10:00
Andrew Tridgell
d4ca3ebf65
Plane: check for parameter send at default of 10Hz
...
50Hz can cause overruns, especially on PX4 which can drain the tx
buffer very rapidly
2013-08-13 13:42:25 +10:00
Andrew Tridgell
62cc84aba3
Plane: use new scheduler load_average() function
...
this also simplifies the main loop
2013-08-02 18:46:28 +10:00
Andrew Tridgell
51b9cf3e76
Plane: move failsafe variables into a structure
...
this makes the logic a bit easier to follow
2013-07-22 12:50:00 +10:00
Andrew Tridgell
ed20c4cbc8
Plane: fixed initial reporting of battery remaining
...
we were not showing battery remaining 100% until we used some battery
2013-07-14 21:59:15 +10:00
Andrew Tridgell
e79023ceee
Plane: fixed problem with slow ground station connects
...
don't trigger the "scheduler out of time" code when in the delay
callback
Thanks to Marijm Slootweg for noticing this!
2013-07-14 17:28:34 +10:00
Andrew Tridgell
113bc20f8a
Plane: added a new CRUISE flight mode
...
See
http://diydrones.com/group/apmusergroup/forum/topics/feature-request-hold-heading-mode
this fixes issue #438
2013-07-13 21:45:58 +10:00
Randy Mackay
1772a62415
Plane: fix to gps present check in mavlink extended status 1 msg
2013-07-13 10:27:39 +09:00
Andrew Tridgell
608007361b
Plane: added initial implementation of ACRO mode
...
rate based control with attitude locking
2013-07-11 09:10:41 +10:00
Andrew Tridgell
3c97fad2ec
Plane: changes for GPS field changes
2013-07-10 14:04:22 +10:00
Andrew Tridgell
7aa360b176
Plane: added relative_altitude helper functions
...
prevents some code duplication
2013-07-10 14:04:22 +10:00
Andrew Tridgell
1355b6d89d
Plane: break-up scheduling into smaller pieces
...
ensure mavlink sends don't push us over a scheduling boundary
2013-07-05 18:05:27 +10:00
Andrew Tridgell
93cd0f9a31
Plane: switch to new AP_Scheduler
...
this gives us more accurate task scheduling in ArduPlane, plus better
monitoring of task timing (via SCHED_DEBUG)
2013-06-04 13:34:58 +10:00
Andrew Tridgell
fb9bf21522
Plane: allow channel mapping of first 4 channels
...
this makes it easier to support DSM and SBUS radios
2013-06-03 16:23:48 +10:00
Andrew Tridgell
515d726ee0
Plane: use RC_Channel::rc_channel() instead of rc_ch[]
2013-06-03 16:23:48 +10:00
Andrew Tridgell
f7697574db
Plane: use the new airspeed driver interface
...
the choice of analog source is now in the airspeed driver
2013-06-03 11:51:09 +10:00
Andrew Tridgell
dd633fcf3f
Plane: make voltage and battery capacity failsafe settable at runtime
...
this also fixes issue #292
2013-05-22 20:33:57 +10:00
Randy Mackay
c7961a72fc
Plane: send_text_P bug fix for short messages
2013-05-20 12:51:16 +09:00
Andrew Tridgell
635b3fabda
Plane: fixed APM1-1280 build
2013-05-08 21:44:45 +10:00
Andrew Tridgell
81c1fd5fc4
Plane: support 3D accel calibration over MAVLink
2013-05-08 16:25:35 +10:00
Andrew Tridgell
b43712e4d2
Plane: fixed APM1-1280 build
2013-05-03 12:40:43 +10:00
Andrew Tridgell
9f0a4dd553
Plane: log GCS text messages to flash log
...
useful for seeing more complex actions
2013-05-03 11:16:50 +10:00
Andrew Tridgell
bb8f9d5443
Plane: simplify setHIL for baro
2013-05-02 15:27:02 +10:00
Andrew Tridgell
0aa38a5bd4
Plane: use new HIL compass API
2013-05-02 15:00:59 +10:00
Andrew Tridgell
5ba171af9a
Plane: fixed mavlink levelling
...
this was broken by a recent commit (after 2.72 was released)
2013-05-02 13:38:28 +10:00
Andrew Tridgell
9584aa89d9
Plane: replaced constrain() with constrain_float()
2013-05-02 10:27:10 +10:00
Andrew Tridgell
de3fcbc413
Plane: removed the MANUAL_LEVEL option
...
levelling on every startup is far too error prone. This was just
another parameter that everyone changed.
2013-04-29 14:19:53 +10:00
Andrew Tridgell
02ed37e750
Plane: fixed APM1-1280 build
2013-04-20 18:21:19 +10:00
Andrew Tridgell
3b90c6c386
Plane: log parameter changes
2013-04-20 13:52:36 +10:00
Andrew Tridgell
c8af70a18d
Plane: make the plane code compatible with the new logging system
...
not actually converted yet
2013-04-20 13:52:36 +10:00
Andrew Tridgell
82cd391cf8
Plane: use RADIUS_OF_EARTH define
2013-04-15 14:55:58 +10:00
Andrew Tridgell
994d8e354a
Plane: allow for negative WP_LOITER_RAD for conter-clockwise loiter
...
this follows the same convention as missions
2013-04-15 10:52:32 +10:00
Andrew Tridgell
575f346e85
Plane: removed HIL_MODE_ATTITUDE
...
we really need full sensors for HIL with the L1 controller. The flight
is also _much_ better with sensors HIL.
2013-04-12 17:44:40 +10:00
Andrew Tridgell
11eb0cfce1
Plane: update for new AP_Navigation controller class
...
this switches ArduPlane over to use the L1 navigation controller, via
a generic nav_controller object pointer.
Note that the nav_controller controls all types of navigation now,
including level flight and heading hold. This provides a cleaner
abstraction than the old method of special case navigation handling
Pair-Programmed-With: Paul Riseborough <p_riseborough@live.com.au>
2013-04-12 12:48:09 +10:00
Randy Mackay
21a51c8333
Plane: update GCS_Mavlink parameter documentation
2013-04-03 22:58:25 +09:00
Andrew Tridgell
ddfcafe80f
Plane: fixed DIGICAM camera trigger
2013-04-02 13:08:38 +11:00
Andrew Tridgell
2506c216dd
Plane: added a second type of stick mixing
...
this changes STICK_MIXING from a boolean to a tri-state. With
STICK_MIXING=1 it now uses FBW style mixing. With STICK_MIXING=2 it
uses the old style of direct stick mixing.
2013-04-02 08:52:56 +11:00
Andrew Tridgell
dfb14d760b
Plane: added HIL_SERVOS option
...
this allows for real servo output in HIL
2013-03-30 14:38:43 +11:00
Andrew Tridgell
6cc4aadc06
Plane: report compass health in SYS_STATUS
2013-03-29 13:48:40 +11:00
Randy Mackay
c2055557f5
Plane: add support for GPS fix type 2D
2013-03-27 11:41:51 +09:00
Andrew Tridgell
1d983b3f2e
Plane: fixed X accel triggering of auto
2013-03-22 11:53:45 +11:00
Andrew Tridgell
6948e0c473
Plane: only enter CLI is link is idle when 3 enters are hit
...
this will prevent binary contents of RADIO packets being interpreted
as CLI enter line-feeds
2013-03-21 21:57:54 +11:00
Andrew Tridgell
0e37ae4400
Plane: change CLI timeout to 20s
2013-03-21 17:34:34 +11:00
Andrew Tridgell
36ff950b12
Plane: fixed MAVLink target IDs in fence point message
...
thanks to Kevin Hester for finding this
2013-03-12 15:04:48 +11:00
Andrew Tridgell
24826c0c74
Plane: default the stream rates to 1Hz
2013-02-20 10:08:49 +11:00
Andrew Tridgell
1007f2ef07
Plane: fixed a bug with setting stream rates
...
this is what caused the "no sensors" problem in the 2.69 release
2013-02-20 09:32:01 +11:00
Michael Oborne
88840eb759
Send FS state to gcs for AP
2013-02-09 10:11:26 +08:00
Jochen Tuchbreiter
c5f19f5df8
Plane: Implement issue 80: counterclockwise loiter
...
- libraries/AP_Common/AP_Common.h: Use bit 2 of Location.options to store
loiter direction
- ArduPlane/defines.h: New bitmask MASK_OPTIONS_LOITER_DIRECTION for struct
Location bit 2
- ArduPlane/ArduPlane.pde: New variable loiter_direction
- ArduPlane/GCS_Mavlink.pde: For mavlink loiter-commands use sign of param3 to
detemine direction. Set Location.option flag accordingly
- ArduPlane/commands.pde: Make sure loiter-directions get saved into EEPROM
correctly
- ArduPlane/commands_logic.pde: Set loiter_direction on all loiter-actions
as well as RTL/instant loiter
- ArduPlane/navigation.pde: Yield loiter_direction in update_loiter
2013-02-05 10:29:31 +11:00
Andrew Tridgell
e762c43312
Plane: switch to an array for stream rates
...
this saves a couple of hundred bytes of flash.
2013-02-05 08:20:41 +11:00
Pat Hickey
85d783d5a9
ArduPlane: fixed memory unsafe member access in GCS_MAVLINK
2013-02-02 22:43:59 -08:00
Andrew Tridgell
7ab3d93ed4
Plane: fixed typo
2013-01-23 10:06:22 +11:00
Andrew Tridgell
49356b790b
Plane: limit number of bytes read per GCS check
2013-01-23 09:35:06 +11:00
Andrew Tridgell
9813468640
Plane: fixed mavlink fetch of 16 character parameter
2013-01-21 16:52:08 +11:00
James Bielman
5631f865b2
Update floating point calculations to use floats instead of doubles.
...
- Allows use of hardware floating point on the Cortex-M4.
- Added "f" suffix to floating point literals.
- Call floating point versions of stdlib math functions.
2013-01-16 13:52:01 +11:00
Andrew Tridgell
e0f052dd9a
Plane: update for new AP_Param API
2013-01-09 13:30:55 +11:00
Andrew Tridgell
2e2f96d721
Plane: cope with a HIL_STATE packet before GPS init
2013-01-04 12:47:08 +11:00
Andrew Tridgell
4cdb3cd390
Plane: use GRAVITY_MSS
2013-01-02 14:45:08 +11:00
Andrew Tridgell
b6295c12e1
Plane: fixes for new AP_Relay interface
2013-01-02 10:18:45 +11:00
Andrew Tridgell
edad43611d
Plane: reset last heartbeat time on startup completion
...
this gives more time for the GCS to send its first heartbeat
2012-12-26 08:46:36 +11:00
Andrew Tridgell
d54c6989ab
Plane: fixed the last build warnings
...
we now build with no warnings for APM1, APM2 and SITL. Yay!
2012-12-20 22:46:48 +11:00
Andrew Tridgell
feca411943
Plane: added new TRAINING mode
...
this mode gives manual control when the roll or pitch is within the
set limits (the same limits as FBW mode), and prevents the pilot from
flying beyond those limits, essentially a "attitude limited manual"
mode
2012-12-20 22:41:58 +11:00
Andrew Tridgell
cf18534163
Plane: use new functions
2012-12-20 14:53:22 +11:00
Pat Hickey
2ad4fed8cd
Rover/Copter/Plane: change from vsnprintf to vsnprintf_P
2012-12-20 14:52:38 +11:00
Pat Hickey
edb076a6c5
ArduPlane: use hal's vsnprintf
2012-12-20 14:52:38 +11:00
Andrew Tridgell
4913aff8cd
Plane: remove unused send_text() function
2012-12-20 14:52:35 +11:00
Andrew Tridgell
c20481dc94
Plane: SITL has a I2C driver now
2012-12-20 14:52:34 +11:00
Andrew Tridgell
678947c65d
Plane: more fixes for SITL and new AP_Param startup
2012-12-20 14:52:29 +11:00
Andrew Tridgell
7046fc05e2
Plane: change to send_text_P() for progmem strings
2012-12-20 14:51:39 +11:00
Pat Hickey
92b0c302f2
ArduPlane: Ported to AP_HAL
2012-12-20 14:51:36 +11:00
Andrew Tridgell
805a340350
Plane: enable attitude and raw logging in HIL modes
2012-12-04 11:13:33 +11:00
Andrew Tridgell
24e1af1c82
Plane: fixed sensors and attitude HIL
...
we now use the Stub version of the InertialSensor driver. In sensors
HIL we can now correctly drive the AHRS code.
2012-12-03 23:26:39 +11:00
Andrew Tridgell
53951f995a
Plane: fixed GPS course in HIL
2012-12-03 17:38:55 +11:00
Andrew Tridgell
567cb47d35
Plane: fixed SERVO_OUTPUT_RAW for HIL
2012-12-03 17:38:31 +11:00
Andrew Tridgell
1104287aa2
Plane: use enum FlightMode in more places
2012-12-01 08:15:48 +11:00
Andrew Tridgell
f5abc2c25e
Plane: switch to an enum for flight modes
2012-12-01 08:08:54 +11:00
Andrew Tridgell
56e4cbfb1d
Plane: allow reboot on APM1, and add reboot to main CLI menu
2012-11-24 18:20:37 +11:00
Andrew Tridgell
84300c85d6
APM: make it possible to run the CLI on any serial port
2012-11-21 21:41:34 +11:00
Andrew Tridgell
704da2a5d9
MAVLink: make it possible to enter the CLI over the radio
...
this only works on the APM2, where UART0 is also the radio port
2012-11-21 14:11:05 +11:00
Andrew Tridgell
a600ccece5
APM: support 16 character parameter names
2012-11-20 21:36:13 +11:00
Andrew Tridgell
69fbcc8683
MAVLink: fixed accel and gyro sensor offsets in MAVLink
2012-11-20 18:32:26 +11:00
Andrew Tridgell
f80783665f
APM: fixed throttle display to always be between 0 and 100
...
when rc3 is below RC3_MIN, don't give an invalid value
2012-11-20 13:50:19 +11:00
Andrew Tridgell
8d1905a40b
APM: change WIND direction to match convention
...
Thanks to Leo Hogg for pointing this out
2012-11-19 07:16:47 +11:00
Andrew Tridgell
531e62d3b5
MAVLink: improve usefulness of logged GPS velocities
...
we need them to align with time to use them for accelerations
2012-11-17 17:45:30 +11:00
rmackay9
cdfd3f9ccc
ArduCopter, ArduPlane: rename ap variable in GCS_Mavlink.pde to resolve compiler warning re shadowing of variable 'ap'
...
Changed ArduPlane to keep function consistent with ArduCopter
2012-11-12 13:30:04 +09:00
Andrew Tridgell
fddfb0b1a3
MAVLink: update compass health in SYS_STATUS
...
this will make it easier to tell if a I2C error occurred in flight
2012-11-12 11:26:54 +11:00
rmackay9
ef727bbb3c
ArduPlane: move to use new INS library instead of IMU library
2012-11-07 19:21:03 +09:00
Andrew Tridgell
9c140356f5
APM: remove unused variable
2012-11-05 15:22:56 +11:00