Commit Graph

774 Commits

Author SHA1 Message Date
Michael Oborne 8816c5c681 ArduRover: support MAVLINK_MSG_ID_MISSION_ITEM_INT 2016-05-01 07:13:46 +10:00
Niti Rohilla 409a7e1c97 APMRover : Updated handle_guided_request() to report error. 2016-04-29 12:39:28 -03:00
Tom Pittenger 64315bfed8 Revert "APMRover2: clipped param cmd float to zero"
This reverts commit cbbee1149d.
2016-04-23 23:51:33 -07:00
Tom Pittenger cbbee1149d APMRover2: clipped param cmd float to zero 2016-04-23 23:45:48 -07:00
Randy Mackay 381b5c8f5d Rover: remove unnecessary abs 2016-04-23 23:06:19 -07:00
Luis Vale Gonçalves b8a1dfa066 Revising ardupilot.com to .org
Revising ardupilot.com to .org
2016-04-23 22:49:42 -07:00
Luis Vale Gonçalves 75ffc0618a Revising ardupilot.com to .org
Revising ardupilot.com to .org
2016-04-23 22:49:38 -07:00
Randy Mackay a5ed3c9b12 Rover: ack DO_MOUNT_CONTROL messages 2016-04-22 21:30:47 +09:00
Grant Morphett bd24dd79a8 Rover: Fixing up some of the outdated parameter comments/doco
I noticed the doco on the Rover discourse page for LOG_BITMASK was
incorrect so I have fixed up a number of doco/comments so they
auto-generate the doco correctly for the wiki.  There is no actual
code changes in this commit.
2016-04-21 14:12:00 +09:00
Ricardo de Almeida Gonzaga 5bd034a5a8 Global: start using cmath instead of math.h 2016-04-05 21:06:19 -07:00
Grant Morphett 2c4aaf7cb3 Rover: Commit for Rover release 3.0.0 2016-04-05 15:45:18 +10:00
Grant Morphett 801ced34a5 Rover: added the VIBRATION message which is sent to the GCS. 2016-04-05 15:41:53 +10:00
Grant Morphett 8e69b66cf0 Rover: added the VIBE logging to the Dataflash logs. 2016-04-05 15:41:53 +10:00
Saloni Jain ff74792fd4 Rover: MAV_CMD_DO_SET_HOME support in APMRover2 2016-04-05 15:40:33 +10:00
Gustavo Jose de Sousa a4c099feaa waf: create program groups for main products
Currently we need to build a different binary for each type of copter frame.
This is a preparation for setting all those binaries to a group called
"copter". We create the groups for the rest of the main products for
consistency.
2016-03-26 15:43:08 -03:00
Lucas De Marchi 56eccd6e41 APMrover2: Update path locations for parameters
Thanks to Francisco Ferreira for noticing that.
2016-03-23 17:50:38 -03:00
Don Gagne cae7ea0d13 Add @Volatile, @ReadOnly support 2016-03-17 10:58:05 +11:00
Lucas De Marchi dd8014dd2f APMrover2: replace header guard with pragma once 2016-03-16 18:40:44 +11:00
Michael du Breuil b6378e2827 Rover: Use arming voltage 2016-03-14 09:07:34 -07:00
Michael du Breuil 8ae6e0d613 Rover: remove "Command received" statustext 2016-03-10 15:36:05 +11:00
Randy Mackay 62435d3a11 Rover: use ahrs.get_origin instead of ekf.getOriginLLH
This ensures we get the origin from the active EKF
2016-03-03 16:20:56 +09:00
Lucas De Marchi e770cf059d APMRover2: initialize variable to fix build
Fix the following build error on clang:

../../APMrover2/test.cpp:164:4: fatal error: variable 'fail_test' is uninitialized when used here [-Wuninitialized]
   fail_test++;
   ^~~~~~~~~
../../APMrover2/test.cpp:139:19: note: initialize the variable 'fail_test' to silence this warning
 uint8_t fail_test;
                  ^
2016-03-01 10:25:28 -03:00
Tom Pittenger 0372b52378 Rover: 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:05 +11:00
Tom Pittenger c38bec6385 Rover: use set_dataflash() for static logging 2016-02-24 09:18:05 +11:00
Tom Pittenger 92fea608f3 Rover: add item_reached_msg to GUIDED 2016-02-14 16:12:56 -08:00
Andrew Tridgell 39b9ae7e91 APMrover2: log a picture if AP_Camera::control() returns true 2016-01-29 10:01:51 +11:00
Andrew Tridgell eed575886c APMrover2: update for changed AP_Camera API 2016-01-29 09:19:43 +11:00
Dario Lindo Andres f731a0dc53 APMrover2: Added precise camera trigger logging
included update_trigger function
added camera trigger precise time mark
detect camera feedback pin status
added support for TRIGGER MSG
corrected according to defines.h
2016-01-29 09:19:43 +11:00
Jonathan Challinger f1db10c337 APMrover2: reflect changes to AP_Mount 2016-01-23 10:35:45 +09:00
Gustavo Jose de Sousa c2e3f05dbf waf: ardupilotwaf: prefix build context methods with ap_
It helps to distinguish between things from waf and things from ardupilotwaf.
2016-01-22 20:10:29 -02:00
Gustavo Jose de Sousa e9d3dc9e72 waf: vehicles and antennatracker: use methods from bld
Instead of from ardupilotwaf.
2016-01-22 20:10:29 -02:00
Gustavo Jose de Sousa cf432e8b3e waf: ardupilotwaf: rename vehicle_stlib to ap_stlib
That function is not only for vehicles.
2016-01-22 20:10:28 -02:00
Gustavo Jose de Sousa a35c0d48b0 waf: ardupilotwaf: rename program to ap_program
Make the rename so that there is no name clashes when defining it as a taskgen
method.
2016-01-22 20:10:28 -02:00
Lucas De Marchi 7f04e0106e waf: change binary names
APMrover2 -> ardurover
AntennaTracker -> antennatracker
ArduCopter -> arducopter
ArduPlane -> arduplane
2016-01-18 16:56:08 -02:00
Gustavo Jose de Sousa 17e5d99509 waf: allow partial builds with new mavlink as submodule
The task generator for the mavlink headers is given a name 'mavlink' and is
added as a dependency to all local static libraries, because all of them use
sources that include mavlink headers. It would be nice to have a good way to
detect sources that use mavlink headers or to declare list of libraries that
use the headers, so that the dependency could be added automatically.

Additionally, there's a minor change in syntax for the task generator: using
strings directly instead of lists.
2016-01-15 07:28:48 +11:00
Tom Pittenger 4280dacced Rover: add xtrack_error to DF log 2016-01-08 20:16:25 +11:00
Andrew Tridgell be456fc33d Rover: always call load_all
this ensures defaults file works on first start after erase
2016-01-07 09:33:04 +11:00
Andrew Tridgell bd272390bc Rover: support up to 14 input channels on all boards 2016-01-04 08:23:04 +11:00
pepevalbe b4c02d8cd7 Rover: added group parameter for AP_Notify library 2015-12-31 11:33:11 +09:00
Siddharth Bharat Purohit 53d3e7dc61 Rover: wire up accel calibrator for Rover 2015-12-29 10:46:35 -08:00
Lucas De Marchi a096703b06 Global: don't link with AP_Progmem
AP_Progmem is not used anymore.
2015-12-27 15:58:12 -02:00
Andrew Tridgell 7daab1ee62 Rover: convert to Hz based task table 2015-12-27 14:57:24 +09:00
Andrew Tridgell c94b30b7bc Rover: fixed flymaple build 2015-12-22 11:35:31 +11:00
Andre Kjellstrup 80f19aefc7 APMrover2: Camera options for better camera control
All on one because they would not pass autotest if split up.
2015-12-18 18:16:11 +11:00
Jonathan Challinger 6c4f070685 Rover: reflect renamed function in AP_AHRS 2015-12-18 18:08:37 +11:00
Julien BERAUD c28a71ec63 Rover: Update Optical Flow declaration
Pass ahrs as param
2015-12-18 17:56:06 +11:00
Gustavo Jose de Sousa dc81a2410e waf: use single entry point for make wrappers 2015-12-10 10:40:34 +09:00
Tom Pittenger e6cf86801d APMrover2: compiler warning - float to double promotion for print 2015-12-07 15:50:05 +09:00
DonLakeFlyer 0950c97866 Rover: return success or failure of get home position 2015-12-07 12:33:18 +09:00
Lucas De Marchi 767f126eaa APMrover2: remove unused AP_ADC_AnalogSource 2015-12-03 13:32:44 +11:00
Peter Barker fb197c9255 Rover: DataFlash-over-MAVLink support 2015-12-03 13:21:52 +11:00
Peter Barker 5d46a9add0 Rover: support multiple simultaneous backends 2015-12-03 13:21:51 +11:00
Gustavo Jose de Sousa 7837bbfd81 waf: add a make wrappers 2015-12-03 07:54:32 +11:00
Gustavo Jose de Sousa bf7b08f9fa waf: add missing AP_Arming library to APMrover2 2015-12-03 07:54:32 +11:00
Caio Marcelo de Oliveira Filho 6e7b73610d waf: add waf support 2015-12-03 07:54:30 +11:00
Lucas De Marchi 2591261af6 Global: rename min and max macros to uppercase
The problem with using min() and max() is that they conflict with some
C++ headers. Name the macros in uppercase instead. We may go case by
case later converting them to be typesafe.

Changes generated with:

	git ls-files '*.cpp' '*.h' -z | xargs -0 sed -i 's/\([^_[:alnum:]]\)max(/\1MAX(/g'
	git ls-files '*.cpp' '*.h' -z | xargs -0 sed -i 's/\([^_[:alnum:]]\)min(/\1MIN(/g'
2015-12-01 16:28:09 -02:00
Luis Vale Gonçalves 999e99c6f3 Rover: revise text messages
Text revisions on Rover. Uniformization on messages severity.
2015-11-25 20:50:00 +09:00
Caio Marcelo de Oliveira Filho ee073787c8 Rover: use millis/micros/panic functions
Instead of going through 'hal' then 'scheduler', use directly the AP_HAL
functions. Besides removing indirection that is not necessary for such
functions, this patch ends up reducing the code size in the call sites.

For example, building ArduCopter for PX4 with this change (compared to
before introduction of the functions) yields almost 3k bytes of code
size.

    # ArduCopter build before the functions (1b29a1af46)
       text	   data	    bss	    dec	    hex	filename
     895264	   2812	  62732	 960808	  ea928	/.../px4fmu-v2_APM.build/firmware.elf

    # ArduCopter build after this patch
       text	   data	    bss	    dec	    hex	filename
     892264	   2812	  62732	 957808	  e9d70	/.../px4fmu-v2_APM.build/firmware.elf

A later patch will remove the unused functions in the Schedulers.
2015-11-20 12:26:14 +09:00
Andrew Tridgell 8f4ce7f20b build: removed all nocore.inoflag files
these were APM2 specific
2015-11-16 08:05:17 +11:00
Grant Morphett 039ea59d7e Rover: Whitespace/formatting change ONLY for Steering.cpp 2015-11-11 13:39:39 +11:00
Grant Morphett bbbbd07935 Rover: GPS fix to ensure we only look at new GPS messages 2015-11-11 13:39:39 +11:00
Grant Morphett e81973cd29 Rover: motor_active method similar to the plane is_flying but simpler 2015-11-11 13:39:39 +11:00
Grant Morphett 3636b53313 Rover: Implementation of the ARMING functionality 2015-11-11 13:39:38 +11:00
Grant Morphett 2d1745ab6a Rover: Implemented the HOME state update from Plane 2015-11-11 13:39:38 +11:00
lvale a64689600f Rover: text message severity uniformization
Global revision of message severity values.

Required also change to the low priority function gcs_send_text_fmt()
on GCS_Mavlink.cpp to disable the automatic setting of priority on
messages sent by this function
2015-11-05 12:33:56 +09:00
Lucas De Marchi b76f498799 APMrover2: don't use avr include dir for tags 2015-11-04 12:14:16 +11:00
Lucas De Marchi 91dbfce5f9 APMrover2: remove check for MAVLINK_COMM_NUM_BUFFERS 2015-11-04 12:14:15 +11:00
Lucas De Marchi 1a084e5dcd APMrover2: 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:14 +11:00
Lucas De Marchi 45ba94343d APMrover2: remove checks for HAL_BOARD_APM2 and HAL_BOARD_APM1 2015-11-04 12:14:13 +11:00
Lucas De Marchi 79230bc68d APMrover2: fix passing AP_Float to printf
Call get() to return the contained float value.
2015-10-30 14:35:46 +09:00
Lucas De Marchi c3fe71a0d5 APMrover2: fix wrong printf format for printf
"%S" is used for wide string, but we are passing a char*. Use lowercase
in this case to remove warnings like this:

libraries/AP_InertialSensor/AP_InertialSensor.cpp: In member function
'bool AP_InertialSensor::calibrate_accel(AP_InertialSensor_UserInteract*, float&, float&)':
libraries/AP_InertialSensor/AP_InertialSensor.cpp:620:61: warning:
format '%S' expects argument of type 'wchar_t*', but argument 3 has type 'const char*' [-Wformat=]
                 "Place vehicle %S and press any key.\n", msg);
                                                             ^
2015-10-30 14:35:44 +09:00
Lucas De Marchi b02661b478 APMrover2: fix wrong printf format for 32 bits
Heading is a 32 bits value, so use %d.
2015-10-30 14:35:39 +09:00
Lucas De Marchi 5244559010 Minimize AP_Progmem.h includes
Most of AP_Progmem is already gone so we can stop including it in most
of the places. The only places that need it are the ones using
pgm_read_*() APIs.

In some cases the header needed to be added in the .cpp since it was
removed from the .h to reduce scope. In those cases the headers were
also reordered.
2015-10-30 14:35:32 +09: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 4ab9821624 Replace use of Log_Write_Message_P() with Log_Write_Message() 2015-10-30 14:35:28 +09:00
Lucas De Marchi 20c6ffc5e3 Replace use of UARTDriver::printf_P() with UARTDriver::printf()
This also starts to show warnings on places that were already using
wrong printf format strings.
2015-10-30 14:35:25 +09:00
Lucas De Marchi 6f4904189b Replace use of println_P() with println() 2015-10-30 14:35:22 +09:00
Lucas De Marchi a964ac38ec Replace use of print_P() with print() 2015-10-30 14:35:21 +09:00
Lucas De Marchi ee72254ff9 APMrover2: remove undefined function from header 2015-10-30 14:35:20 +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 6f0db45b57 Replace use of strcasecmp_P() with strcasecmp() 2015-10-30 14:35:08 +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
Caio Marcelo de Oliveira Filho bad68829ae APMrover2: include SITL only for SITL board
Include board-specific files only when the board is used. Since these
should be exceptional cases, let the includer handle the ifdef instead
of putting ifdefs in every platform-specific header.

In the future we should evaluate whether the HAL for the board should
instantiate this.
2015-10-22 13:36:14 -02:00
Caio Marcelo de Oliveira Filho 49a42dc985 SITL: use a SITL namespace 2015-10-22 11:04:42 -02:00
Peter Barker 5db4549d79 Rover: use simple log entry numbers to download logs 2015-10-21 10:50:32 +11:00
Caio Marcelo de Oliveira Filho 06b2c966c1 APMrover2: implement HAL::Callbacks
Also removes includes for each board since they are not necessary
anymore.
2015-10-21 09:16:09 +11:00
Caio Marcelo de Oliveira Filho ec52df991c build: compile only the HAL files needed by the board
Instead of requiring every program to specify the HAL related modules,
let the build system do it (in practice everything we compiled depended
on HAL anyway). This allow including only the necessary files in the
compilation.
2015-10-21 09:16:07 +11:00
Caio Marcelo de Oliveira Filho 2e464a53c2 AP_HAL: make code not depend on concrete HAL implementations
The switching between different AP_HAL was happening by giving different
definitions of AP_HAL_BOARD_DRIVER, and the programs would use it to
instantiate.

A program or library code would have to explicitly include (and depend)
on the concrete implementation of the HAL, even when using it only via
interface.

The proposed change move this dependency to be link time. There is a
AP_HAL::get_HAL() function that is used by the client code. Each
implementation of HAL provides its own definition of this function,
returning the appropriate concrete instance.

Since this replaces the job of AP_HAL_BOARD_DRIVER, the definition was
removed.

The static variables for PX4 and VRBRAIN were named differently to avoid
shadowing the extern symbol 'hal'.
2015-10-21 09:16:07 +11:00
Gustavo Jose de Sousa 7c725bb59e APMrover2: use compass get_{field,offsets}() functions
Both functions are equivalent, so we're going to simply use
get_{field,offsets}() instead of get_{field,offsets}_milligauss().
2015-10-15 19:56:04 +09:00
Grant Morphett 461eff25d5 Rover: Fixed a build issue on Windows with the new RPM library
The AP_RPM library needed to be added to make.inc for the sitl build
to work correctly on Windows.  Thanks to Zach for solving the issue
in this discussion
http://diydrones.com/group/ardurover-user-group/forum/topics/rover-sitl-build-failed?commentId=705844%3AComment%3A2109049&xg_source=msg_com_gr_forum
2015-10-11 16:00:58 +09:00
Randy Mackay 93b0dd4d61 Rover: add no break comment to avoid compiler warning 2015-10-03 12:56:26 +09:00
Randy Mackay 836fff2119 Rover: send home position when home is set or get-home msg received 2015-10-03 12:56:21 +09:00
Andrew Tridgell 64410b10fb Rover: use ahrs.send_ekf_status_report() 2015-09-29 10:59:28 +10:00
Andrew Tridgell 5cac948ed0 Rover: added EK2_ parameters and EKF2 instance 2015-09-23 11:56:27 +10:00
Randy Mackay bcc87a9a3b Rover: replace SKIP_GYRO_CAL with INS_GYR_CAL
Also calibrate gyros during accel trim
2015-09-21 17:06:45 +09:00
Andrew Tridgell 42ed989da0 Rover: log mode in dataflash callback
this ensures every log has the initial mode
2015-09-17 20:14:35 +10:00
Stewart Loving-Gibbard 2c62a3a1c5 Rover: Adding Logging of RSSI data. 2015-09-16 16:41:48 +09:00