Copter-4.2.0-beta1 available for beta testing!

Copter-4.2.0-beta1 has been released for beta testing and can be loaded using MP, QGC or downloaded directly from firmware.ardupilot.org.

The changes vs 4.1.5 are in the ReleaseNotes and also copied below:

Copter 4.2.0-beta1 28-Feb-2022
Changes from 4.1.5

  1. AHRS/EKF improvements
    a) EKF startup messages reduced
    b) GPS<->Opticalflow automatic switching improved (see ahrs-source-gps-optflow.lua script)
    c) LORD Microstrain CX5/GX5 external AHRS support
    d) ModalAI VOXL non-GPS system supported (set VISO_TYPE=3, uses ODOMETRY mavlink msg)
  2. Control and flight mode enhancements
    a) Acro max rate params renamed and improved (see ACRO_RP_RATE, ACRO_Y_RATE, PILOT_Y_RATE, PILOT_Y_EXPO)
    b) Airmode NOT enabled when arming with switch (see ACRO_OPTIONS and ā€œArmDisarm with AirModeā€ RCx_OPTION)
    c) Auto and Guided support pausing (uses DO_PAUSE_CONTINUE mavlink command)
    d) Auto supports up to 100 DO_JUMP commands on high memory boards
    e) Autotune reporting improved (less spam, prints final tune)
    f) FLIGHT_OPTIONS to release gripper on thrust loss
    g) ForceFlying auxiliary switch allows pilot to disable land-detector
    h) Guided mode acceleration target support
    i) Guided mode logging of targets improved (GUID msg split into GUIP, GUIA)
    j) Harmonic notch filter on more than four motors
    k) Land mode pilot controlled repositioning max speed reduced (also affects RTL and Auto)
    l) Precision landing improvements esp when using PLAND_EST_TYPE = 1/KalmanFilter
    m) RTLā€™s safe altitude (RTL_ALT) increased 85km (was 325m)
    n) Simple mode heading reset via auxiliary switch
    o) Sport mode deprecated
    p) SURFTRAK_MODE allows disabling surface tracking in Loiter, AltHold, etc
    q) Turtle mode (allows righting a copter while on the ground)
  3. Custom build server support (see https://custom.ardupilot.org)
  4. Lua scripting improvements
    a) ahrs::get_location replaces get_position (get_position still works for now)
    b) Auto support for NAV_SCRIPT_TIME commands (Lua within Auto)
    c) Frame string support (allows scripting based frame to display custom description after startup)
    d) Parameter support (no need to always use SCR_USERx)
    e) Servo output control by channel number (previously was only possibly by specifying the SERVOn_FUNCTION value)
    f) Script logged to onboard log (can be disabled by setting SCR_DEBUG_OPTS)
  5. New autopilots supported
    a) AirLink
    b) BeastF7v2, BeastH7v2
    c) JHEMCU GSF405A
    d) KakuteH7, KakuteH7Mini
    e) MambaF405US-I2C
    f) MatekF405-TE
    g) ModalAI fc-v1
    h) PixC4-Jetson
    i) Pixhawk5X
    j) QioTekZealotH743
    k) RPI-Zero2W
    l) SPRacingH7 Extreme
    m) Swan-K1
  6. Safety improvements
    a) Dijkstraā€™s avoidance performance improvements including converting to A*
    b) Motor PWM range always uses MOT_PWM_MIN/MAX (if these are not set, they are defaulted to RC3_MIN/MAX values)
    c) Parachute option to leave servo in open position (see CHUTE_OPTIONS parameter)
    d) Parachute released arming check added
    e) Pre-arm check of IMU heater temp
    f) Pre-arm check of rangefinder health
    g) Pre-arm check of throttle position skipped if PILOT_THR_BHV is ā€œFeedback from mid stickā€
  7. Sensor driver enhancements
    a) ADIS16470, ADIS16507 and BMI270 IMU support
    b) Airspeed sensor support (reporting only, not used for estimation or control)
    c) AK09918 compass support
    d) Battery monitor supports voltage offset (see BATTx_VLT_OFFSET)
    e) Benewake TFMiniPlus I2C address defaults correctly
    f) Buzzer can be connected to any GPIO on any board
    g) Compass calibration (in-flight) uses GSF for better accuracy
    h) CRSFv3 support, CSRF telemetry link reports link quality in RSSI
    i) Cybot D1 Lidar
    j) DroneCan (aka UAVCAN) battery monitors support scaling (see BATTx_CURR_MULT)
    k) DroneCan (aka UAVCAN) GPS-for-yaw support
    l) Electronic Fuel Injection support incl Lutan EFI
    m) FETtecOneWire resyncs if EMI causes lost bytes
    n) IMU heater params renamed to BRD_HEAT_xxx
    o) Landing gear enable parameter added (see LGR_ENABLE)
    p) Lightware SF40C ver 0.9 support removed (ver 1.0 and higher still supported)
    q) Maxbotix serial sonar driver support RNGFNDx_SCALING parameter to support for varieties of sensor
    r) MPPT solar charge controller support
    s) MTK GPS driver removed
    t) Optical flow in-flight calibration
    u) Ping200x support
    v) Proximity sensor min and max range (see PRX_MIN, PRX_MAX)
    w) QSPI external flash support
    x) uLanding (aka USD1) radar provides average of last few samples
    y) Unicore NMEA GPS support for yaw and 3D velocity
  8. TradHeli enhancements
    a) Attitude control default gains improved
    - ATC_RAT_RLL_FF, _I, _IMAX, _ILMI, _FLTT
    - ATC_RAT_PIT_FF, _I, _IMAX, _ILMI, _FLTT
    - ATC_RAT_YAW_IMAX, _FLTT
    b) AutoTune mode
    c) Collective setup (users will be forced to setup new collective parameters)
    d) Rotor Speed Controller Internal Governor improvements (users required to retune governor)
    e) Rotor Speed Controller Cooldown timer added for ICE and turbine engines
    f) _VFF params renamed to _FF
  9. Other System enhancements
    a) Board ID sent in AUTOPILOT_VERSION mavlink message
    b) Compass calibration stick gestures removed
    c) DO_SET_CAM_TRIG_DIST supports instantly triggering camera
    d) DJI FPV OSD multi screen and stats support
    e) GPIO pins configured by setting SERVOx_FUNCTION to -1 (also see SERVO_GPIO_MASK. BRD_PWM_COUNT removed)
    f) GPIO pin support on main outputs on boards with IOMCU
    g) GyroFlow logging (see LOG_BITMASKā€™s ā€œVideoStabilizationā€ option)
    h) Firmware version logged in VER message
    i) SD card format via MAVLink
    j) Serial port option to disable changes to stream rate (see SERIALx_OPTIONS)
    k) VIBE logging units to m/s/s
  10. Bug fixes
    a) Auto and Guided mode takeoff alt fixed if taking off from below home or frame set to absolute (aka AMSL)
    b) Auto mode CONDITION_YAW command completion fix
    c) Auto mode infinite loop with nav commands that fail to start fixed
    d) AutoTune disables ATC_RAT_xxx_SMAX during twitch (SMAX may limit gains to reduce oscillation)
    e) BLHeli passthrough reliability improvements
    f) Compass learning (inflight) fixed to ignore unused compasses (e.g. those with COMPASS_USE = 0)
    g) EKF optical flow terrain alt reset fixed (large changes in rangefinder alt might never be fused)
    h) EKF resets due to bad IMU data occur at most once per second
    i) GPIO pin fix on CubeOrange, F4BY, mRoControlZeroF7, R9Pilot
    j) Guided mode yaw rate timeout fix (vehicle could keep yawing even if companion computer stopped sending target)
    k) MAVlink2 serial ports always send MAVLink2 messages (previously waited until other side sent MAVLink2)
    l) Motor Test, Turtle mode respect emergency stop switch
    m) Omnibusf4pro bi-directional dshot fix
    n) PosHold braking fix if SCHED_LOOP_RATE set to non-default value
    o) Precision landing in RTL activates even if pilot had earlier deactivated by repositioning in Land
    p) Real-Time-Clock (RTC) oldest possible date updated to Jan-2022
    q) Tricopter, Coax copter fin trim fix when using DShot/BLheli

A good number of developers have been flying 4.2 and it seems fine but this is the first beta of this major release so please be careful while testing and report any issues below or in a new topic.

Thanks for your help!

8 Likes

thank you every one the teams been very busy

1 Like

Thank you for a great release.

Hoped to see some change altitude during auto or guided as discussed in other thread. Is this feature ever coming? Very useful for people that need precise altitude flight for work.

@Corrado_Steri,

Txs. Yes, the alt change during guided and auto is definitely coming at some point but I donā€™t think itā€™ll make it into 4.2.

Thank you, that would be huge!!!

1 Like

Hey @rmackay9
Tried GPS for yaw with DroneCAN. It doesnā€™t work. I can see moving baseline data on DroneCAN Inspector but Autopilot side I donā€™t get GPS fix. Stays in No FIX even when I can see GPS fix in DroneCAN inspector. I have been trying to get this working on master too. No luck!
@tridge Were you able to test this?
Thank you!

1 Like

@rmackay9 there is a typo here. Should be:

a) Acro max rate params renamed and improved (see ACRO_RP_RATE, ACRO_RP_EXPO, PILOT_Y_RATE, PILOT_Y_EXPO)

I think perhaps mentioning the change to expo is a good idea, something like ā€œexpo curve replaced with super-rate expo which gives sharper response at the edgesā€. Itā€™s worth mentioning because this is a pilot change, although the parameters will be upgraded the expo will feel different when flying.

@Mallikarjun_SE,

Txs for the report, Iā€™ve added it to the 4.2 issues list.

1 Like

@rmackay9 4.2-beta1 seems to have introduced an issue for me with ESC initialisation.

The second set of ESC start-up beeps all happen at random times, sometimes several seconds apart. Everything seems OK after that, but this is reproducible for me every boot.
Iā€™ve rolled back to 4.1 and the issue goes away.

This build this is a clone of @andypiperā€™s 7" Chimera build from his blog.
(Lumenier Lux H743 FC with T-Motor F55A esc BLHeli32 32.8)

@juzzle1 the same as you is happening for me with master (now 4.3 dev), I haventā€™t use yet Copter-4.2.0-beta1. With 4.1.5 never happened.

Looks like itā€™s this change:

Author: Andy Piper <github@andypiper.com>
Date:   Thu Feb 10 14:41:44 2022 +0000

    AP_HAL: add support for @SYS/timers.txt

    move prescaler calculation here and add unit test
    add ability to find closest matching frequency in prescaler calculation
    account for bit widths in prescaler tests

@andyp1per that seems to have fixed it for me thanks! :slight_smile:

@Mallikarjun_SE,

@tridge has created a PR that probably resolves this issue. Do you think you could give it a try? Iā€™m happy to provide a binary if you tell me which board youā€™re using.

@Mallikarjun_SE you need my PR plus you need to set
define GPS_MOVING_BASELINE 1
in your peripheral hwdef.dat

@rmackay9 @tridge The PR works.
For anyone else who are testing, these are the parameters.
GPS_TYPE= 22 (DroneCAN-MovingBaseline-Base)
GPS_TYPE2= 23 (DroneCAN-MovingBaseline-Rover)
GPS_AUTO_CONFIG= 2 (Enable automatic configuration for DroneCAN)
GPS_AUTO_SWITCH= 1
GPS_DRV_OPTIONS= 8 (Use dedicated CAN port between GPSs for moving baseline)
EK3_SRC1_YAW= 2 (GPS)
GPS1_CAN_OVRIDE and GPS2_CAN_OVRIDE based on your node. Option is available under CAN GPS Order on MP.
Set GPS_POS1_X,Y,Z and GPS_POS2_X,Y,Z based on your setup. Recommended distance between GPS is 30cm.
On the AP-Periph side, make sure define GPS_MOVING_BASELINE 1 is defined.
Below is image of the setup!

1 Like

@Mallikarjun_SE,

Great! thanks very much for the feedback. Iā€™ll add these parameter changes to the GPS-for-yaw setup instructions.

@rmackay9 MAVFTP is failing to initialize on CubeBlack after enabling CAN_P2_DRIVER=2.

@rmackay9 @rmackay9 Above issue was not replicated after changing CAN_P2_DRIVER to 0 and back. But getting EK3 not enough memory and EKF3 isnā€™t initializing.
Setup is as follows:
2CAN GPS on CAN1, 1CAN RM3100 on CAN2, Telemetry connected.