Copter-4.0.1-rc2 available for beta testing -- Critical Fix Included

Hi, I did never encounter the bug either but it’s there :slight_smile:

And yes, copter 3.6.x did have a sub optimal frsky scheduler that would stall all telemetry while messages were being sent, version 4.x.x brought 2 big improvements: a dedicated thread for the frsky subsystem which solved many issues (but is the root cause of the potential race condition) and an improved frsky packet scheduler.

2 Likes

Thank you. I loaded your parameters onto a quad with 4 CAN ESCs but I can’t reproduce the issue. I’d appreciate it if you could try to narrow down the issue for us.
Can you please try disabling features progressively and see which feature is key to making the problem happen?
Some suggestions:

  • AVOID_ENABLE
  • LOG_DISARMED
  • LOG_FILE_DSMROT
  • CAN_SLCAN
  • CAN
  • FENCE
  • GPS
  • TELEM_DELAY

I know it will make it unflyable disabling many of these. All we’re trying to find is which ones affect log corruption.
Please also try a different microSD card.
Thanks!

Thanks, I am interested in the fixing of flash-based (block based) storage devices.

I have also put a firmware here for you to test:
http://uav.tridgell.net/tmp/copter-CubeBlack-4.0.1-test1.apj
this firmware is the same as 4.0.1rc1, but removes a patch that adds new CAN ESC logging. That is the most likely change to have caused an issue.
Cheers, Tridge

1 Like

Thanks. I will test these later today or by latest tomorrow.

So I did some troubleshooting to narrow down the problem and here’s what I found:

  1. Log will corrupt if CAN_P2_DRIVER = 2, but works fine when it is set either 0 or 1 (4.0.1-test1.apj and on 4.0.1-rc2).
  2. Doing any changes to CAN_P2_DRIVER, will cause following messages (4.0.1-test1.apj and on 4.0.1-rc2):
15.1.2020 17:05:27 : PreArm: Internal errors (0x8000)
15.1.2020 17:05:27 : PreArm: Logging failed
15.1.2020 17:05:10 : AP_Logger: stuck thread ()
  1. Log gets corrupted on both your 4.0.1-test1.apj and on 4.0.1-rc2

  2. Downloading a log will cause following messages happen during/after (CAN_P2_DRIVER=ANY)
    This happens on all ! AC 4.0.0 !, 4.0.1-test1.apj and on 4.0.1-rc2

15.1.2020 17:18:30 : PreArm: Internal errors (0x8000)

NOTE:
I was using otherwise same params as shared before. Only changes are on CAN_P2_DRIVER param.
Disabling other features didn’t help.

Hopefully this helps.

1 Like

yes, thanks!
Can you tell me what devices you have attached to each CAN port?

a related question: what is the minimum set of attached devices to your board that is needed to reproduce the issue? I really want to reproduce the issue here to fix it and need to know what devices I need to attach. The key issue I’m looking for is the log corruption.

Currently there is 4x Myxa ESC on UAVCAN on P1 and no devices on P2. That’s all.

These are indexed for motors 1…4 and CAN nodeID’s are 20…23

Tomorrow I will try to minimize the setup to bare minimum where its still giving problems.

1 Like

If you are using the full carrier board then are you aware that CAN1 and CAN2 labels are backwards on the case? Are your CAN devices connected to the connector in the center of the board (next to telem2) or on the right hand edge?

FYI the radius direction control has been swapped in master and will be included in Copter 4.0.2 when that rolls out.

2 Likes

@wn0x,

We’ve found the cause and have a fix for the parameter reset issue coming in Copter-4.0.4. It’s discussed over on this thread.

1 Like

@rmackay9 @wn0x Have you been able to use the rate and direction change of the new circle mode? I think I set it up properly but it does not work for me. Sorry I know this is an orld thread but the one created does not get any answer Circle Mode manual control not working

@drtrigon unfortunately not. I don’t think it was a priority feature at the time so gave up. I was hoping for something very simlar to the 3DR Solo which did a fantastic job of implementing the feature.

I don’t know if @rmackay9 every used the feature.

Thanks,

Rich

@rmackay9 Is there a way to debug ardupilot not needing to compile it by myself? If not what’s the quickest way to get a build chain running? Is there a VM or a docker or similar existing?

edit: @wn0x Thanks for the info. I have a SplashDrone that was able to do it years ago already - but I changed the FC due to other reasons, e.g. missing GCS. :wink:

Is it possible to use lua scripts “param:get” to read the current state of “CIRCLE_RATE” and output it to GCS. Would this work and output useful debug info?

gcs:send_text(6, param:get(‘CIRCLE_RATE’))

Please open a new thread!

I did as noted in my very first post, but as nobody answered there I had to come here: Circle Mode manual control not working

1 Like

Hi @drtrigon,

Txs for the report. I’ve replied over on the other thread. In short 4.2 seems to work so maybe you could test with the current 4.2 beta? I don’t think much has changed with circle mode since 4.0.x but since I’ve verified 4.2 works maybe you could give that a try?