ArduPilot code

Joined
Nov 23, 2015
Messages
237
Reaction score
168
Age
76
Admins, Thanks for the new area!!
I'll be the first to add a new thread here.
Let's talk about ArduPilot/Copter code snippits and parameters that may have changed during the 1.3.1 --> 1.5.2 evolution.
Here are the commits that occurred between 1.3.1 and 1.5.2 where the commit message contains the word motor.
I got this by using the following command. (there are lots of ways to get this, I made a new branch at remotes/origin/master but I didn't have too. )

git log SOLO1.3.1..1.5.2 --oneline |grep -i motor

696a95c AP_Motors: fix bug found during review
e79654d AP_Motors: Allow adjustment of thrust priority parameters
3348d49 AP_Motors: Increase min esc pwm when thrust priority is set
2282a8b AP_Motors: Add support for two stage landing detection
7f97102 Revert "SITL: Apply thrust loss to all motors"
1f3d257 AP_Motors: publish the headroom scaler
a77a5a2 SITL: Apply thrust loss to all motors
75d0202 AP_Motors: Add yaw headroom control to mixer

That's not to say that these are the ONLY commits that may effect the ESC operation, but it is a good place to start. Since all non sitescan Solo's (well almost all) are flying with 1.3.1. As this is a fairly short list it should be easy to analyse each commit in the light of ESC/pwm/parameter changes. Once we are done with these we can move on to the others.
 
forgot to add the list of all the commits between 1.3.1 and 1.5.2
 

Attachments

  • 1.3.1_1.5.2.txt
    6.9 KB · Views: 12
  • Like
Reactions: carpy
I burned through 6 batteries this weekend, all on 1.5.2. The improved landing detection was noticeable and worked well. All aspects of flight were great. Actually it was some of the most stable and smooth flight I've ever had with the Solo. Not sure that point is related to 1.5.2 or not. But I was very happy with every flight regardless.

I've since changed the distance based battery failsafe parameter from 30 to 22. It was kicking in the failsafe at 18-20% in order to land with about 10% remaining. Great for the newbs. Not for me. So I cut it back to 22, which is a realistic number.
 
A bit more analysis.
Looking at the commits from: git log SOLO1.3.1..1.5.2 --oneline |grep -i motor
the only files effected are:
libraries/AP_Motors/AP_MotorsMatrix.cpp
libraries/AP_Motors/AP_MotorsMatrix.h
libraries/AP_Motors/AP_Motors_Class.cpp
libraries/AP_Motors/AP_Motors_Class.h
libraries/AP_Motors/AP_Motors/examples/AP_Motors_test/AP_Motors_test.pde

Mostly these changes are to add the 2 stage landing and thrust priority.
The extended commit message from the first commit adds a bit of clarity to what thrust priority is about:
"Enables additional thrust to be gained by reducing the yaw control headroom in the mixer when the thrust_priority boolean is true."

While looking through this code I found another commit, not listed above, that may have a bearing on ESC operation:
60e3ebf ROMFS: Allow use of full ESC output
"Testing with Solo ESC's shows that saturation occurs at a PWM value of 1870."

This effects mk/ROMFS/defaults.parm
and makes the following (and only) change:

-MOT_THST_MAX, 0.940000
+MOT_THST_MAX, 0.965000

I don't claim to understand what the effect of this might be on a normal Solo.
 

Attachments

  • commits.txt
    1.5 KB · Views: 4
I like the thrust priority change. Basically it's allowing the pixhawk to, in an "emergency", sacrifice yaw stability to increase thrust to arrest a descent. Where before it would not be able to increase thrust any further without causing some yaw instability.
 
Thanks P2P, looks like you like 2 stage landing too ;>)
 
Yes. The change in landing behavior is noticeable. It takes an extra second or so to disarm. And in doing so, you can see it do a little thrust bump check kind of thing. Like it's sanity checking itself during it's new "landing maybe" stage.
 
A bit more,
This is a list of all the commits between 1.3.1 and 1.5.2 annotated to show the relevance to ESC operation.
Legend, first letter of each line.

l related to 2 stage land detetcion
f flight/flight safety related
g gimbal related usually Qbert
x I don't think this has any relation to ESC, pwm or other power issues
b battery failsafes
m mavlink related usually for Qbert gimbal
e Maybe ESC related
 

Attachments

  • Annotated_commits.txt
    8.6 KB · Views: 13
  • Like
Reactions: carpy
A bit more,
This is a list of all the commits between 1.3.1 and 1.5.2 annotated to show the relevance to ESC operation.
Legend, first letter of each line.

l related to 2 stage land detetcion
f flight/flight safety related
g gimbal related usually Qbert
x I don't think this has any relation to ESC, pwm or other power issues
b battery failsafes
m mavlink related usually for Qbert gimbal
e Maybe ESC related

I've spent considerable time walking through all the code changes made since 1.3.1. In a nutshell, I see nothing of concern and only good stuff.
Attached is an example of where to start when looking at the default parameter change for MOT_THST_MAX and it's possible impacts.
In this case, it appears the pilot has been given some additional authority over throttle.
 

Attachments

  • max_throttle.txt
    2.1 KB · Views: 10
I burned through 6 batteries this weekend, all on 1.5.2. The improved landing detection was noticeable and worked well. All aspects of flight were great. Actually it was some of the most stable and smooth flight I've ever had with the Solo. Not sure that point is related to 1.5.2 or not. But I was very happy with every flight regardless.

I've since changed the distance based battery failsafe parameter from 30 to 22. It was kicking in the failsafe at 18-20% in order to land with about 10% remaining. Great for the newbs. Not for me. So I cut it back to 22, which is a realistic number.
So all your earlier issues with your Solo have been resolved?
 
Guys want to say thanks for the hard work. I don't have the time to test just to fly when I can. So I am piggybacking on all your work.

Thank you for testing and publishing your results. My hour of free time Saturday will be much enjoyed getting the solo up.


Sent from my iPad using Tapatalk
 
  • Like
Reactions: speatuk and carpy
I burned through 6 batteries this weekend, all on 1.5.2. The improved landing detection was noticeable and worked well. All aspects of flight were great. Actually it was some of the most stable and smooth flight I've ever had with the Solo. Not sure that point is related to 1.5.2 or not. But I was very happy with every flight regardless.

I've since changed the distance based battery failsafe parameter from 30 to 22. It was kicking in the failsafe at 18-20% in order to land with about 10% remaining. Great for the newbs. Not for me. So I cut it back to 22, which is a realistic number.
Thank you for the info.
Does that mean that there is an update for Solo? I have not flown mine due to severe weather.
As already commented 3DR would not support further Solo. So how come this update be done on Solo?
 
This is not an update that 3DR is pushing out to consumer customers. Their commercial site scan customers get them. They do not give it away to the consumers, but they also don't locks the consumer out of doing it themselves.
 
  • Like
Reactions: Spectre95

New Posts

Members online

No members online now.

Forum statistics

Threads
13,094
Messages
147,748
Members
16,058
Latest member
Gabriela