What should I do to change AHRS yaw reaction reversed?


I have one question regarding yaw direction. The pixhawk is installed normally.

  1. In STAB mode, for rudder right stick (rc4 = high), servo4 is high and tail blades move LEFT.
    If I move head right (CW) then the servo4 signal is still high.
    Surely I can reverse servo4 but my downstream FBL doesn’t allow reverse signal.

  2. If 1) is true then I wonder what line should I start to look at and what to read to recompile the firmware?

Thank you.


I’ve installed ArduHeli sources and compiled. I got a compiled firmware which is about 1.8M. But the size is quite different from Mr. Olsen’s (0.9M for v2)

Is this okay? or Am I doing something wrong?

osboxes@osboxes:~/ArduHeli2$ /home/osboxes/ArduHeli2/modules/waf/waf-light configure
Setting top to : /home/osboxes/ArduHeli2
Setting out to : /home/osboxes/ArduHeli2/build
Autoconfiguration : enabled
Setting board to : sitl
Checking for ‘g++’ (C++ compiler) : /usr/bin/g++
Checking for ‘gcc’ (C compiler) : /usr/bin/gcc
Checking for need to link with librt : not necessary
Checking for HAVE_CMATH_ISFINITE : yes
Checking for HAVE_CMATH_ISINF : yes
Checking for HAVE_CMATH_ISNAN : yes
Checking for header endian.h : yes
Checking for header byteswap.h : yes
Checking for program ‘python’ : /usr/bin/python
Checking for python version >= 2.7.0 : 2.7.14
Checking for program ‘python’ : /usr/bin/python
Checking for python version >= 2.7.0 : 2.7.14
Source is git repository : yes
Update submodules : yes
Checking for program ‘git’ : /usr/bin/git
Checking for program ‘size’ : /usr/bin/size
Benchmarks : disabled
Unit tests : enabled
’configure’ finished successfully (0.969s)
osboxes@osboxes:~/ArduHeli2$ /home/osboxes/ArduHeli2/modules/waf/waf-light configure configure --board px4-v2
Setting top to : /home/osboxes/ArduHeli2
Setting out to : /home/osboxes/ArduHeli2/build
Autoconfiguration : enabled
Setting board to : px4-v2
Checking for program ‘arm-none-eabi-ar’ : not found
Could not find the program [‘arm-none-eabi-ar’]
(complete log in /home/osboxes/ArduHeli2/build/config.log)

I continued and compiled.

osboxes@osboxes:~/ArduHeli$ waf copter
Waf: Entering directory /home/osboxes/ArduHeli/build/sitl' Waf: Leaving directory/home/osboxes/ArduHeli/build/sitl’

Build directory: /home/osboxes/ArduHeli/build/sitl
Target Text Data BSS Total

bin/arducopter 1576993 55982 36352 1669327
bin/arducopter-heli 1536921 58174 36224 1631319

Build commands will be stored in build/sitl/compile_commands.json
’copter’ finished successfully (1.720s)

I found that I didn’t install arm tools.

sudo apt-get install gcc-arm-none-eabi

then I got no error on

./modules/waf/waf-light configure --board px4-v2

and compiled

./waf copter

but the filesize is still different than Mr. Olsen’s. (1.9M vs 0.8M for px4-v2)

Any Idea? (Am I using any hidden debug options?)

Which version of ArduHeli are you building? 3.5.5 is Copter 3.5.5 with some extra stuff we’re testing. 3.5.6 is currently master for an automatic backport to 3.5 for anything we might want to PR to the next Copter stable point release. As any new development is done on 3.6-dev and backported to ArduHeli for Copter stable. For instance, the new 5 point throttle curve is in 3.6-dev, not in Copter 3.5.5, an experimental version of it is in ArduHeli 3.5.5, the improved version is in ArduHeli 3.5.6 but is different from the merge to Copter 3.6-dev because it’s a backport :grinning:

There is no builds of 3.5.6 yet as it’s not done until Copter 3.5.6 comes out. All the ArduHeli builds are done automatically, shell scripted with make on my Debian box, not with waf. It probably has to do with optimizing your compiler maybe? Or not building from the same source? Did you update your submodules? I don’t know. ArduHeli is for development, it is not official supported software.

I cloned Copter 3.5.6 and compiled not knowing any background. Thank you for the explanation.
I didn’t update submodules. I will try later. I didn’t know that you are using debian and make system.
I will look into it as you suggested. Thank you.

Ok, there is no Copter 3.5.6 (yet). There is a ArduHeli 3.5.6 because that is being worked on for the next Copter point release from the TradHeli perspective. The comparison in binary size can’t be made because in ArduHeli 3.5.4 and 3.5.5 I’ve been testing @priseborough EKF updates for the last six months that are in Copter 3.6-dev, but not in Copter stable. Those are not in ArduHeli 3.5.6 (yet), as it is a WIP.

ArduHeli 3.5.6 is only being worked on at present for backports of stuff that has gone into 3.6-dev but we might want to PR to Copter 3.5.6. If we deem the changes to be too extensive for a point release it will not be PR’d to Copter 3.5.6. We like to keep point releases to bug fixes, not major changes in Copter. But that is NOT the case in ArduHeli point release builds. If you are helping test by flying the ArduHeli builds I put in the release notes on the releases page what you need to look out for as far as changes when you install it. Because ArduHeli supports new stuff that Copter stable does not.

I would suggest cloning the official ardupilot repo from here:

If you desire to help test for TradHeli, please PM me and I’ll add you on as a tester for ArduHeli builds and brief you on new things we’re testing before you fly them. We like all the testers and feedback we can get so when we PR something to dev we know it works. Our goal is to have Copter 3.6rc1 come out with zero issues related to TradHeli, people can upgrade to 3.6 and it “just works” :grinning:

Indeed, it was ArduHeli 3.5.6 from your github. And now I understand that ArduHeli 3.5.6 is WIP.
I tried couple of things and I read some documents about building firmware. So I tried.

It was a script to help user to make a build environment conveniently. I tried “windows tool_chain” but that didn’t go well.

I read two references. The first one helped me a lot.


In ubuntu terminal, (from where I clone ‘ArduHeli’)

I follow the first document (and it compiled well with waf also. Now binary was comparable 0.8 M)

To make sure I ran the second script and compiled again

source Tools/scripts/install-prereqs-ubuntu.sh -y

Build directory: /home/osboxes/ArduHeli/build/px4-v2
Target Text Data BSS Total

bin/arducopter 975672 2828 55480 1033980
bin/arducopter-heli 962648 2824 55288 1020760

The ELF files are pointed by the path in the “Target” column. The .px4 files are in
the same directory of their corresponding ELF files.

You can use the option --upload to upload the firmware to the PX4 board if you
have one connected.

Binary Text Data BSS Total

px4-extra-files/px4io 39704 600 3138 43442

Build commands will be stored in build/px4-v2/compile_commands.json
‘copter’ finished successfully (5.789s)

Binaries look similar, I will see if I can upload the firmware.

I guess now it’s okay to look closer at the source code.

Thank you for your suggestion but I think I will need some time to fly my heli first.

Good to see you got it working! I would not fly 3.5.6 yet - new things went into it yesterday and this morning, none of which have been flight tested as a package yet. If you do want to play with the source code and test fly it, please review the commits that have gone into it since the release of Copter 3.5.5 to understand what to look for if you fly it. It will remain a moving target for awhile as I think @bnsgeyer is planning on some WIP that we want to test on the 3.5 codebase, as well, before porting to Copter dev.