Too Many Mixes and Switches? Model size limit?

Programing help and example for all firmwares based on thus's th9 firmware.
Post Reply
daklein
Posts: 18
Joined: Sun Dec 30, 2012 9:52 pm
Country: -

Too Many Mixes and Switches? Model size limit?

Post by daklein »

I'm loving it! And I've been working on a crazy idea: make a relatively stable v911 fixed pitch heli fly more like a collective pitch, while I wait for nano cpx motors to arrive.

For the Ail and Ele channels, there is a normal type of mix with a pot for gain, and a pair of ratelimited up and down channels with another pot for gain of the 'collective pitch' effect. Push stick to one side, and one channel follows stick up, and slow filters down. This pretty much holds the output channel until the pilot feeds in opposite stick in similar amount, which cancels the input. But if hold too long on other side it goes that way. Basically makes it harder to fly, the heli doesn't just stop and hover automatically when the stick is released, it keeps goooing until you correct it. Sort of defeats the 45 degree flybar.

This results in a model that is apparently too big? The functionality of the higher number channels seems not to work correctly. Have tried different arrangements, and some simplification, but still get wacky behavior (both in eepe sim and on tx).

If I remove some other channels used for other function, then those higher channel mixes work again. Is there a limit to how many mixes, or total model size or something? model size <= 255? One that works is 253, but 268 does not work. Total model memory in tx is not full yet.

Attached are two eepe files, one that works (simplified throttle hold logic), and one that doesn't work (with fancy sticky throttle hold logic that I'd like to have, but then the same elevator mix channels (ch 12-14) no longer work.)
not_too_many_mixes.eepe
Channel 1 (AIL) and Channel 2 (ELE) mixes work correctly.
(1.31 KiB) Downloaded 336 times
too_many_mixes.eepe
Channel 2 (ELE) mix no longer works correctly, because channel 14 part of it is not working.
(1.31 KiB) Downloaded 210 times
Do I need to figure a way to keep it smaller, or is there something else I'm missing?

Thanks! Dale

User avatar
Kilrah
Posts: 11109
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: Too Many Mixes and Switches? Model size limit?

Post by Kilrah »

open9x or er9x? Which board? Which revision and/or options of the firmware? We can't investigate without knowing what you're using :)
User avatar
gohsthb
Posts: 1412
Joined: Wed Dec 28, 2011 2:32 pm
Country: -
Location: Naperville, IL

Re: Too Many Mixes and Switches? Model size limit?

Post by gohsthb »

That's interesting. The only thing that wasn't working was when you pull the elevator back. You can easily fix it though. Move your throttle cut mixes from channel 7, up to channel 16. Then adjust the custom switch that points to channel 7, change it to channel 16. After I did that it started working like the other one.
-Gohst

Edit: I moved the mixes in model 1 up to ch16 like I said earlier, other than that I made no changes.
Then I simplified the model and made it model 2. Where your model takes up 268, my simplified version takes only 239. I was able to remove a few mixes, and several custom switches. It appears to all still work the same to me. Try it out.
Attachments
too_many_mixes.eepe
(2.35 KiB) Downloaded 354 times
daklein
Posts: 18
Joined: Sun Dec 30, 2012 9:52 pm
Country: -

Re: Too Many Mixes and Switches? Model size limit?

Post by daklein »

Hey, thanks gohst!
Sorry, Er9x, r782, smartieparts programmer board.
daklein
Posts: 18
Joined: Sun Dec 30, 2012 9:52 pm
Country: -

Re: Too Many Mixes and Switches? Model size limit?

Post by daklein »

Awesome! thanks Gohstfor taking your time to school a newbie. It does work exactly the same, except it's small enough to work.

Count the ways to simplify a model to save space: (Remember the Count on Sesame Street...?)
Don't define a linear curves, it's not required, use just a channel directly.
Take advantage of the AND switch option added onto custom switches that are doing other function (like v>ofs), instead of using additional custom switches to do ANDs.
Can do +, *, and then more + + lines in a one mix.
Put pot gains directly where they will be used, not in an intermediate channel.

I can't help making more changes....
I put the throttle cut logic channel back onto ch7, so it shows on the display, and swapped the sign of it so that 'armed' is to the right, and 'cut' is to the left.
Wasted space by putting the rudder pot on ch8, so the gain shows on the display.

So size is back up to 247. Arg, doesn't work. take something back out. Hmm. Put the throttle cut latch from ch7 back to ch16. That makes it work. Why does it matter which channel it's on? Interesting, still size = 247, but now it works...
Attachments
v911_cp_effect.eepe
v911 heli
ID0, normal, ID1,2 'idle up'
Pot 1, rudder gain
Pot 2, AIL, ELE gain
Pot 3, 'collective pitch' effect gain. think FP is too easy, turn up this gain, and turn down Pot 2, and see how we do.
(1.31 KiB) Downloaded 318 times

Post Reply

Return to “er9x / gruvin9x / th9 based firmwares”