Commit Graph

742 Commits

Author SHA1 Message Date
Andrew Tridgell 7c27e0dbec APMrover2: handle SETUP_SIGNING message 2016-05-21 15:25:12 +10:00
Don Gagne 4743a34cf7 APMrover2: SET_SENSORS_OFFSETS support for third compass 2016-05-19 18:51:17 -03:00
Allan Matthew 1f4ba62456 Rover: handle new MAVLink rangefinder input 2016-05-19 16:21:28 +09:00
Andrew Tridgell 7957f25f32 Rover: cleanup unnecessarily complex gcs[] usage 2016-05-17 08:27:28 +10:00
Lucas De Marchi 368a72044c APMrover2: fix indentation leading to compiler warning
GCC 6 has a new warning about misleading indentation:

../../APMrover2/system.cpp: In member function ‘void Rover::set_mode(mode)’:
../../APMrover2/system.cpp:272:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
     if (control_mode == AUTO)
     ^~
../../APMrover2/system.cpp:275:2: note: ...this statement, but the^Bn latter is misleadingly indented as if it is guarded by the ‘if’
  control_mode = mode;
  ^~~~~~~~~~~~

The issue here is that we are mixing tabs and spaces. Remove tabs and re-indent
the code.
2016-05-16 17:35:58 -03:00
Ricardo de Almeida Gonzaga 63f2ab38dd APMrover2: Fix typos 2016-05-13 19:20:07 -03:00
dgrat 41661f815f AP_Math: Replace the pythagorous* functions with a variadic template
The new function can deal with a variable number of function parameters.
Additionally, I renamed the functions to norm(), because this is the
standard name used in several other projects.
2016-05-10 11:41:26 -03:00
dgrat 76362caee0 AP_Math: Replace wrap_* functions with template versions 2016-05-10 11:41:26 -03:00
skyscraper 8c9e55edfa APMRover2: 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
Andrew Tridgell c0172516af Rover: use DataFlash::log_while_disarmed() 2016-05-09 12:06:00 +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
Lucas De Marchi 668ebf160e APMrover2: remove mention to .pde files
We don't support them anymore.
2016-05-07 22:55:48 -03:00
Andrew Tridgell efe3e19a51 Rover: fixed for changed API 2016-05-07 18:27:22 +10:00
Andrew Tridgell ac4da762d1 Rover: adjust for changed logging APIs 2016-05-07 18:27:18 +10:00
Lucas De Marchi fea084a596 Global: use ap_version.h
This header is used by waf to contain the generated version macros,
particularly using the git hash. For waf it's better to be in a separate
header since it then can keep track of changes on it a trigger
recompilation.

For the make build system, a dummy ap_version.h file has been added in
the missing/ folder so both implementations can co-exist.
2016-05-06 13:11:28 -03:00
Lucas De Marchi d3ee998fa6 APMrover2: 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
Grant Morphett 384ad94e73 Rover: Fixing the 3.0.0 release notes.
You can always disarm in Rover - there is no ARMING_RUDDER parameter.
2016-05-02 10:58:38 +09:00
Michael du Breuil b327ed671b Rover: Ignore MSG_POSITION_TARGET_GLOBAL_INT for now 2016-05-01 07:38:23 +10:00
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