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().
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.
new mode class member _desired_speed_final holds target speed at destination
main vehicle code passes heading to next waypoint into auto mode.
we do not provide heading when delaying at waypoint which signals we wish
auto-mode calculates final speed at destination which allows vehicle to
make turn within value of WP_OVERSHOOT parameter assuming vehicle turns at
maximum lateral acceleration.
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
set_guided_WP replaced by mode_guided.set_desired_location
nav_set_yaw_speed replaced with mode_guided.set_desired_heading_and_speed
set_guided_velocity replaced with mode_guided.set_desired_turn_rate_and_speed
guided_control structure replaced with mode_guided members
use_pivot_steering accepts yaw-error argument instead of calculating it itself internally
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
Previously the vehicle would pop out of pivot-steering once it was within PIVOT_TURN_ANGLE degrees of the target heading. This meant that it would give up on the pivot steer long before it was actually pointing at the target.
It is a very simply form of station keeping. If a boat is
loitering on a waypoint and it gets blown off a distance
past the WAYPOINT_RADIUS it will automaticlly drive back to
the waypoint.
Rover now accepts a new message MAV_CMD_NAV_SET_YAW_SPEED
which has an angle in centidegrees and a speed scale and the rover
will drive based on these inputs.
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.
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
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.
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
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.
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.
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.
* Retains ability to read from Analog Pin
* Adds ability to read RSSI from PWM channel value as is done in OpenLRSng, EazyUHF, and various other LRS.
* Handles any type of RSSI that provides RSSI values inverted - i.e. when the low value is the best signal and the high value is the worst signal.
* Has different key names from all existing RSSI parameters to provide for a clean break and easier distinguishing.
* Existing parameters are marked as obsolete
This commit changes the way libraries headers are included in source files:
- If the header is in the same directory the source belongs to, so the
notation '#include ""' is used with the path relative to the directory
containing the source.
- If the header is outside the directory containing the source, then we use
the notation '#include <>' with the path relative to libraries folder.
Some of the advantages of such approach:
- Only one search path for libraries headers.
- OSs like Windows may have a better lookup time.
Rover now honours the Param1 setting of a time in seconds for a
NAV_WAYPOINT and the Rover will loiter at that waypoint for that
period of time.
Note that as soon as the Rover reaches that waypoint the loiter timer
will start. If you enter a different mode during this time (HOLD for
instance) the timer resets. If you then switch back to AUTO
mode and the Rover returns to that waypoint it will wait for the
loiter time configured in param1.