Open hsteinhaus opened 6 years ago
All right - first which firmware version do you have on your flightcontroller and which version of APM-Planner are you using? And just to be sure - the corruption you mean are the params which are set to zero?!
Yes, I am talking about the zero values on the log shown above.
Currently, I am running tests with ArduCopter 3.6-dev, however the problem persists for more than a year (used versions of ArduCopter: 3.3, 3.4 and 3.5). I have also seen P I and D values set to 0 and had a few minor crashes on takeoff as a result. Unfortunately, ArduCopter did not log param changes when disarmed normally, so I never understood where the zero values came from, up to today. APM-Planner is version 2.0.25 now, but I am pretty sure that this is unrelated and the bug is very very old. Platform is Fedora 26 now on amd64. APM planner has been compiled from source locally.
Is there any good reason why params that have not been edited in the GUI are written back to the drone?
Hmm - I will have to look at the code. I did a lot of coding regarding log analysis, but never looked at the code which handles the parameters. At the moment I would say there is NO good reason for writing back all parameters - but if you do not know which param has changed the easiest is to write them all back. Perhaps it is part of the solution to remember which param was modified. We will see.
I think there are at least three aspects of this problem:
I did some debugging and could not reproduce point one nor point 2 while connected with an USB-Cable. Even when connected with my sik radio (wireless rs232) I cannot reproduce 1 or 2. Could it be somehow CRSF related? The unnecessary write back only happens on some float / double values due to rounding issues
@hsteinhaus Does this problem still exist?? As I am not able to reproduce this issue I will close it in the next days.
I cannot reproduce 1 or 2. Could it be somehow CRSF related?
Well, CRSF is a rather slow link, so this could definitely affect the timing. However, a unrleiable and slow link is IMHO the standard case when communicating with UAVs during flight, so the implementation should be extra-cautious here to defend against possible race conditions. I therefore think that a USB cable is a very bad test setup here, and some sik radios closeby to each other as well. May be it helps to limit the air data rate of the SiKs to something like 9600 baud or so to simulate some link congestion?
Does this problem still exist??
Sorry, I did not do a single param write with a vehicle in the air since discovering this bug and I am very reluctant to try it again before there is a very good indication that the problem is fixed. I think it is only a question of time until a more vital param (like some PID gains) is affected, which will definitely crash the vehicle in a split second.
@hsteinhaus Ok I will do some more testing with a slowed down SiK link - perhaps I can reproduce when reducing transmission speed and power - we will see
@hsteinhaus as there were some changes in the extended tuning page and parameter name adaptions it would be cool if you could test if this issue still exists. I was never able to reproduce it. I forgot to mention that those changes are only on current master so you can only test if you can build the planner.
ok, will have a look. Building master is not a problem.
I just experienced a severe parameter corruption while configuring my copter with the "Extended tuning" tab. I did the following steps:
This is what arrived on the drone (APM log extract):
The problem is present for at least a year or two, but I was never able to track it down. Thanks to https://github.com/ArduPilot/ardupilot/issues/3778 APM now logs any param change, which helped to track down this issue.
I consider this problem as extremely severe - damage to property or injury could easily occur when the tab is used during flight.