Commit Graph

90 Commits

Author SHA1 Message Date
Peter Barker
31f796f0c5 Copter: remove unused scaleLongDown member 2019-02-15 11:45:13 +09:00
Peter Barker
b47733142f GLOBAL: rename DataFlash_Class to AP_Logger 2019-01-18 18:08:20 +11:00
Peter Barker
485cafb343 Copter: use AP_FWVersion singleton 2018-06-18 19:10:37 +01:00
Peter Barker
ba8b3e2415 Copter: create an AutoYaw helper object to hold auto-yaw state 2018-04-18 13:27:43 +09:00
Peter Barker
846506230d Copter: remove pointless initialisations
Also reduce storage size of gps primary
2018-02-22 17:51:35 +10:00
Peter Barker
bfc373aeff Copter: move logging of PM messages to AP_Scheduler 2018-02-13 17:15:05 +11:00
Peter Barker
80a3d63264 Copter: use AP_Scheduler's loop() function 2018-02-13 17:15:05 +11:00
Peter Barker
7f69c5d26d Copter: use scheduler ticks in place of mainloop_count 2018-02-13 17:15:05 +11:00
Peter Barker
996115c0d3 Copter: eliminate MAIN_LOOP_SECONDS macro 2018-01-20 15:35:58 +11:00
Peter Barker
6c82f7671d Copter: move all commands logic into AUTO flightmode 2017-12-14 14:08:01 +09:00
Andrew Tridgell
8ab0ac8a16 Copter: 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
Randy Mackay
2d23e1f7c7 Copter: rename flightmode_ objects to mode_ 2017-12-12 10:39:26 +09:00
Randy Mackay
ac8c2b3f03 Copter: resolve compiler warning from flight-mode declaration 2017-12-12 10:39:26 +09:00
Peter Barker
5d33cf08e1 Copter: eliminate calc_home_distance_and_bearing
Calling update_simple_mode_bearing calls get-heading
rather than the other way around

This will have the advantage of not calculating home bearing
when we stop calling update_simple_mode_bearing unnecesarily
2017-12-09 16:26:09 +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
9c60c1de58 Copter: FlightMode - convert SMARTRTL flight mode 2017-12-06 08:24:24 +09:00
Peter Barker
682f3c0e7e Copter: FlightMode - convert RTL 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
871ba5630f Copter: FlightMode - convert CIRCLE 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
Peter Barker
a95a35c134 Copter: FlightMode - convert STABILIZE flight mode 2017-12-06 08:24:24 +09:00
Lucas De Marchi
1263e20a0d ArduCopter: use static method to construct AC_InputManager 2017-09-26 03:01:21 +01:00
Lucas De Marchi
e21e02cfdb ArduCopter: use static method to construct AC_PrecLand 2017-09-26 03:01:21 +01:00
Lucas De Marchi
cf6ea9642e global: use static method to construct AP_Terrain 2017-09-26 03:01:21 +01:00
Lucas De Marchi
31db77e47b global: use static method to construct AP_Parachute 2017-09-26 03:01:21 +01:00
Lucas De Marchi
57bbb2e1d9 ArduCopter: use static method to construct AC_Sprayer 2017-09-26 03:01:21 +01:00
Lucas De Marchi
4f42facefc global: use static method to construct AC_Avoid 2017-09-26 03:01:21 +01:00
Lucas De Marchi
b05610870c global: use static method to construct AP_Rally 2017-09-26 03:01:21 +01:00
Lucas De Marchi
c6eb48009b global: use static method to construct AC_Fence 2017-09-26 03:01:21 +01:00
Lucas De Marchi
18aa88b329 global: use static method to construct AP_Mount 2017-09-26 03:01:21 +01:00
Lucas De Marchi
c3647f0185 global: use static method to construct AP_Camera 2017-09-26 03:01:21 +01:00
Lucas De Marchi
cc53e7bc4b global: use static method to construct AP_ServoRelayEvents 2017-09-26 03:01:21 +01:00
Lucas De Marchi
9ce6019138 global: use static method to construct AP_Frsky_Telem 2017-09-26 03:01:21 +01:00
Lucas De Marchi
b36a5919f5 global: use static method to construct AP_Mission
This also move the initialization to be in the header for those that
weren't already to maintain consistency.
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
cd5b018d82 ArduCopter: 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
Randy Mackay
44a436642b Copter: complete rename to SmartRTL
Also fix parameter description for CH7_OPT
2017-09-15 08:58:14 +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
squilter
ba0e08552f Copter: add SafeRTL flight mode 2017-09-09 14:05:41 +09:00
Peter Barker
470e790117 Copter: add constant structure holding firmware version 2017-08-30 15:54:46 +01:00
Peter Barker
89e6e70235 Copter: remove MAIN_LOOP_RATE in favour of parameter value 2017-08-29 08:41:07 +09: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
cfbde937c6 Copter: move should_log check of log bitmask into DataFlash 2017-06-29 15:26:27 +01:00
Shingo Matsuura
0800c6be52 Copter: add beacon object to avoidance object 2017-06-14 16:07:32 +09:00
Peter Barker
1d70a337dd Copter: remove unused desired_climb_rate variable 2017-03-09 19:52:58 +11: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
Peter Barker
a233024e05 Copter: fix compilation when fence andd proximity are disabled
This adds AC_AVOID_ENABLED; avoidance must be disabled if either
of fence or proximity are disabled.

Parameter definitions have been reordered to avoid compiler warnings;
this make sthe numbering non-linear
2017-01-03 10:44:03 +09:00
Pierre Kancir
3fc17a5ed5 Copter: avoid must be initialized after fence as it use it 2016-12-05 10:59:45 -08:00