Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complex mixer not loading with more than 3 inputs #5924

Closed
Tiktiki opened this issue Nov 30, 2016 · 9 comments
Closed

Complex mixer not loading with more than 3 inputs #5924

Tiktiki opened this issue Nov 30, 2016 · 9 comments
Labels

Comments

@Tiktiki
Copy link
Contributor

Tiktiki commented Nov 30, 2016

It seem there is a problem with the mixer module.
When ever you try to use more than 3 inputs in any mixer, it does not load.
Theses inputs can be from any control group, the issues still is present.

If there is a mixer that does not load, the next mixers in the file also won't load.
It does not throw any errors in the console however.
The loaded mixers along with every other function of the flight controller seem to work correctly.

Tests have been done on a hardware bench test using a Pixfalcon/Pixhawk mini and digital AND analog servos.

Example mix that does not work:

M: 4
O: 10000 10000 0 -10000 10000
S: 1 0 2250 2250 0 -10000 10000
S: 1 1 -3750 -3750 0 -10000 10000
S: 0 0 3000 3000 0 -10000 10000
S: 0 1 -5000 -5000 0 -10000 10000

Removing ANY input from the mix makes it work.

@dagar dagar added the bug label Nov 30, 2016
@dagar
Copy link
Member

dagar commented Dec 9, 2016

Sounds like it's not a px4io problem (same issue on px4fmu). I quickly tried a mixer like this on a pixhawk and didn't see any error messages.

@AndreasAntener
Copy link
Member

There are certain combinations where the mixer send/parse flow doesn't work, maybe related: #5118
Parsing on the receiving side fails and stops silently.

@LorenzMeier
Copy link
Member

@Tiktiki Can you retry on current master? I fixed a race there.

@LorenzMeier
Copy link
Member

From Andreas:

If we try to load the following mixer it seems to get sent to IO but one of the last 2 mixers doesn't get loaded.

R: 2- 10000 10000 10000 0
Z:
M: 2
O:      10000  10000      0 -10000  10000
S: 1 0  10000  10000      0 -10000  10000
S: 1 1  10000  10000      0 -10000  10000
M: 2
O:       10000   10000    0 -10000  10000
S: 1 0   10000   10000    0 -10000  10000
S: 1 1  -10000  -10000    0 -10000  10000

It seems to split it up at a bad location during transfer. If I extend it a bit (add another null mixer before), or remove one of the minus signs in the first servo mixer, or change PX4IO_P_CONFIG_MAX_TRANSFER from 64 to 32, the mixer loads correctly.

@LorenzMeier
Copy link
Member

LorenzMeier commented Jan 1, 2017

Please test this. It should fix it.
#6226

@AndreasAntener
Copy link
Member

@Tiktiki this should be fixed on master now

@Siytek
Copy link

Siytek commented Aug 19, 2017

Hi all, I'm still getting this problem with the latest stable release, which I re-flashed today just to be sure. The mixer fails to load every time I boot up and also fails to load manually from the nsh prompt.

Addons script: /fs/microsd/etc/extras.txt 
WARN  [px4io] fmu sent: "M: 2
O: 10000 10000 0 -10000 10000
S: 0 0 -8000 -8000 0 -10 "
px4io mixer send error -1
ERROR [mixer] failed to load mixers from /fs/microsd/etc/mixers/X8.main.mix
ERROR [mixer] failed to load mixer

The mixer is just a copy of the X5 mixer with added pass-thru for the other main PWMs. I had been using it with previous firmware with no trouble for quite a long time.

# Skywalker X8 mixer for PX4FMU

# Output 1 & 2 Elevon mixers

M: 2
O:      10000  10000      0 -10000  10000
S: 0 0  -8000  -8000      0 -10000  10000
S: 0 1   6000   6000      0 -10000  10000

M: 2
O:      10000  10000      0 -10000  10000
S: 0 0  -8000  -8000      0 -10000  10000
S: 0 1  -6000  -6000      0 -10000  10000

# Output 3 Null

Z:

# Output 4 Motor speed mixer

M: 1
O:      10000  10000      0 -10000  10000
S: 0 3      0  20000 -10000 -10000  10000

# Output 5 to 8 pass-thru

M: 1
O:      10000  10000      0 -10000  10000
S: 3 4  10000  10000      0 -10000  10000

M: 1
O:      10000  10000      0 -10000  10000
S: 3 5  10000  10000      0 -10000  10000

M: 1
O:      10000  10000      0 -10000  10000
S: 3 6  10000  10000      0 -10000  10000

M: 1
O:      10000  10000      0 -10000  10000
S: 3 7  10000  10000      0 -10000  10000

@Siytek
Copy link

Siytek commented Aug 19, 2017

Also the same with master

nsh> ver all
HW arch: PX4FMU_V2
FW git-hash: 8db2883d847ff69aa43eb7d1887f7ed0281cbbd7
FW version: 1.6.5 0 (17171712)
OS: NuttX
OS version: Release 7.18.0 (118620415)
OS git-hash: 8b81cf5c7ece0c228eaaea3e9d8e667fc4d21a06
Build datetime: Aug 19 2017 08:25:13
Build uri: localhost
Toolchain: GNU GCC, 5.4.1 20160919 (release) [ARM/embedded-5-branch revision 240496]
MFGUID: 3738393330345101003c002a
MCU: STM32F42x, rev. 1
nsh> mixer load /dev/pwm_output0 /fs/microsd/etc/mixers/X8.main.mix
WARN  [px4io] fmu sent: "M: 2
O: 10000 10000 0 -10000 10000
S: 0 0 -8000 -8000 0 -10"
px4io mixer send error -1
ERROR [mixer] failed to load mixers from /fs/microsd/etc/mixers/X8.main.mix
ERROR [mixer] failed to load mixer

EDIT: I have written a new mixer file and gone back to stable, the new mixer is loading ok.

@LorenzMeier
Copy link
Member

So master is fine, correct?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants