Commit Graph

116 Commits

Author SHA1 Message Date
Andrew Tridgell
569cc1c108 Plane: support the LED_CONTROL MAVLink message 2016-07-19 13:37:14 +10:00
Allan Matthew
c479fcab39 Plane: support GPS_INPUT mavlink message 2016-07-12 15:35:09 +09:00
Andrew Tridgell
e8976d3a89 Plane: check for optflow enable in more places 2016-07-12 09:05:52 +10:00
Tom Pittenger
0597dbd033 Plane: allow SET_ATTITUDE_TARGET to set rpy and throttle 2016-07-01 08:28:53 -07:00
Tom Pittenger
85afd9e245 Plane: remove guided roll flag, handle it with timer=0 2016-06-30 07:48:37 -07:00
Michael Day
8ac433f991 Plane: Can now command roll from a companion computer. 2016-06-30 10:27:44 -04:00
Tom Pittenger
9b973fb899 Plane: add ADSB_streamrate 2016-06-19 11:24:31 -07:00
Tom Pittenger
204abfd45e Plane: set heartbeat.system_status to Critical for low-battery failsafe events 2016-06-07 17:14:51 -07:00
Tom Pittenger
3140ce6ab6 Plane: change MAVLINK_MSG_ID_SET_POSITION_TARGET_GLOBAL_INT gcs msg to remove abbreviations. Hope it fits! 2016-06-07 08:28:35 -07:00
Tom Pittenger
bd270720da Plane: whitespace formatting 2016-06-07 08:27:40 -07:00
Michael Day
429e348824 Plane: Can now change current WP alt via mavlink.
Uses the mavlink msg SET_POSITION_TARGET_GLOBAL_INT
2016-06-07 08:16:39 -07:00
Tom Pittenger
01e636065d Plane: non-functional: mostly whitespace and removed extra set result statement 2016-06-07 08:11:05 -07:00
Michael Day
2c0f0a04d8 Plane: Only allow speed changes in GUIDED and AUTO modes. 2016-06-07 08:22:44 -04:00
Andrew Tridgell
eae2bf54ca Plane: fixed gcc 6.1 build error 2016-06-06 07:43:45 +10:00
Peter Barker
ee5290c178 Plane: avoid switch statement for enabling fence if no fence present 2016-06-02 14:37:21 +10:00
Tom Pittenger
954c987075 Plane: do not parse GEOFENCE packets when geofence is disabled via compile option 2016-06-01 17:38:52 -07:00
Tom Pittenger
ea9e39212f Plane: use new check_latlng helper 2016-06-01 17:38:51 -07:00
Peter Barker
28361afc2a Plane: move telemetry_delayed up into base class 2016-05-31 08:46:09 +10:00
Peter Barker
9ee62aac30 Plane: move adjust_rate_for_stream up 2016-05-29 19:38:50 +10:00
Peter Barker
af5a52e2aa Plane: subclass GCS_MAVLink in place of defining its functions for it 2016-05-29 16:21:21 +10:00
Andrew Tridgell
6e4c0dd3d7 Plane: allow non-blocking calibrations while armed 2016-05-24 17:10:41 +10:00
Andrew Tridgell
d3494d1369 Plane: don't stall EKF during baro cal 2016-05-24 17:00:56 +10:00
Andrew Tridgell
5b4bbf08fd Plane: use send_heartbeat wrapper 2016-05-21 15:25:18 +10:00
Andrew Tridgell
9f47e6417b Plane: always build with MAVLink2 headers 2016-05-21 15:25:16 +10:00
Andrew Tridgell
eee06da1b5 Plane: use HAVE_PAYLOAD_SPACE() 2016-05-21 15:25:14 +10:00
Andrew Tridgell
a103e70460 ArduPlane: handle SETUP_SIGNING message 2016-05-21 15:25:13 +10:00
Don Gagne
151686ce9d ArduPlane: SET_SENSORS_OFFSETS support for third compass 2016-05-19 18:51:17 -03:00
Andrew Tridgell
e3b2e90a27 Plane: cleanup unnecessarily complex gcs[] usage 2016-05-17 08:27:39 +10:00
Tom Pittenger
8a58f5a5eb Plane: convert airspeed_error_cmd to airspeed_error (in meters) 2016-05-13 17:21:59 -07:00
skyscraper
7f29903287 ArduPlane: Fix up after refactoring RC_Channel class
Further to refactor of RC_Channel class which included
adding get_xx set_xx methods, change reads and writes to the public members
to calls to  get and set functionsss

old public member(int16_t)   get function -> int16_t     set function (int16_t)
(expression where c is an object of type RC_Channel)
c.radio_in                     c.get_radio_in()           c.set_radio_in(v)
c.control_in                   c.get_control_in()         c.set_control_in(v)
c.servo_out                    c.get_servo_out()          c.set_servo_out(v)
c.pwm_out                      c.get_pwm_out()            // use existing
c.radio_out                    c.get_radio_out()          c.set_radio_out(v)
c.radio_max                    c.get_radio_max()          c.set_radio_max(v)
c.radio_min                    c.get_radio_min()          c.set_radio_min(v)
c.radio_trim                   c.get_radio_trim()         c.set_radio_trim(v);

c.min_max_configured() // return true if min and max are configured

Because data members of RC_Channels are now private and so cannot be written directly
 some overloads are provided in the Plane classes to provide the old functionality

new overload Plane::stick_mix_channel(RC_Channel *channel)
which forwards to the previously existing
void stick_mix_channel(RC_Channel *channel, int16_t &servo_out);

new overload Plane::channel_output_mixer(Rc_Channel* , RC_Channel*)const
which forwards to
(uint8_t mixing_type, int16_t & chan1, int16_t & chan2)const;

Rename functions

 RC_Channel_aux::set_radio_trim(Aux_servo_function_t function)
    to RC_Channel_aux::set_trim_to_radio_in_for(Aux_servo_function_t function)

 RC_Channel_aux::set_servo_out(Aux_servo_function_t function, int16_t value)
    to RC_Channel_aux::set_servo_out_for(Aux_servo_function_t function, int16_t value)

 Rationale:

        RC_Channel is a complicated class, which combines
        several functionalities dealing with stick inputs
        in pwm and logical units, logical and actual actuator
        outputs, unit conversion etc, etc
        The intent of this PR is to clarify existing use of
        the class. At the basic level it should now be possible
        to grep all places where private variable is set by
        searching for the set_xx function.

        (The wider purpose is to provide a more generic and
        logically simpler method of output mixing. This is a small step)
2016-05-10 16:21:16 +10:00
Leandro Pereira
f23bd7e09d GCS_MAVLink: Use a single stream_trigger() implementation
This has no side effects, but since all implementations were basically
the same, move the implementation to GCS_Common and the only part that
adjusts the rate based on which which stream to each individual
GCS_MAVLINK implementation.
2016-05-07 23:49:35 -03:00
Andrew Tridgell
3853aa0fe3 Plane: fix for changed API 2016-05-07 18:27:22 +10:00
Michael Day
b096e1404d Plane: Add MAVLink message handler for CMD_DO_CHANGE_SPEED 2016-05-06 11:59:45 -07:00
Lucas De Marchi
baa287e5e5 ArduPlane: use separate header for version macro
Having the version macro in the config.h and consequently in the main
vehicle header means that whenever the version changes we need to
compiler the whole vehicle again. This would not be so bad if we weren't
also appending the git hash in the version. In this case, whenever we
commit to the repository we would need to recompile everything.

Move to a separate header that is include only by its users. Then
instead of compiling everything we will compile just a few files.
2016-05-06 13:11:28 -03:00
Allan Matthew
25c8027606 Plane: handle new MAVLink rangefinder input 2016-05-04 08:40:34 -07:00
Michael du Breuil
0fcfcdc169 Plane: Broadcast POSITION_TARGET_GLOBAL_INT as part of the EXTENDED_STATUS stream 2016-05-01 07:38:23 +10:00
Michael Oborne
cd56061b24 ArduPlane: support MAVLINK_MSG_ID_MISSION_ITEM_INT 2016-05-01 07:13:46 +10:00
Andrew Tridgell
4666b25258 Plane: initial implementation of QRTL for quadplane RTL 2016-04-30 14:34:47 +10:00
Niti Rohilla
a03941ba02 ArduPlane : Updated handle_guided_request() to report error. 2016-04-29 12:39:28 -03:00
Andrew Tridgell
76400a9959 Plane: support DO_VTOL_TRANSITION as a mission item 2016-04-23 21:03:46 +10:00
James Stoyell
4e7e84fc99 Plane: Modified last_valid_rc_ms AFS failsafe input to work when standard failsafe is on
Ran into a bug on our physical plane where failsafe.last_valid_rc_ms was not recognizing that the transmitter had failed. This is likely due to how the standard failsafe works in receiving lower-than-possible throttle values. So in order to account for this, I added a new variable to the failsafe, AFS_last_valid_rc_ms, and I update it only if the ch3_failsafe (the throttle failsafe) is not on. If the throttle failsafe is on, that means that the plane has indeed lost transmitter input, so the AFS needs to recognize that.
2016-04-22 11:48:36 -07:00
Randy Mackay
4291139b6c Plane: ack DO_MOUNT_CONTROL messages 2016-04-22 21:30:51 +09:00
Andrew Tridgell
8683616d8c Plane: redo scheduler table and improve perf logging
The scheduler table was still setup for a worst case CPU of
AVR2560. Adjust times for the stm32 and improve perf logging
2016-04-21 16:45:02 +10:00
Lucas De Marchi
0095f6168e ArduPlane: fix handling of SET_HOME_POSITION
Location.altitude is stored in cm.
2016-04-18 13:07:45 +10:00
Michael du Breuil
c17ea21a97 Plane: Add support for DO_REPOSITION via COMMAND_INT
also allows guided to change loiter directions
2016-04-17 19:00:03 -07:00
Randy Mackay
70f81ee338 Plane: remove multicopter PID parameters
These have been moved to the AC_AttitudeControl class
2016-04-01 11:59:30 +09:00
Andrew Tridgell
f73c8ab8ed Plane: allow testing of all motors in sequence
this makes for an easier startup test for a quadplane, allowing a
single MAVLink command to test that all motors are working correctly
in the right sequence
2016-04-01 11:09:51 +11:00
Michael du Breuil
35bb6a634e Plane: Make base_mode armed status depend upon the arming library, not soft armed 2016-03-17 15:16:17 +11:00
Andrew Tridgell
89970e4eaa Plane: support motor_test for quadplanes 2016-03-13 10:05:10 +11:00
Michael du Breuil
f60b3fd6c7 Plane: remove "Command recieved" statustext 2016-03-10 15:36:05 +11:00