Commit Graph

82 Commits

Author SHA1 Message Date
Randy Mackay 7a37a7f921 Rover: integrate simpler Log_Write_EKF 2017-08-23 11:19:14 +09:00
khancyr 2ceb29e9da Rover: use abs for int within calc_speed_nudge
same issue resoled for log-write-nav-tuning
2017-08-17 09:46:56 +09:00
Peter Barker 4c2747bfe8 Rover: use rangefinder backend accessors 2017-08-15 18:30:45 +01:00
Randy Mackay d99108f3bc Rover: use AR_AttitudeControl for throttle control
also direct throttle nudge replaced with speed nudge
calc_speed_max estimates vehicle's top speed based on cruise-speed and
cruise-throttle
steering mode now provides total target speed instead of using speed plug
throttle nudge
motor limits provided to attitude control to stop i-term buildup
uses negative desired speed instead of reversed flag
reporting to GCS uses new throttle controller
braking is simply enabled and allows a reverse motor output regardless of vehicle
speed
2017-08-15 20:47:19 +09:00
Randy Mackay 9097269d6d Rover: use AR_AttitudeControl for steering control 2017-08-15 20:47:19 +09:00
Peter Barker fa2b500e93 Rover: remove CLI 2017-08-14 10:23:50 +09:00
khancyr 7c3374668e Rover: formatting fixes and const local variables 2017-08-05 17:05:00 +09:00
Randy Mackay 783f8243df Rover: use mode class's get_distance_to_destination and speed_error
used for reporting to GCS and logging
2017-08-05 11:20:58 +09:00
khancyr 23532bf45c Rover: add reason to set_mode 2017-07-31 18:01:17 +09:00
khancyr 707b006f76 Rover: minor style correction on log 2017-07-21 10:13:20 +09:00
Peter Barker 07f4603533 Rover: integrate mode class 2017-07-21 10:13:20 +09:00
Peter Barker 9173c7caaf Rover: move starting of new logs into DataFlash 2017-07-19 16:37:28 +01:00
Peter Barker c9c1f3ea29 Tracker: move starting of new logs into DataFlash 2017-07-19 16:37:28 +01:00
khancyr 40b860e240 Rover: rename sonar to rangefinder 2017-07-14 17:40:05 +01:00
Randy Mackay ebbbe0584a Rover: integrate wheel encoder 2017-07-14 07:27:26 +09:00
Pierre Kancir 267a1532b9 Rover: integrate motors library
move throttle_slew_limit and THR_SLEWRATE parameter
move have_skid_steering to library
move mix_skid_steering to library's output_skid_steering method
move radio.cpp's output channel initialisation to motor's init method
use motors.get_throttle and get_steering instead of getting from Servo objects
use motors.set_throttle and set_steering instead of setting to Servo object
AP_Arming::arming_required is replaced with SAFE_DISARM parameter
2017-07-08 16:07:13 +09:00
Peter Barker cfeb449979 Rover: create GCS subclass, use inheritted methods 2017-07-07 16:18:37 +01:00
Andrew Tridgell d060fd2826 Rover: replace get_output_norm*100 for throttle with get_output_scaled
No functional change
2017-06-21 10:30:39 +09:00
Peter Barker aeacc11573 APMrover2: stop using in_mavlink_delay as a proxy for disabling logging 2017-06-16 17:07:48 +01:00
Peter Barker 8c074c7b73 Rover: simplify dataflash initialisation 2017-06-14 12:20:29 +01:00
Peter Barker 81b19204c3 Rover: StartUnstartedLogging replaces logging_started/start_logging 2017-06-11 20:34:12 +01:00
Peter Barker 74e0d6c60a Rover: move init of DataFlash references into vehicle init
It is possible to start a log before the existing codepath is crossed.
2017-05-01 15:04:34 +01:00
karthik.desai 47ff9ddeec Rover: Added Beacon implementation
Enabled beacon parameters
beacon updates at 50hz
Use dataflash library to log AP_Beacon msg
2017-04-26 11:59:11 +09:00
Pierre Kancir 2eb0ed6242 APMRover2: Remove, correct some cast 2017-04-26 08:43:09 +10:00
Pierre Kancir 20cc336885 APMRover2: const correctness 2017-04-26 08:43:09 +10:00
Pierre Kancir c41e695c98 APMRover2: correct some style 2017-04-26 08:43:09 +10:00
Pierre Kancir b634fe548d APMRover2: Use c++ cast 2017-04-26 08:43:09 +10:00
Peter Barker d0f2e7bf3a Rover: log GPS detection state to DF on log startup 2017-04-23 21:04:17 +01:00
Andrew Tridgell 9cbfc4ddd3 Rover: add available memory to PM message 2017-03-27 14:35:21 +09:00
Andrew Tridgell 3a7c541145 Rover: log home and origin on logging start 2017-03-14 10:51:15 +11:00
Peter Barker 407e251e1d Rover: rename gcs[] to gcs_chan[]
Wish to use gcs() to return the gcs singleton
2017-02-13 09:32:01 +11:00
murata 0c813c5afa Rover: Unify from print or println to printf. 2017-01-27 18:20:22 +11:00
Andrew Tridgell 93d6b012c2 Rover: convert to new SRV_Channel API 2017-01-12 17:39:37 +11:00
Peter Barker 12d0241e51 Rover: fix compile when logging disabled 2017-01-03 08:51:50 +11:00
Pierre Kancir 5858c84f83 Rover: Log.cpp correct whitespace, remove tabs 2016-12-30 09:20:24 +09:00
Andrew Tridgell 0266cb61e0 Rover: fixed EKF3 logging 2016-12-19 08:07:14 +11:00
Pierre Kancir dec954bb0c Rover: added crash check 2016-12-07 12:46:02 +11:00
Randy Mackay bdfae696ae Rover: remove call to EKF1 logging 2016-11-30 17:57:03 +09:00
Peter Barker 09f16fbe79 Rover: do not reset LOG_BITMASK when no CardInserted 2016-11-29 15:14:09 -08:00
Peter Barker 3a095f00f1 Rover: check CardInserted in AP_Arming 2016-11-29 15:14:09 -08:00
Grant Morphett 515ceb3ccd Rover: Added logging of the guided commands 2016-11-28 12:00:03 +11:00
murata bbf0cfb564 APMrover2: Change from printf statement to print, println statement. 2016-11-25 16:00:30 -08: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
Lucas De Marchi 3223a1a542 APMrover2: 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
Tom Pittenger 098e531d53 Rover: do not log CURR.Throttle because it's already logged elsewhere 2016-06-02 16:59:08 -07:00
Andrew Tridgell cfaacf031b Rover: use ahrs.groundspeed() in more places 2016-05-31 21:23:01 +10:00
Grant Morphett 35a132f74e Rover: Added throttle PID logging 2016-05-31 08:44:52 +10: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
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
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