DeBesten / open9x

Automatically exported from code.google.com/p/open9x
0 stars 0 forks source link

Thr. Source should take account of limits #121

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The most common use for the THR source setting is to use the real throttle 
channel output as source for the THs, TH%, THt timer source settings.
Problem is that these functions are currently hardcoded to run on -100% - +100% 
range on the selected channel. So THs and THt will start when (channel > -96%), 
and TH% will count linearly over the whole range.

This means these functions are unuseable anytime limits have been ajusted on 
the throttle channel. If servo reverse is used, the timer will run all the time 
except at full throttle, if the lower limit is set at say 90% it will never 
stop.

They should thus take limits and reverse into account any only work on the 
"real" range the servo output can take with the current settings.

Original issue reported on code.google.com by bernet.a...@gmail.com on 30 Aug 2012 at 2:48

GoogleCodeExporter commented 8 years ago
Right!

Original comment by bson...@gmail.com on 30 Aug 2012 at 2:49

GoogleCodeExporter commented 8 years ago

Original comment by bson...@gmail.com on 3 Sep 2012 at 8:53

GoogleCodeExporter commented 8 years ago
THs and THt OK except when symlimits on = and some subtrim is added

TH% not scaled correctly. Set limits to +/-40, timer won't run when throttle is 
at 0 (-40) which is OK, but it doesn't run at full speed at full throttle (+40).

Original comment by bernet.a...@gmail.com on 4 Sep 2012 at 8:48

GoogleCodeExporter commented 8 years ago

Original comment by bson...@gmail.com on 4 Sep 2012 at 2:51

GoogleCodeExporter commented 8 years ago
on TX with r1355 and above if you do a new model with Timer1=TH% and 
T-Trace=CH2, where mix CH2=100%Thr
then if channel2 is going over 60%, timer did not stop anymore.

first i tried on companion simu with o9x r1361 and here it is ok. but on TX - 
stock, r1361 it is really wrong.
release 1355 is the fist with this issue.

Original comment by gbir...@gmail.com on 7 Sep 2012 at 8:15

GoogleCodeExporter commented 8 years ago
Would you test with this line in open9x.cpp around line 2386:
val = val * 10 / (10+(g_model.limitData[ch].max-g_model.limitData[ch].min)/20);

Original comment by bson...@gmail.com on 7 Sep 2012 at 9:48

GoogleCodeExporter commented 8 years ago
did not fixed, and now you can see the similar behavior also on ./simu
similar, because on ./simu the timer stop after cca 20 seconds when Thr is -100

Original comment by gbir...@gmail.com on 7 Sep 2012 at 12:10

GoogleCodeExporter commented 8 years ago
on TX Timer will stop after cca 3:25 seconds

Original comment by gbir...@gmail.com on 7 Sep 2012 at 12:18

GoogleCodeExporter commented 8 years ago
I don't reproduce it!!!
Would you attach your eeprom.bin? And tell-me what I should do to see the pb?

Original comment by bson...@gmail.com on 7 Sep 2012 at 12:36

GoogleCodeExporter commented 8 years ago
sorry, it is OK with your patch. I make a mistake while copied it.

Original comment by gbir...@gmail.com on 7 Sep 2012 at 12:59

GoogleCodeExporter commented 8 years ago
release 1355 did made the code size increase of about 144 bytes.
Very basic options do not fit any longer.
Btw these lines shoul be surrounded by proper #ifdef PPM_LIMITS_SYMETRICAL
as if the option is left out they result in dead code.

2384        if (g_model.limitData[ch].symetrical)
2385          val -= calc1000toRESX(g_model.limitData[ch].offset);

Original comment by romolo.m...@gmail.com on 8 Sep 2012 at 1:05