Commit Graph

424 Commits

Author SHA1 Message Date
Andrew Tridgell a8a715d673 Tracker: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Peter Barker 3f7eb69327 Tracker: tighten type of result variable in handleMessage 2017-12-01 17:01:10 +00:00
Andrew Tridgell 958a665334 Tracker: don't disable compass on one bad reading
the compass can go back for a short time and recover

found by Michael
2017-11-28 09:02:24 +11:00
Peter Barker ca72b20e04 Tracker: correct sending of servo outputs 2017-11-27 14:26:00 +09:00
Peter Barker 33feeb1c11 Tracker: add support for SYS_STATUS sending, battery 2017-11-27 12:26:57 +09:00
Peter Barker 4e39496046 Tracker: support for units on fields 2017-11-23 10:40:30 +11:00
Peter Barker a6bda813f1 Tracker: use gps singleton for GCS functions 2017-11-15 13:43:03 +00:00
Peter Barker b59c272996 Tracker: call ins's periodic function 2017-10-27 16:33:45 +11:00
Lucas De Marchi bfd13dfe87 global: use static method to construct AP_AHRS_DCM 2017-09-26 03:01:21 +01:00
Lucas De Marchi beabae6a98 global: use static method to construct AP_AHRS_NavEKF 2017-09-26 03:01:21 +01:00
Lucas De Marchi c9fbf7b722 global: use static method to construct AP_NavEKF3 2017-09-26 03:01:21 +01:00
Lucas De Marchi e2fe36357a global: use static method to construct AP_NavEKF2 2017-09-26 03:01:21 +01:00
Lucas De Marchi 69b6d95cb2 global: use static method to construct AP_Board_Config{,_CAN} 2017-09-26 03:01:21 +01:00
Lucas De Marchi 72fd2d6f05 global: use static method to construct AP_SerialManager 2017-09-26 03:01:21 +01:00
Lucas De Marchi 40fd1b346c global: remove rangefinder from AP_AHRS_NavEKF
AP_AHRS_NavEKF doesn't use the rangefinder, it just delegates the
calls to the right estimator.

For libraries/AP_AHRS/examples/AHRS_Test/AHRS_Test.cpp the initialization
order has also been modified to match the order on vehicles. It's more
correct since it passes a reference when EKF2/EKF3 are already
constructed, while thos constructors use a pointer.  Ideally these
should be moved to an init() method though, or use a get_instance().
2017-09-26 03:01:21 +01:00
Lucas De Marchi 9027a55696 global: use static method to construct RangeFinder 2017-09-26 03:01:21 +01:00
Lucas De Marchi 53c82b4aaf global: use static method to construct DataFlash_Class 2017-09-26 03:01:21 +01:00
Lucas De Marchi 62ac0ab8aa global: use static method to construct AP_Notify 2017-09-26 03:01:21 +01:00
Lucas De Marchi de680dac5b global: use static method to construct AP_Scheduler 2017-09-26 03:01:21 +01:00
Lucas De Marchi 8094482f21 global: use static method to construct AP_GPS 2017-09-26 03:01:21 +01:00
Lucas De Marchi 87b30b4552 global: use static method to construct AP_InertialSensor 2017-09-26 03:01:21 +01:00
Lucas De Marchi c1a957fbf3 global: use static method to construct Compass 2017-09-26 03:01:21 +01:00
Lucas De Marchi 91feec0e14 global: use static method to construct AP_Baro 2017-09-26 03:01:21 +01:00
Lucas De Marchi 9db5d7991c AntennaTracker: protect version.h from inclusion and use ap_version.h 2017-09-23 21:37:45 -07:00
Lucas De Marchi efdc7daf96 AntennaTracker: do not include version.h/ap_version.h
The interface provided by each vehicle should be used to get the
version. The user of the macro has been converted to use that interface.
2017-09-23 21:37:45 -07:00
Lucas De Marchi ecd204c45c AntennaTracker: move version to a static member
We should never include version.h or ap_version.h headers directly
on a header since this will trigger a complete rebuild of the
codebase when we commit to the repository. The ap_version.h header
is auto-generated containing information from the current commit.

If we include it in a header, every other file that ends up including
that header (directly or indirectly) will need to be rebuilt. No
ccache's cache beats having to do nothing when the header is just
not included.

version.h contains information that is kept on a struct inside
each vehicle. Rather than using the macros from each vehicle,
the getter should be preferred, which returns an AP_FWVersion
referente.
2017-09-23 21:37:45 -07:00
Peter Barker c090818d5e Tracker: move handling of SET_GPS_GLOBAL_ORIGIN up 2017-09-19 15:44:23 +09:00
Randy Mackay d45eb33980 Tracker: support SET_GPS_GLOBAL_ORIGIN message 2017-09-19 10:30:15 +09:00
Peter Barker 962f237db4 Tracker: remove old DO_SET_MODE support
We no longer support setting modes except via custom modes
2017-09-19 01:24:11 +01:00
Peter Barker a2132f7b72 Tracker: handle param_request_list in GCS_MAVLINK base class 2017-08-30 15:54:47 +01:00
Peter Barker f60e4bcea2 Tracker: handle param_set in GCS_MAVLINK base class 2017-08-30 15:54:47 +01:00
Peter Barker 98f9e744b0 Tracker: move send_autopilot_request calls up to GCS base class 2017-08-30 15:54:46 +01:00
Peter Barker 0177e959c9 Tracker: add constant structure holding firmware version 2017-08-30 15:54:46 +01:00
Peter Barker 6f11c80f56 Tracker: add ArduSub to list of SYSID_SW_TYPE 2017-08-24 19:50:38 +09:00
Randy Mackay 813a8c8f99 Tracker: integrate simpler Log_Write_EKF 2017-08-23 11:19:14 +09:00
Peter Barker cdb6c083a3 Tracker: move serial_control case to base class 2017-08-17 12:42:31 +01:00
Peter Barker 947bae2f86 Tracker: use GCS_MAVLINK subclasses to handle set_mode 2017-08-16 11:58:10 +10:00
Michael du Breuil 105ebd6fb0 AntennaTracker: Reject MAV_CMD_DO_FLIGHTTERMINATION 2017-08-15 15:14:56 +01:00
Peter Barker 90948bef05 Tracker: remove CLI 2017-08-14 10:23:50 +09:00
Peter Barker f78d50215c Tracker: add new dummy function to avoid linking the AP_Camera 2017-08-09 16:18:22 +01:00
Peter Barker f27eeeff56 Tracker: send gps messages as separate queued messages 2017-08-09 16:18:22 +01:00
Peter Barker 7e5d90f446 Tracker: move sending of gps_raw up 2017-08-09 16:18:22 +01:00
Peter Barker 1532e30a5b Tracker: use new retry_deferred method 2017-08-05 23:14:27 +01:00
Peter Barker 33858187ef Tracker: move try_send_message queued_param_send up 2017-08-03 14:34:33 +01:00
Peter Barker e08b87763e Tracker: move try_send_message send_hwstatus up 2017-08-03 14:34:31 +01:00
Peter Barker de0c6d7ca5 Tracker: move try_send_message mission handling up 2017-08-03 14:33:31 +01:00
Peter Barker 5b4d968887 Tracker: move try_send_message compass message handling up 2017-08-03 14:24:47 +01:00
Peter Barker 4c11f07a02 Tracker: move common mavlink camera handling up 2017-07-28 14:32:58 +01:00
Peter Barker 4ed7f6a769 Tracker: move gps inject handling up to GCS_MAVLINK 2017-07-27 12:03:25 +01:00
Peter Barker d3c5369352 Tracker: handle common GPS messages in base GCS_MAVLINK class 2017-07-25 14:00:45 +01:00
Peter Barker c9c1f3ea29 Tracker: move starting of new logs into DataFlash 2017-07-19 16:37:28 +01:00
Peter Barker d9c4e1ad8e Tracker: remove MSG_STATUSTEXT entirely 2017-07-18 16:12:59 +01:00
Peter Barker 663d454119 Tracker: move handling of MAG_CAL command longs up 2017-07-17 14:17:19 +01:00
Peter Barker 8e289f1a47 Tracker: compilation fixes for ServoRelayEvents in superclass 2017-07-16 23:56:00 +01:00
Peter Barker 2136797770 Tracker: add common handling of mavlink command messages 2017-07-16 23:56:00 +01:00
Peter Barker cf50c43f75 Tracker: move rally-point handling up 2017-07-14 01:28:05 +01:00
Peter Barker abce338076 Tracker: move handling of incoming statutext messages up 2017-07-12 16:52:24 +01:00
Peter Barker 579a1da2c5 Tracker: eliminate global static GCS_MAVLINK::send_home_all 2017-07-11 23:48:39 +01:00
Peter Barker 4ec309222d Tracker: move common mission handling up to GCS_MAVLINK 2017-07-11 23:45:17 +01:00
Peter Barker 7865d467d3 Tracker: eliminate gcs_send_message wraper 2017-07-11 23:45:16 +01:00
Peter Barker 2039222c7e Tracker: use send_text method on the GCS singleton 2017-07-09 17:17:29 -04:00
Peter Barker f9eeaacd6c Tracker: use Notify singleton for sending statustext 2017-07-09 17:17:29 -04:00
Peter Barker b81e5a8562 Tracker: create GCS subclass, use inheritted methods 2017-07-07 16:18:37 +01:00
Eugene Shamaev b365a4ddf5 AntennaTracker: move of CAN parameters into separate group 2017-07-03 11:44:32 +01:00
Peter Barker b62a1394dd Tracker: indicate to gps library which bit indicates log-gps 2017-06-29 15:43:39 +01:00
Peter Barker ef72381708 Tracker: check dataflash to see if we should log backend gps messages 2017-06-29 15:43:38 +01:00
Peter Barker 075c40bd60 Tracker: move should_log check of log bitmask into DataFlash 2017-06-29 15:26:27 +01:00
Peter Barker c5df219a02 Tracker: handle knowledge of in_log_download in DataFlash 2017-06-27 03:10:43 +01:00
Peter Barker 6c2bfe08cd Tracker: move send-logs-via-mavlink code into DataFlash
Also, fix log download
2017-06-27 03:10:43 +01:00
Michael du Breuil a42c09d27a Tracker: Handle NAV_CONTROLLER_OUTPUT.wp_dist overflowing 2017-06-20 15:41:50 +01:00
Peter Barker 765a91c86b Tracker: move MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS handling up 2017-06-17 15:07:48 +01:00
Peter Barker 762d5a649d Tracker: tell dataflash we're arming or disarming 2017-06-16 17:07:48 +01:00
Peter Barker 31ac03368d Tracker: stop using in_mavlink_delay as a proxy for disabling logging 2017-06-16 17:07:48 +01:00
Peter Barker bf510221e0 Tracker: call dataflash should_log method 2017-06-16 17:07:48 +01:00
Peter Barker c1e07255b4 Tracker: simplify dataflash initialisation 2017-06-14 12:20:29 +01:00
Peter Barker 6d1f42d1c5 Tracker: unconditionally start unstarted logging 2017-06-11 20:34:12 +01:00
Peter Barker 76f7ad1252 Tracker: StartUnstartedLogging replaces logging_started/start_logging 2017-06-11 20:34:12 +01:00
Peter Barker 332e5059e2 Tracker: simplify should_log (NFC) 2017-06-11 20:34:12 +01:00
Peter Barker d365a91bae Tracker: eliminate calls to manipulate _writes_enabled 2017-06-11 20:34:12 +01:00
Michael du Breuil c4cd6bdf86 Tracker: Ignore landing message 2017-05-24 15:22:27 -07:00
Dr.-Ing. Amilcar Do Carmo Lucas e6a7adb9a6 AntennaTracker: Use SI units conventions in parameter units
Follow the rules from:
http://physics.nist.gov/cuu/Units/units.html
http://physics.nist.gov/cuu/Units/outside.html
and
http://physics.nist.gov/cuu/Units/checklist.html
one further constrain is that only printable (7bit) ASCII characters are allowed
2017-05-17 18:07:25 +10:00
Andrew Tridgell 1817974ce6 AntennaTracker: removed AP_Airspeed from vehicle code 2017-05-04 22:59:02 -07:00
Peter Barker f130b4a580 Tracker: move init of DataFlash references into vehicle init
This makes it look like the other vehicle types
2017-05-01 15:04:34 +01:00
Andrew Tridgell 005797c327 AntennaTracker: use common send_queued_parameters() 2017-05-01 14:36:10 +10:00
Andrew Tridgell f151fd3691 AntennaTracker: call BoardConfig.init_safety() at end of startup
this fixes a bug where motors can start on soft reboot
2017-04-30 21:47:04 +10:00
Andrew Tridgell c5d2b5b62e AntennaTracker: fixed duplicate include of AP_ADC library 2017-04-27 18:32:26 +10:00
Peter Barker 269c6c2fd9 Tracker: log GPS detection state to DF on log startup 2017-04-23 21:04:17 +01:00
Andrew Tridgell 03430c98d1 AntennaTracker: ignore MSG_AOA_SSA 2017-04-19 20:48:42 +10:00
Michael du Breuil 46790db751 AntennaTracker: Ignore BATTERY_STATUS message 2017-04-12 10:21:49 +09:00
Andrew Tridgell 70ab44a048 AntennaTracker: fix for mavlink update 2017-04-11 20:03:43 +01:00
Andre Kjellstrup 9e5d6ab1e9 removed redundant code 2017-04-04 14:01:37 -07:00
Randy Mackay 87df06c45f Tracker: update rangefinder declaration 2017-02-27 15:18:31 +09:00
Peter Barker 9e42014387 Tracker: not in log download upon log erase
erase is a synchronous operation
2017-02-13 11:36:16 +11:00
Peter Barker e12e51f502 Tracker: Support for a GCS singleton 2017-02-13 09:32:01 +11:00
Peter Barker 14470573f6 Tracker: 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 5012b2e899 AntennaTracker: rename MSG_RADIO_OUT to MSG_SERVO_OUTPUT_RAW to better describe what it is 2017-02-07 11:41:12 +11:00
Andrew Tridgell e12a1c4772 Tracker: fixed parameter path 2017-02-06 15:12:32 +11:00
murata 577d19f91d Tracker: Unify from print or println to printf. 2017-01-27 18:20:22 +11:00
Randy Mackay b67512aae9 Tracker: send text to notify 2017-01-23 15:07:21 -08:00
Randy Mackay a04cdce1bc Tracker: notify initialised after parameters loaded 2017-01-23 15:07:21 -08:00