Copter-4.2.2 released!

Copter-4.2.2 has been released and should appear as the stable version in the ground stations (MP, QGC) within the next few hours. The .apj file can also be directly downloaded from firmware.ardupilot.org.

The changes vs 4.2.1 are in the Release Notes and also copied below.

  1. MambaH743v4 and MambaF405 MK4 autopilot support
  2. Second full harmonic notches available (see INS_HNTC2_ parameters)
  3. UAVCAN memory usage reduced (see CAN_Dn_UC_POOL parameter to control DroneCAN pool size)
  4. VTOL QuikTune lua script added
  5. Watchdog (caused by hardfault) saves crash dump logs to SD card
  6. Bug fixes
    a) Circle mode stops below altitude fence
    b) CRSF protection against watchdog on bad frames
    c) CRSF reset in flight handled
    d) FFT init watchdog fix when ARMING_REQUIRE=0 (not actually possible on Copter)
    e) OSD flight modes menu includes newer flight modes
    f) Param download (via MAVFTP) fixed for params with overlapping names
    g) PWM rangefinder bug fix and added SCALING parameter support
    h) Replay bug fix when EK3_SRCs changed
    i) SERIALx_OPTION fix when “Don’t forward mavlink to/from” selected (resolves MAVLink gimbal detection)
    j) TradHeli Autotune fix which could cause incorrect gains to be loaded
    k) VL53L1X rangefinder preserves addresses

Thanks as always to our beta testers for giving this a try before we released.

-Randy

7 Likes

Could you please clarify how the first and the second harmonic notches interact?

Like, does it make sense to configure the first notch to use bidirectional DShot and the second one to use in-flight FFT? Will the second one, in this case, try to suppress the vibrations not caught by the first one?

1 Like

I just updated a Matek F405-Std and a F405-WSE to 4.2.2. The WSE had no issues. The Std however…

Albeit a beater of an old DJI450, the F405-Std is flying in a fully functional quad. I did the update from 4.2.1 and decided to re-do accel calibrations and compass calibrations just to clean up a few things. During the attempt to do the compass calibration I got the error “Cannot start Compass Thread”.

It was a while I was trying to sort that out I noticed that the HUD on MP and Yaapu were both turned 90 degrees. (I would pitch the quad nose down, but the HUD would would show a roll) I attempted the Accelerometer calibrations, using two different laptops, running two different OS, both with the latest MP Beta. Nothing changed, the HUD was always a 1/4 turn off. The FC is mounted in the normal orientation, and only normal calibrations have been done prior. I even tried to load the offsets from previous log files to see if that would fix or at least change the situation. Nothing worked.

I ended up flashing the board to Plane, and re-flashing ArduCopter 4.2.2. Immediately on plane the HUD was moving in the correct direction, and once I re-flashed AC4.2.2 it all worked again. I reloaded my parameters (except the calibrations), and redid the calibrations (Accel and compass). Bench tests all look good and the HUD is working fine.

Don’t know what happened but I’ll just put it out there just in case.

1 Like

They are applied in order, but any input that guides application is always pre-filter - so FFT will still apply to the main noise peaks and will be trying to squash noise already addressed by the ESC notches.

I performed two flights with 4.2.2. on Cube black powered S1000+ octocopter today. No problems occured. Subjectively, the drone looks more stable than ever before.

1 Like

@andyp1per i have same problem as in 4.2.1-rc4. Racerstar rev35 with bluejay firmware for bdshot. On 4.0 everything working. But in 4.2.1 and 4.2.2. one ESC not init.
i try:
SERVO_DSHOT_RATE 2
SERVO_DSHOT_ESC 0 1 2 not help.
SERVO_BLH_MASK 0 1 2 3
SERVO_BLH_AUTO 1
SERVO_BLH_OTYPE 5
SERVO_BLH_BDMASK 0 1 2 3

SERVO_DSHOT_RATE 2

This should be a number that when multiplied by the loop rate takes you above 1000, so for instance if your loop rate is 400 set this to at least 3

SERVO_BLH_MASK 0 1 2 3
SERVO_BLH_OTYPE 5

Don’t set these, set MOT_PWM_TYPE

SERVO_BLH_BDMASK 0 1 2 3

This should be 15 for a quad

1 Like

of cource, sorry i don’t have MP to get bitmask so i say what chekboxes i set :slight_smile:
image

image
so i thik 2 is good for this loop rate?

i think i did it. Try again later. Thanks!

now this settings
image

image
image
I try SERVO_DSHOT_ESC 0, 1 and 2 without success :frowning:
looprate 800

03.08.2022 21:40:30 : Frame: QUAD/X
03.08.2022 21:40:30 : IMU1: fast sampling enabled 8.0kHz/2.0kHz
03.08.2022 21:40:30 : RCOut: DS300:1-4 PWM:5-13
03.08.2022 21:40:30 : MatekH743-bds 003D0017 33305117 3635383
03.08.2022 21:40:30 : ChibiOS: 93e6e03d
03.08.2022 21:40:30 : ArduCopter V4.2.2 (4fcfa4b2)

Can you try other dshot speeds?

1 Like

sorry. broken signal wire :man_facepalming:

3 Likes

I am able to complete the optical flow Sensor Inflight Calibration.

Now I face preArm check failure due to Rangefinder in 2 even if I disable the preArm check still unable to arm and fly in Loiter mode to test the new FLOW_FnSCALER values.

EK3_SRC_OPTIONS,0
EK3_SRC1_POSXY,0
EK3_SRC1_POSZ,1
EK3_SRC1_VELXY,5
EK3_SRC1_VELZ,0
EK3_SRC1_YAW,1
EK3_SRC2_POSXY,0
EK3_SRC2_POSZ,2
EK3_SRC2_VELXY,0
EK3_SRC2_VELZ,0
EK3_SRC2_YAW,0
EK3_SRC3_POSXY,0
EK3_SRC3_POSZ,2
EK3_SRC3_VELXY,0
EK3_SRC3_VELZ,0
EK3_SRC3_YAW,0
ARMING_CHECK,683510

@Jai.GAY,

Thanks for trying the inflight calibration.

If you can move the rangefinder to use the RNGFND1_ parameters then then pre-arm check should pass. I’m sure you know but just in case, use of optical flow requires a rangefinder.

I am afraid I can’t, we are using Hereflow which comes with a built-in rangefinder, and we do not want to use it as it can only reach 3m height.

Ya, experience once bad experience, drone climbs endlessly and hit ceiling. That is why I do not dare to arm and fly with such a rangefinder prearm warning. I do see the Rangefinder2 under Quick UI showing the correct cm.

Hi @Jai.GAY,

ok, so there is another rangefinder besides the Hereflow’s rangefinder right? The Hereflow rangefinder does not need to be RNGFND1_… so set the RNGFND1_TYPE to match the othere (non-Hereflow) rangefinder.

The vehicle shouldn’t fly up endlessly unless an analog rangefinder is being used. With other rangefinders we should be able to detect once the rangefinder is out of range. If you’ve got a link and/or a log file for that endless climb could you provide a link to it?

Second rangefinder we are using LW20

I need to see if I can still get the flight log, last year June.

@Jai.GAY,

Great. So you should be able to move all the RNGFND1_xx parameters to RNGFND2_xx and vice-versa.

@rmackay9
Thanks, works! I moved all to RNGFND1_xx, do not enable the Hereflow onboard lidar. Rangefinder preArm check enabled and no warning. took off both outdoor and indoor Loiter mode is within expected behaviour and without an external GPS installed.
thank you for the guidance and patience.

Could it be that no Range finder in 1 caused the bouncing flight I had with the super flat indoor surface with SURFTRAK_MODE=1, just curious? I may have to plan time to do a repeat test.
I have concluded that it is not due to skipping of RNGFND1, SURFTRAK_MODE=1 on our super flat blue surface not tracking well.

1 Like

I upgraded to 4.2.2 and noticed that in status window, mag_ofs_x, y & z are shown as zero. Recaliberated the compass twice but still show zero when connected.

@fqahmad66,

Thanks for the report. I’ve reproduced the issue and found that we made this change on purpose to reduce load on the telemetry link. These values were being sent over and over but they hardly ever change and can be seen by looking at the COMPASS_OFSx parameters.

I’ve created an MP issue to remove the display of mag offsets in the status screen.