Commit Graph

542 Commits

Author SHA1 Message Date
Peter Barker d58e2214d2 Copter: tidy handling of barometer calibrations 2018-04-02 23:25:05 +01:00
Peter Barker cca4d5136e Copter: move common calibration functions up 2018-04-02 23:25:05 +01:00
Peter Barker c80714b820 Copter: factor out preflight calibration function 2018-04-02 23:25:05 +01:00
Dr.-Ing. Amilcar do Carmo Lucas d633ba8c46 Copter: Add option to disable RPM module 2018-03-30 09:36:48 +09:00
Peter Barker ce0f0938ee Copter: make superclass handle command_ack packets 2018-03-28 09:28:23 +09:00
Michael du Breuil 291531e056 Copter: Support new battery failsafes 2018-03-27 22:12:21 +01:00
Peter Barker f8d5fe96d8 Copter: allow DataFlash to handle log sending 2018-03-26 09:22:47 +09:00
Peter Barker 41960704b0 Copter: move handling of visual odometry messages up 2018-03-23 09:28:07 +09:00
Peter Barker edcfa7ffd4 Copter: move handling of get_home_position up 2018-03-19 10:32:37 +09:00
Peter Barker 45f2312bfe Copter: move home state into AP_AHRS 2018-03-19 10:32:37 +09:00
Peter Barker d88bd52a53 Copter: use baro singleton 2018-03-08 21:20:05 -08:00
Peter Barker 9bffeb4117 Copter: use AHRS singleton in GCS_MAVLink 2018-03-07 12:34:39 +00:00
Peter Barker af56826107 Copter: follow mode fixups
add follow to FLTMODEx param descriptions
remove follow's set_velocity method
10hz logging of desired velocity in follow mode
follow mode uses pos error P gain
add send-debug-via-mavlink option
don't enter follow if follow lib is disabled
follow debug slowed to 1hz
disable follow on min-features builds
2018-03-05 15:08:08 +09:00
Randy Mackay 6ee101ca98 Copter: rename chase to follow 2018-03-05 15:08:08 +09:00
Randy Mackay 053983eb70 Copter: integrate AP_Follow into chase mode 2018-03-05 15:08:08 +09:00
Peter Barker 199455dc56 Copter: add chase mode 2018-03-05 15:08:08 +09:00
Peter Barker 86b162e32f Copter: add option to disable BRAKE flight mode 2018-02-27 07:43:13 +09:00
Peter Barker b8c432b1a1 Copter: add option to disable GUIDED flight mode
Saves about 6kB of flash
2018-02-27 07:43:13 +09:00
Peter Barker b9ad2bc8db Copter: add option to disable AUTO mode
Saves ~12k of flash
2018-02-27 07:43:13 +09:00
Peter Barker eb9bbddcb7 Copter: add in_guided_mode mode callback 2018-02-27 07:43:13 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas def098bd8a Copter: obey ADSB_ENABLED == DISABLED 2018-02-21 22:11:34 +09:00
Peter Barker bfc373aeff Copter: move logging of PM messages to AP_Scheduler 2018-02-13 17:15:05 +11:00
Randy Mackay 9eda7f4e31 Copter: global-pos-int uses system time 2018-02-13 08:52:48 +09:00
murata 296ee7315b Copter: minor formatting fixes 2018-02-12 12:17:05 +09:00
murata c31c2a4cf1 Copter: optionalize the winch 2018-02-12 12:16:57 +09:00
Peter Barker 40d74584ac Copter: remove shims used in scheduler 2018-02-12 11:19:34 +09:00
Andrew Tridgell af4f0c29ba Copter: enable TMODE (ToyMode) support
this is for the skyviper button based transmitter control
2018-02-08 17:36:33 +11:00
Andrew Tridgell 1f76f69d80 Copter: implement per-motor compass compensation 2018-02-08 17:36:33 +11:00
Pierre Kancir 10e6fe43dd Copter: Add a switch option to enable/disable RC_Override 2018-01-24 21:37:41 +09:00
Randy Mackay 8d6f8e4d9c Copter: move pos-control pids to pos-control library 2018-01-23 12:00:43 +09:00
Alexey Bulatov 8accfb97f6 ArduCopter: Check for nullptr for motors class pointer
Because of added initialisation of UAVCAN send_heartbeat function
starts before motors initialisation. So we need check is object created.
2018-01-17 07:24:17 -08:00
Matt c0f0e3eca3 COPTER: Fix MOUNT_CONTROL yaw in guided
If the mount instance does not support yaw/pan, the copter needs to yaw in
response to MSG_MOUNT_CONTROL and MAV_COMMAND_DO_MOUNT_CONTROL commands from
a GCS or co-computer. There was no checking for mount pan in the GCS_Mavlink
logic.  As such, no yaw takes place when a mount control command calls for it.
This patch impliments copter yaw control for both MSG_MOUNT_CONTROL and
MAV_COMMAND_DO_MOUNT_CONTROL in copter GCS_Mavlink.
2017-12-23 10:57:31 +09:00
Peter Barker 6c82f7671d Copter: move all commands logic into AUTO flightmode 2017-12-14 14:08:01 +09:00
Randy Mackay 2d23e1f7c7 Copter: rename flightmode_ objects to mode_ 2017-12-12 10:39:26 +09:00
Peter Barker 103e2cc711 Copter: calculate wp bearing and distance on demand
Move responsibility for calculating wp bearing/distance
into the FlightMode object doing the navigation

Calculating these variables was being done at 50Hz where they
were used at 10Hz max.
2017-12-07 07:43:08 +09:00
Peter Barker 51cd143012 Copter: FlightMode - convert BRAKE flight mode 2017-12-06 08:24:24 +09:00
Peter Barker 2db09ba0f7 Copter: FlightMode - convert GUIDED flight mode 2017-12-06 08:24:24 +09:00
Peter Barker e2b70c3a0a Copter: FlightMode - convert AUTO flight mode 2017-12-06 08:24:24 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas ce3197e0ac Copter: use the return code of the guided_set_destination_posvel() function calls 2017-12-05 08:57:55 +09:00
Peter Barker 398d07a68a Copter: tighten return types of mavlink functions and variables 2017-12-01 17:01:10 +00:00
Randy Mackay 8d2db3218c Copter: minor comment fix to code handling SET_POSITION_TARGET msgs 2017-11-27 14:24:30 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas bde1aaa2f6 Copter: Rename variable to correct the meaning (NFC) 2017-11-27 14:17:21 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas 8678d13e7b Copter: Update the result of a MavLink message, this is a NFC
The result variable is not used, but at least it gets documented :)
2017-11-27 14:17:21 +09:00
Andrew Tridgell a644cff921 Copter: support testing multiple motors with motortest
this matches the quadplane behaviour, allowing a sequence of motors to
be tested
2017-11-27 10:15:31 +09:00
Peter Barker 8f48b3187e Copter: use gps singleton for GCS function 2017-11-15 13:43:03 +00:00
Randy Mackay 842eed5426 Copter: accept do-winch commands with max rate 2017-10-27 09:20:38 +09:00
Randy Mackay 787954fa37 Copter: integrate winch library
fixes after peer review:
rename winch-disable to winch-relaxed
add DO_WINCH to do-verify
winch release-length accepts rate
2017-10-27 09:20:38 +09:00
Andrew Tridgell f49ab44f25 Copter: support simple accel calibration 2017-10-10 10:57:38 +11:00
Lucas De Marchi 4ef5186733 ArduCopter: do not include version.h/ap_version.h
The interface provided by each vehicle should be used to get the
version.
2017-09-23 21:37:45 -07:00
Randy Mackay a8a5c1d332 Copter: command-long DO_SET_HOME check first param is zero
Also do not use current location just because lat,lon,alt are all zero
2017-09-20 12:14:38 +09:00
Randy Mackay d982cfed4a Copter: accept DO_SET_HOME within COMMAND_INT 2017-09-20 12:14:38 +09:00
Randy Mackay 70cf21a5ba Copter: accept more mav-frame types
accept mav frames whether or not they have _INT appended
2017-09-20 12:14:38 +09:00
Peter Barker 0afe1e7473 Copter: move handling of SET_GPS_GLOBAL_ORIGIN up 2017-09-19 15:44:23 +09:00
Randy Mackay 1b3cc9289b Copter: support SET_GPS_GLOBAL_ORIGIN
also remove setting of origin from DO_SET_HOME command
initialise ekf_origin location when consuming SET_GPS_GLOBAL_ORIGIN
set_ekf_origin performs sanity check on location
2017-09-19 10:30:15 +09:00
Peter Barker 6b5fd5fbdd Copter: move gcs_out_of_time into GCS object 2017-09-12 18:28:07 +01:00
squilter 4b57a4a231 Copter: rename SafeRTL to SmartRTL 2017-09-09 14:05:41 +09:00
Randy Mackay 8df042f00c Copter: complete addition of SafeRTL flight mode 2017-09-09 14:05:41 +09:00
Peter Barker 3f67dfe4fe Copter: move handling of do_send_banner up 2017-08-30 15:54:47 +01:00
Peter Barker 3da70f19c1 Copter: handle param_request_list in GCS_MAVLINK base class 2017-08-30 15:54:47 +01:00
Peter Barker e6ac68fd2a Copter: handle param_set in GCS_MAVLINK base class 2017-08-30 15:54:47 +01:00
Peter Barker bb06db6389 Copter: move send_autopilot_request calls up to GCS base class 2017-08-30 15:54:46 +01:00
Peter Barker 470e790117 Copter: add constant structure holding firmware version 2017-08-30 15:54:46 +01:00
Peter Barker 19e409f7f4 Copter: move serial_control case to base class 2017-08-17 12:42:31 +01:00
Peter Barker 6db348bab3 Copter: move play_tune and led_control handling to base class 2017-08-17 12:27:10 +01:00
Peter Barker aa06fc499c Copter: use GCS_MAVLINK subclasses to handle set_mode 2017-08-16 11:58:10 +10:00
Michael du Breuil 5cfe4d5a8c Copter: Expose the AFS instance to MAVLink 2017-08-15 15:14:56 +01:00
Peter Barker 55af774e98 Copter: send gps messages as separate queued messages 2017-08-09 16:18:22 +01:00
Peter Barker 56160a8bbd Copter: move sending of gps_raw up 2017-08-09 16:18:22 +01:00
Peter Barker ff81186951 Copter: move sending of system_time up 2017-08-09 16:18:22 +01:00
Peter Barker 7ca146878d Copter: move sending of camera_feedback up 2017-08-09 16:18:22 +01:00
Peter Barker da889bdff5 Copter: move sending of meminfo up 2017-08-09 16:18:22 +01:00
Peter Barker c36a20ab54 Copter: use new retry_deferred method 2017-08-05 23:14:31 +01:00
Peter Barker db080ed60e Copter: stop sending MSG_SERVO_OUT messages
This didn't ever result in a message being sent on Copter
2017-08-03 14:34:33 +01:00
Peter Barker 7c37bb324b Copter: move try_send_message queued_param_send up 2017-08-03 14:34:33 +01:00
Peter Barker 431e3443bd Copter: move try_send_message send_hwstatus up 2017-08-03 14:33:37 +01:00
Peter Barker 3e5665735f Copter: move try_send_message mission handling up 2017-08-03 14:24:47 +01:00
Peter Barker 2a62b57e11 Copter: move try_send_message compass message handling up 2017-08-03 14:24:46 +01:00
Peter Barker 4b63443633 Copter: correct misleading comment 2017-08-03 14:24:46 +01:00
Peter Barker 31b33b2232 Copter: base SYS_STATUS load average on variable loop rate 2017-08-01 19:39:27 +01:00
Peter Barker f56c9bd96d Copter: move common mavlink camera handling up 2017-07-28 14:32:58 +01:00
Peter Barker cdf9ebcb39 Copter: camera is responsible for taking distance-based-images and logging 2017-07-28 14:27:53 +01:00
Peter Barker 192310a68e Copter: move gps inject handling up to GCS_MAVLINK 2017-07-27 12:03:25 +01:00
Peter Barker f1ab50d4ea Copter: handle common GPS messages in base GCS_MAVLINK class 2017-07-25 14:00:45 +01:00
khancyr 88aa1e447a Copter: adapt to new send_proximity API 2017-07-24 13:44:43 +01:00
khancyr 49755063ab Copter: move send_proximity to GCS common code (NFC) 2017-07-24 13:44:43 +01:00
Peter Barker eb0edc9b5b Copter: remove MSG_STATUSTEXT entirely 2017-07-18 16:12:59 +01:00
Peter Barker ad1c379445 Copter: move handling of PREFLIGHT_SET_SENSOR_OFFSETS up 2017-07-17 14:17:19 +01:00
Peter Barker fe16691c6e Copter: move handling of MAG_CAL command longs up 2017-07-17 14:17:19 +01:00
Peter Barker ecda9116ba Copter: move MAV_CMD_START_RX_PAIR handling to base class 2017-07-17 14:17:19 +01:00
Peter Barker b14964eb1e Copter: move mavlink support for servo/relay up 2017-07-16 23:56:00 +01:00
Peter Barker 3e3a8717c5 Copter: add common handling of mavlink command messages 2017-07-16 23:56:00 +01:00
Peter Barker 480a83fdef Copter: move rally-point handling up 2017-07-14 01:28:05 +01:00
Peter Barker 7bb28175d7 Copter: remove unneeded telemetry_delayed parameter 2017-07-12 17:01:36 +01:00
Peter Barker 016eeaa258 Copter: move handling of incoming statutext messages up 2017-07-12 16:52:24 +01:00
Randy Mackay 2b98fd765d Copter: guided_set_destination accepts relative yaw 2017-07-12 13:27:45 +09:00
Randy Mackay 4c9e118ceb Copter: set_auto_yaw_look_at_heading takes bool for relative angle arg
No functional change
2017-07-12 13:27:45 +09:00
kouseii 4dd7d9eaff Copter: guided mode supports heading and yaw-rate target 2017-07-12 13:27:45 +09:00
Peter Barker 8a1fc6a406 Copter: remove global static send_statustext_chan 2017-07-11 23:53:53 +01:00
Peter Barker 3660236a0d Copter: move common mission handling up to GCS_MAVLINK 2017-07-11 23:45:16 +01:00
Peter Barker 358555446b Copter: eliminate gcs_send_mission_item_reached wrapper 2017-07-11 23:45:16 +01:00
Peter Barker 0ac045febe Copter: eliminate gcs_send_message wrapper 2017-07-11 23:45:16 +01:00
Peter Barker f60389d4aa Copter: use send_text method on the GCS singleton 2017-07-09 17:17:29 -04:00
Peter Barker 037cd2e9c6 ArduCopter: use Notify singleton for sending statustext 2017-07-09 17:17:29 -04:00
Peter Barker d9b45cc202 Copter: create GCS subclass, use inheritted methods 2017-07-07 16:18:37 +01:00
Dr.-Ing. Amilcar Do Carmo Lucas 9994e9b773 Copter: improve stream descriptions (NFC) 2017-07-04 08:12:57 +09:00
Peter Barker 8b57405143 Copter: handle knowledge of in_log_download in DataFlash 2017-06-27 03:10:43 +01:00
Peter Barker 45a55bfa5f Copter: move send-logs-via-mavlink code into DataFlash 2017-06-27 03:10:43 +01:00
Michael du Breuil f0cb234228 Copter: Handle NAV_CONTROLLER_OUTPUT.wp_dist overflowing 2017-06-20 15:41:50 +01:00
Peter Barker 4af3b31128 Copter: move MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS handling up 2017-06-17 15:07:48 +01:00
Peter Barker 4163455d97 Copter: stop using in_mavlink_delay as a proxy for disabling logging 2017-06-16 17:07:48 +01:00
Pierre Kancir d5cc1e64ed GCS_Common: rename send_rangefinder to send_rangefinder_downward 2017-06-08 01:32:04 +01:00
Pierre Kancir 73038a0e09 ArduCopter: GCS_mavlink style correction 2017-06-08 01:31:52 +01:00
Pierre Kancir ac0a300415 ArduCopter: correct msg send by proximity 2017-06-08 01:31:52 +01:00
Pierre Kancir 261eb387eb ArduCopter: change rangefinder msg for common one 2017-06-08 01:31:43 +01:00
Pierre Kancir 156863d10a ArduCopter: add DISTANCE_SENSOR support 2017-06-08 01:22:07 +01:00
Peter Barker 758414cfe5 Copter: allow mavlink messages to be exchanged on failed boot 2017-06-07 12:56:46 +01:00
Randy Mackay 814cadac68 Copter: consolidate set_home functions
added lock argument instead of having twice as many functions
no functional change
2017-06-07 13:01:38 +09:00
Paulo Neves 9c6a7c170f Copter: Add MAV_CMD_DO_SET_CAM_TRIGG_DIST support 2017-05-25 09:35:22 +09:00
Michael du Breuil 6ba53cf11c Copter: Ignore Landing message 2017-05-24 15:22:27 -07:00
Randy Mackay 91d4b4777b Copter: respond to param list request after motor init 2017-05-15 14:13:43 +09:00
Andrew Tridgell 22791b7272 Copter: use common send_queued_parameters() 2017-05-01 14:36:10 +10:00
Randy Mackay 8f43b60247 Copter: set EKF origin from first do-set-home command 2017-04-22 10:37:31 +09:00
Randy Mackay 3348ab4fa8 Copter: send upward DISTANCE_SENSOR message to GCS 2017-04-20 18:11:43 +09:00
Randy Mackay 496e8f3cdb Copter: integrate proximity method rename 2017-04-20 18:11:43 +09:00
Andrew Tridgell 1a8669201e Copter: ignore MSG_AOA_SSA 2017-04-19 20:48:42 +10:00
Randy Mackay 713c08672f Copter: integrate AP_VisualOdom 2017-04-19 11:04:40 +09:00
Francisco Ferreira bf22919a8c Copter: add support for MANUAL_CONTROL message 2017-04-12 16:16:11 +09:00
Michael du Breuil ea89bd1178 Copter: Send BATTERY_STATUS 2017-04-12 10:21:49 +09:00
Randy Mackay 51c00f8144 Copter: use only downward facing rangefinder 2017-02-27 15:18:16 +09:00
Andrew Tridgell 7efca1881c Copter: fixed a problem with initial parameter fetch
if the GCS connects before the motors have been allocated then it will
get an incorrect parameter count from the MAVLink param protocol. We
need to prevent the PARAM_REQUEST_LIST message from being replied to
until motors are allocated which is done as part of init_ardupilot
2017-02-15 17:16:30 +10:00
Peter Barker 65a182a068 Copter: not in log download upon log erase
erase is a synchronous operation
2017-02-13 11:36:16 +11:00
Peter Barker 029aeeb4fd Copter: support for a GCS singleton 2017-02-13 09:32:01 +11:00
Peter Barker f49f153da0 Copter: rename gcs[] to gcs_chan[]
Wish to use gcs() to return the gcs singleton
2017-02-13 09:32:01 +11:00
Dr.-Ing. Amilcar Do Carmo Lucas 4161c34e61 Copter: rename MSG_RADIO_OUT to MSG_SERVO_OUTPUT_RAW to better describe what it is 2017-02-07 11:41:12 +11:00
Peter Barker 4aaeb4bfed Copter: get mav heartbeats out when board detection fails 2017-01-27 13:48:23 +09:00
Dmitry Prokhorov 3e993f955e ArduCopter: Support for OLED display by Alexey Kozin 2017-01-23 15:07:20 -08:00
Andrew Tridgell 0f6d0c5ba9 Copter: combined tri, single, coax and multicopter into a single build
this allows copter to be just 2 builds, one for heli, and one for
everything else
2017-01-12 17:39:37 +11:00
Andrew Tridgell 5a87ae3f01 Copter: use new SRV_Channels API 2017-01-12 17:39:37 +11:00
Francisco Ferreira 11b635df12
Copter: correct limit status to fence status 2017-01-12 02:00:51 +00:00
Dr.-Ing. Amilcar Do Carmo Lucas 712fbfe84b Copter: Update descriptions of stream rate parameters 2017-01-12 01:47:12 +00:00
Randy Mackay 20ca021cab Copter: pass distance-sensor messages to AP_Proximity 2017-01-11 21:48:23 +09:00
Randy Mackay 0ac00dbfd6 Copter: add FRAME_CLASS parameter 2016-12-31 10:55:23 +09:00
Randy Mackay c1d1ac5c6f Copter: pass HIL_GPS to gps driver 2016-12-08 15:52:26 +09:00
Randy Mackay 7485de3498 Copter: add send_proximity to send distances to GCS 2016-11-27 15:05:46 +09:00
Peter Barker 469f0f0bf0 Copter: remove incorrect comment from PRECISION_LANDING block 2016-11-18 09:41:56 +09:00
Francisco Ferreira 84436ff5ae Copter: sipport MAV_CMD_ACCELCAL_VEHICLE_POS 2016-11-15 11:42:54 -08:00
Andrew Tridgell df3e434607 Copter: use handle_common_message() 2016-11-09 17:08:09 +11:00
floaledm 53fcbcb6c3 Copter: send ahrs groundspeed estimate instead of GPS groundspeed in VFR_HUD message 2016-11-07 09:14:28 +11:00
Peter Barker 236b8ab6b7 Copter: make EPM a subclass of AP_Gripper_Backend 2016-11-05 10:20:39 +09:00
murata 965a6a5719 Copter: To nullptr from NULL. 2016-10-28 10:53:31 -07:00
Andrew Tridgell 1b46a71596 Copter: also update sensor status before mavlink send
this removes the 1 second lag in updates when using the one second
loop
2016-10-28 10:05:40 +11:00
floaledm 34718b130a Copter: update sensor status error flags independently of sending a sys_status message
Without this, there is no update to the sensor status flags in the Frsky
lib unless there's an active Mavlink connection configured to send
extended_status1
2016-10-28 10:03:38 +11:00
Mathieu OTHACEHE 152edf7189 Global: remove mode line from headers
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
2016-10-24 09:42:01 -02:00
Andrew Tridgell 57830784e2 Copter: use handle_rc_bind 2016-10-15 21:42:38 +11:00
Andrew Tridgell 5a9276a5c4 Copter: added SYSID_ENFORCE parameter
allows enforcement of SYSID_MYGCS
2016-10-15 17:14:19 +11:00
Randy Mackay 0aab175051 Copter: move proximity to g2 2016-10-14 14:02:29 +09:00
Andrew Tridgell ebbcabcb5f Copter: fixed comment 2016-10-14 11:40:09 +11:00
Randy Mackay 1665f4d416 Copter: report altitude and position control of new modes in sys-status message 2016-10-13 20:21:07 +09:00
Randy Mackay 4afa49eebe Copter: report proximity health in system-status 2016-10-13 20:21:07 +09:00
Andrew Tridgell 652b6b7564 Copter: deprecate RC_CHANNELS_RAW 2016-10-13 21:24:02 +11:00
Michael du Breuil ea45e5e6f1 Copter: Support GPS_RTCM_DATA 2016-10-11 11:00:36 +11:00
Lucas De Marchi b24d850695 ArduCopter: Fix use of logical op instead of bitwise op
../../ArduCopter/GCS_Mavlink.cpp: In member function 'void Copter::send_extended_status1(mavlink_channel_t)':
../../ArduCopter/GCS_Mavlink.cpp:281:37: error: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~' [-Werror=parentheses]
     uint32_t sensors_error_flags = !control_sensors_health & control_sensors_enabled & control_sensors_present;
                                     ^
compilation terminated due to -Wfatal-errors.
cc1plus: all warnings being treated as errors

Thanks to Ralph Campbell <ralphcampbell1@gmail.com> for the bug report.
2016-09-29 11:36:23 -03:00
Tom Pittenger 748beb094d Copter: log to dataflash statustext messages from my_gcs 2016-09-26 00:13:30 -07:00
floaledm 5910c94b65 Copter: change sensor health check to prevent false positive 2016-09-22 13:56:49 -05:00
Andrew Tridgell d0dd10aeea Copter: added DEV_OPTIONS parameter
this is for little used options to allow standard firmware builds to
enable those options for development purposes

First option is for MAVLink based ADSB avoidance
2016-09-12 16:24:34 +10:00
Michael du Breuil bec4bfa2ba Copter: Return RESULT_FAILED for GET_CMD_HOME if home is unset 2016-09-03 16:54:16 +09:00
Randy Mackay a8a31b1c24 Copter: fix health reporting to GCS for optical flow and precision landing
Includes slight restructuring to logic for other sensors but these should not have any functional effect
2016-08-31 13:59:16 +09:00
Andrew Tridgell 96de005591 Copter: moved MAV_TYPE define to defines.h 2016-08-25 10:16:20 +10:00
Andrew Tridgell a14ff8ac77 Copter: fixes for Frsky_Telem API changes 2016-08-25 10:16:20 +10:00
floaledm 157db51b9d Copter: make control_sensor vars available outside of send_extended_status1 2016-08-25 10:16:18 +10:00
Tom Pittenger 06b64000e1 Copter: move mavlink msg handling into library 2016-08-16 16:33:36 -07:00
Tom Pittenger d04a5d58fd Copter: decode correct ADSB packet 2016-08-16 16:33:36 -07:00
Tom Pittenger dbdd86ad46 Copter: set SYS_STATUS and HB_Flag Guided bits when in AVOID_ADSB 2016-08-12 14:46:44 -07:00
Peter Barker 4371223738 Copter: add dataflash as a bit for the mavlink SYS_STATUS message 2016-08-11 17:48:44 -03:00
Randy Mackay 0ed5665193 Copter: change parameter order of guided_set_angle
I thought it might be slightly better to put the optional parameters at the end
No functional change
2016-08-10 10:03:54 +09:00
Allan Matthew 6dd4e1a2aa Copter: accept yaw rate commands in Guided atttude controller 2016-08-10 10:03:37 +09:00
Randy Mackay 4e92f08bf1 Copter: only accept attitude targets in Guided mode 2016-08-02 18:26:04 +09:00
Randy Mackay 1161417d7f Copter: add GUIDED_NOGPS flight mode
This mode is a cut down version of Guided mode that only accepts attitude commands.
This mode does not require a GPS lock
2016-08-02 18:25:59 +09:00
Lucas De Marchi c0b49f6aeb ArduCopter: Remove i2c lockup count
This was returned only for a single bus and on all supported platforms
this is hardcoded to 0.
2016-07-28 18:03:09 -03:00
Randy Mackay 68899ed921 Copter: add adsb to failsafe structure and report in heartbeat to GCS 2016-07-25 20:24:37 +09:00
Randy Mackay f4db4bdb08 Copter: GCS_MAVLink passes packets to AP_Avoidance
This allows treating GLOBAL_POSITION_INT packets from other vehicles in the same way as ADSB packets
2016-07-25 20:24:37 +09:00
Andrew Tridgell 387da40fc5 ArduCopter: adjust for 16 channels in SERVO_OUTPUT_RAW 2016-07-25 10:06:02 +10:00
Tom Pittenger 07a838937e Copter: handle ADSB-Out packets 2016-07-22 13:38:37 -07:00
Andrew Tridgell e943a48eba Copter: added PLAY_TUNE message 2016-07-22 15:00:17 +10:00
Allan Matthew 860773260f Copter: support GPS_INPUT mavlink message 2016-07-12 15:34:51 +09:00
Randy Mackay 52d81f630f Copter: pass polygon fence mavlink messages to fence 2016-06-25 15:55:55 +09:00
Tom Pittenger 66d4caeeb0 Copter: add ADSB_streamrate 2016-06-19 11:24:33 -07:00
Tom Pittenger b433250da5 Copter: sanity check gps latlng 2016-06-01 17:38:50 -07:00
Peter Barker e977d85e0c Copter: move telemetry_delayed up into base class 2016-05-31 08:46:09 +10:00
Peter Barker 3cf174c343 Copter: move adjust_rate_for_stream up 2016-05-29 19:38:49 +10:00
Peter Barker bb19c57615 Copter: subclass GCS_MAVLink in place of defining its functions for it 2016-05-29 16:21:21 +10:00
Andrew Tridgell a922b98ac0 Copter: use send_heartbeat wrapper 2016-05-21 15:25:18 +10:00
Andrew Tridgell 31866c66d8 Copter: always build with MAVLink2 headers 2016-05-21 15:25:15 +10:00
Andrew Tridgell b85f129cc5 ArduCopter: handle SETUP_SIGNING message 2016-05-21 15:25:12 +10:00
Randy Mackay 7689315ba2 Copter: rename sonar to rangefinder 2016-05-21 10:36:53 +09:00
Randy Mackay 028946ae9e Copter: rename CONFIG_SONAR to RANGEFINDER_ENABLE 2016-05-21 10:36:53 +09:00
Saloni Jain bc22419286 Copter : Modified set_guided_destination() to reject requests for guided waypoints outside the fence. 2016-05-21 09:56:12 +09:00
Don Gagne 97d361333d ArduCopter: SET_SENSORS_OFFSETS support for third compass 2016-05-19 18:51:17 -03:00
Andrew Tridgell e4948544e7 Copter: cleanup unnecessarily complex gcs[] usage 2016-05-17 08:27:35 +10:00
Randy Mackay 0a2336a5a8 Copter: update solo-buttons to work with master
Change was due to addition of reason codes since PR was first submitted
2016-05-13 11:42:25 +09:00
Jonathan Challinger 67cd2bae08 Copter: implement SOLO_BTN commands 2016-05-13 11:42:25 +09:00
skyscraper 4980c8bc94 ArduCopter: RC_Channel refactor
More fixing up of RC_Channel change direct access to data members
to access via member functions.
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 874fae931f Copter: fix for changed API 2016-05-07 18:27:22 +10:00
Lucas De Marchi 352e103f1a ArduCopter: 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 7960e3bb8f Copter: pass DISTANCE_SENSOR messages to rangefinders
This allows the MAVLink range finder driver to intercept distance measurements
2016-05-04 12:10:58 +09:00
Michael du Breuil e7974702d4 Copter: Ignore POSITION_TARGET_GLOBAL_INT 2016-05-01 07:38:24 +10:00
Michael Oborne 5848d8a5e6 ArduCopter: support MAVLINK_MSG_ID_MISSION_ITEM_INT 2016-05-01 07:13:46 +10:00
Randy Mackay 47658fe964 Copter: add terrain failsafe 2016-04-30 10:33:01 +09:00
Niti Rohilla 867360c350 ArduCopter : Updated handle_guided_request() to report error. 2016-04-29 12:39:28 -03:00
Randy Mackay 699816400e Copter: ack DO_MOUNT_CONTROL messages 2016-04-22 21:30:49 +09:00
Lucas De Marchi a310d3735e ArduCopter: fix handling of SET_HOME_POSITION
Location.altitude is stored in cm.
2016-04-18 13:07:45 +10:00
Jonathan Challinger 1356deab8b Copter: add control_mode_reason 2016-04-14 12:24:04 +09:00
Jonathan Challinger a0ce8af633 Copter: use enum type for control_mode 2016-04-14 12:24:04 +09:00
Randy Mackay 1f20a5ef69 Copter: access angle and rate PIDs through attitude controller 2016-04-01 11:59:30 +09:00
Leonard Hall a44f7f650b Copter: throttle sent to GCS uses 0 to 1 range
This is probably not correct because we should be sending the throttle as a 0 to 1 number using the full possible output range.  This uses the reduced range passed in when the copter is being stabilized (i.e. between throttle-min and throttle-max)
2016-04-01 11:59:30 +09:00
Nitay Megides f77eed8f95 Copter: add break after prec landing case clause
(And fixed indentation)
2016-03-21 09:34:55 +09:00
Tom Pittenger 6568402b28 Copter: convert to using static send_statustext
- no more MSG_STATUSTEXT
- TODO: replace calls to gcs_send_text and gcs_send_text_fmt to GCS_MAVLINK::send_statustext()
2016-02-24 09:18:06 +11:00
Jonathan Challinger e09e9a313e Copter: interpret MAV_FRAME_GLOBAL_RELATIVE_ALT as MAV_FRAME_GLOBAL_RELATIVE_ALT_INT 2016-02-06 09:36:51 +09:00
Jonathan Challinger 0b8162aa0d Copter: add support for COMMAND_INT DO_SET_ROI 2016-02-06 09:36:41 +09:00
Randy Mackay a77dd59dc6 Copter: single and coax copters become mav_type quadrotor 2016-01-30 17:15:28 +09:00
Andrew Tridgell 5be21cc178 ArduCopter: log a picture if AP_Camera::control() returns true 2016-01-29 10:01:51 +11:00
Randy Mackay 27ed9e1561 Copter: allow mount to be disabled 2016-01-23 10:35:48 +09:00
Jonathan Challinger 22c3397657 Copter: make AP_Mount calls required by AP_Mount_SoloGimbal 2016-01-23 10:35:42 +09:00
Jonathan Challinger 5f610fdcba Copter: support SET_POSITION_TARGET with WGS84 altitudes 2016-01-23 10:29:04 +09:00
Derek Ma 3751dbef91 ArduCopter: include precision landing sensor in mavlink system status
Set MAV_SYS_STATUS_SENSOR_VISION_POSITION bit in onboard_control_sensors_present, onboard_control_sensors_enabled and onboard_control_sensors_health based on the status of precision landing sensor.
2016-01-14 09:36:24 +09:00
Jonathan Challinger cc1f27ad95 Copter: add DISALLOW_GCS_MODE_CHANGE_DURING_RC_FAILSAFE option 2016-01-12 19:49:17 +09:00
Jonathan Challinger 0e85f55cfc Copter: remove OF_LOITER entirely 2015-12-31 14:27:22 +09:00
bugobliterator 9a976963aa Copter: support AP_AccelCal 2015-12-29 10:46:34 -08:00
Jonathan Challinger 709fcf37cc Copter: call renamed functions in AC_AttitudeControl 2015-12-09 19:58:49 +09:00
Robert Lefebvre 9848d05a9d Copter: Always send RPM data when sensor is enabled 2015-12-08 08:25:18 +11:00
DonLakeFlyer c8cc83505b Copter: return success or failure of get home position 2015-12-07 12:33:15 +09:00
Peter Barker 826912c3e4 Copter: DataFlash-over-MAVLink support 2015-12-03 13:21:51 +11:00
Randy Mackay 19f5c8f209 Copter: remove debug comments 2015-11-27 16:17:00 +09:00
Luis Vale Gonçalves 3199829d45 Copter: revisions to text strings sent to GCS 2015-11-27 16:16:58 +09:00
Randy Mackay 4ef53427f2 Copter: allow ADSB to be disabled 2015-11-27 15:02:17 +09:00
Tom Pittenger 34d6d985e9 Copter: Add support for ADS-B 2015-11-27 15:02:15 +09:00
Caio Marcelo de Oliveira Filho c7acc46d09 Copter: use millis/micros/panic functions 2015-11-20 12:26:31 +09:00
Randy Mackay 731c44d053 Copter: allow terrain to be excluded from build 2015-11-14 12:38:47 +09:00
Jonathan Challinger 05e533e6fc Copter: don't accept disarm commands in stabilize and acro unless also landed 2015-11-07 11:07:14 +09:00
lvale 549695181c Copter: revised and uniformization of severity messages 2015-11-05 12:20:49 +09:00
Lucas De Marchi e0639ac029 ArduCopter: remove check for AVR CPUs
Remove the checks for HAL_CPU_CLASS > HAL_CPU_CLASS_16 and
HAL_CPU_CLASS >= HAL_CPU_CLASS_75. Corresponding dead code will be
removed on separate commits.
2015-11-04 12:14:15 +11:00
Lucas De Marchi 3e889b005f ArduCopter: remove checks for HAL_BOARD_APM2 and HAL_BOARD_APM1 2015-11-04 12:14:13 +11:00
Lucas De Marchi 1b07dabeb7 Replace prog_char and prog_char_t with char
prog_char and prog_char_t are now the same as char on supported
platforms. So, just change all places that use them and prefer char
instead.

AVR-specific places were not changed.
2015-10-30 14:35:30 +09:00
Lucas De Marchi 89fc4f4b62 Replace use of send_text_P() with send_text() 2015-10-30 14:35:17 +09:00
Lucas De Marchi 831d8acca5 Remove use of PROGMEM
Now variables don't have to be declared with PROGMEM anymore, so remove
them. This was automated with:

    git grep -l -z PROGMEM | xargs -0 sed -i 's/ PROGMEM / /g'
    git grep -l -z PROGMEM | xargs -0 sed -i 's/PROGMEM//g'

The 2 commands were done so we don't leave behind spurious spaces.

AVR-specific places were not changed.
2015-10-30 14:35:16 +09:00
Lucas De Marchi 84da1f5039 Rename gcs_send_text_P to gcs_send_text 2015-10-30 14:35:07 +09:00
Lucas De Marchi 84d5fb006f Remove use of Util::{v,}snprintf_P()
These are now the same function as Util::snprintf().
2015-10-30 14:35:05 +09:00
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.
2015-10-30 14:35:04 +09:00
Jonathan Challinger da3961e4a6 Copter: support MAV_CMD_DO_SEND_BANNER 2015-10-26 16:28:57 +09:00
vooon f3cbbef418 Copter: fix guided attitude type_mask check 2015-10-10 22:04:51 +09:00
Randy Mackay e20038a453 Copter: support SET_ATTITUDE_TARGET in guided mode 2015-10-09 12:15:38 +09:00
Randy Mackay 1dcf58bc20 Copter: support set-home-position message 2015-10-03 12:51:32 +09:00
Randy Mackay 330961b524 Copter: send home position when home is set or get-home msg received 2015-10-03 12:50:45 +09:00
Andrew Tridgell 38bae40ca0 Copter: use ahrs.send_ekf_status_report() 2015-09-29 10:59:24 +10:00
Randy Mackay f3d4b20a80 Copter: calibrate gyros during accel calibration 2015-09-21 17:06:37 +09:00
Randy Mackay 01c0b20930 Copter: calibrate gyros depending on INS GYR_CAL parameter 2015-09-21 17:06:34 +09:00
KiwiHC16 004c5b8416 Copter: mission_start always restarts mission 2015-09-16 17:17:20 +09:00
squilter 30ed2508d6 Copter: Support do_digicam_x via command_long 2015-09-16 13:06:49 +09:00
Daniel Nugent 3a7036fd67 Copter: pass LANDING_TARGET message to precland lib 2015-09-11 20:56:10 +09:00
Randy Mackay 8efc02fe0c Copter: delay for 200ms instead of 50ms before reboot 2015-09-09 10:39:56 +09:00
Jonathan Challinger 1fbdf11eca Copter: set firmware_update flag instead of event 2015-09-09 10:39:55 +09:00
Randy Mackay dc4923a88d Copter: suppressing comment for switch case fall through 2015-09-06 16:01:33 +09:00
Randy Mackay 5e38adfae3 Copter: remove support for configure as command long
Also protect mount calls with MOUNT definition
2015-09-06 16:01:21 +09:00
squilter 8320c06700 Copter: Support do-mount-control via command-long 2015-09-06 16:01:16 +09:00
Andrew Tridgell fdb1cc38b0 Copter: removed redundent copter dereference 2015-09-03 16:59:24 +10:00
Siddharth Bharat Purohit 347d1f0a25 Copter: use handle message function for compass cal from compass library 2015-09-03 16:59:14 +10:00
Jonathan Challinger 1dc373fa20 Copter: correct compile errors after compass cal merge 2015-09-03 16:59:13 +10:00
Jonathan Challinger eec5c2a5eb Copter: send NACK if compass.start_calibration_all fails 2015-09-03 16:59:12 +10:00
Jonathan Challinger 2864d58474 Copter: refuse to start mag cal if armed 2015-09-03 16:59:12 +10:00
Jonathan Challinger 3739318d2f Copter: Hook up compass calibrator 2015-09-03 16:59:11 +10:00
Randy Mackay 4cdb5bf2bd Copter: sanity check do-set-home and do-set-ROI location 2015-08-27 15:16:04 +09:00
squilter 767b4da5b6 Copter: update send text severities 2015-08-25 14:05:25 +09:00
squilter a11227af84 Copter: define and send FIRMWARE_VERSION 2015-08-21 22:40:52 +09:00
Tom Pittenger 87d0b12c7c Copter: implement try send mission_item_reached
clean up unreachable code
2015-08-19 15:42:07 +10:00
squilter a42674b0b0 Copter: implement do_flighttermination 2015-08-12 14:17:44 -07:00
Andrew Tridgell 1fdf7ec83f Copter: added RPM sensor support
send result via MAVLink
2015-08-12 15:03:50 +10:00
Randy Mackay 7199b57fde Copter: check frame for SET_POSITION_TARGET_GLOBAL_INT in guided 2015-08-11 16:41:17 -07:00
Randy Mackay 580c0ad9de Copter: guided SET_POSITION_TARGET accepts frame 2015-08-11 16:41:11 -07:00
Randy Mackay 6765aedb5b Copter: init vehicle capabilities 2015-07-31 14:50:29 +09:00
squilter edf5ff1bbe Copter: add capability bitmask 2015-07-31 14:50:15 +09:00
Randy Mackay 7935bf70f1 Copter: rc_override active only on non-zero overrides
Bug found by Kevin Hester
2015-07-22 17:32:30 +09:00
Randy Mackay c62da52259 Copter: add gcs_send_mission_item_reached 2015-07-19 12:14:12 +09:00
Randy Mackay af8b9e703c Copter: fix compiler warning from pid_tuning_send call 2015-07-02 14:22:53 +09:00
Peter Barker 12bce49cd1 Copter: use common mission logging code 2015-06-30 16:23:35 +10:00
Andrew Tridgell 58b1702552 Copter: fixed pde paths 2015-06-16 09:59:39 +10:00
Randy Mackay 40ed2f7f53 Copter: send vibration in STREAM_EXTRA3 2015-06-12 21:36:45 +09:00
Eugene Shamaev a3ddc49a70 Copter: added DSM bind support 2015-06-10 17:19:10 +10:00
Randy Mackay ce1031a5bd Copter: remove AP_AHRS_NAVEKF_AVAILABLE checks
Copter requires an EKF
2015-06-10 12:18:38 +09:00
Randy Mackay 7613964ecb Copter: fix bug in which do-parachute command could start motor test
bug found by Coverity
2015-06-08 14:46:19 +09:00
Andrew Tridgell 278883c521 Copter: finished conversion to .cpp files
Pair-Programmed-With: Randy Mackay <rmackay9@yahoo.com>
2015-05-30 15:21:19 +09:00
Andrew Tridgell 356ece3402 Copter: rename .pde files to .cpp files 2015-05-30 15:21:15 +09:00