Commit Graph
1746 Commits
Author SHA1 Message Date
open.20.fsguruh@xoxy.net e419708561 [MERGED] bring in advantages from branch to trunk; Performance optimizations
This combines now the changes from branch PerformanceOptimizations to trunk
Mainly this change should do following:
- Flash savings should be around 224 bytes for stock
- Added option ARITHMETIC_OVERFLOW_CHECK to prevent overflows.
  Still not bulletproof, but codecost is about 50 bytes
- Increases mix speed about 25 - 30% depending on task for stock
  Also increased for other boards, but they may not notice...
- Increased ranges for weight and offset from +-125% to +-245%
- Easier now to increase number of GVARS if needed; Just increase GVAR_MAX in myeeprom.h.
  But!!!! EEPROM layout changes and may not be compatible. Do this for own proposes.
  Till now we do not know how we handle this in future.
- Corrected Timer for stock if used together with AUDIO or VOICE option
- See comments below, what I potentially forgotten...

Be aware this version is currently not compatible to companion9x. But the version before wasn't either. Work is current in progress to tie this up.
2013-03-10 19:51:19 +00:00
bsongis ff609188cb [X9D] REV3 switches assignation (regression) 2013-03-10 19:12:19 +00:00
bsongis 958dee594f [X9D] REV3 switches assignation (regression) 2013-03-10 18:05:36 +00:00
bsongis d8467af191 [X9D] REV3 switches assignation (regression) 2013-03-10 17:54:42 +00:00
bsongis 6e553663ee [X9D] REV3 switches assignation (regression) 2013-03-10 17:22:12 +00:00
bsongis de1cac6e5d [X9D] REV4 switches assignation 2013-03-10 16:46:02 +00:00
bsongis 5d507af66d [X9D] Cosmetics (tested ok with this version) 2013-03-10 11:17:25 +00:00
bernet.andre@gmail.com 10dce7dee4 [X9D] Temporary i2c driver for v0.4 board 2013-03-10 10:49:36 +00:00
open.20.fsguruh@xoxy.net 67689c8f71 [BRANCH] preperation for merge to trunk; GVARS 5; introduced RANGE constant
I would like Bertrand to check this version. It's currently my proposal for the merge. It holds following changes:

- Introduced constant RESERVE_RANGE_FOR_GVARS to make number of MAX_GVARS independent.
- NEGATIVE_SHIFT_CORRECTION is now set by makefile by default instead inside the code
  The would at least give the option to save code and have less precise calculation.
- ex_chans is included like in trunk. No change here, because it would break output as input.

Actually this version would reduce the effort to merge:

- We stay with the GVARS defines we had till now
- We reserve for ranges space for 10 GVARS, which do not hurt, because  we doubled ranges anyway.
- We stay with 5 GVARS in the moment. According my poll not many people currently use GVARS.
  Therefore there is plenty of time finding here a better solution. I expect the number of 
  people will increase soon, but up to this moment 5 GVARS are more than enough.
- The layout of EEPROM for the values is already the new format. That means when we allow more GVARS in future, at least the parameters like weight, offset, etc. needs no additional conversion.

What do you think. Should we go this way?
2013-03-09 17:19:56 +00:00
bsongis 52c283602d [X9D] Icons for the top bar 2013-03-09 16:50:22 +00:00
bsongis 1ad5aa4785 [X9D] REV3 / REV4 support 2013-03-09 16:43:24 +00:00
open.20.fsguruh@xoxy.net 7b5cca58c0 removed code and memory optimization, because it breaks output as input
This version reverts r2029.
It also activates CORRECT_NEGATIVE_SHIFTS by default and activates ARITHMETIC_OVERFLOW halfway.
Unfortunately this removes a lot of flash optimization but is necessary to work properly.
Maybe we find later a better solution.
2013-03-08 18:10:16 +00:00
bsongis 53315d0132 [all] SafetyCH and General Menu fixes
[stock] Flash saving again
2013-03-07 18:26:19 +00:00
bernet.andre@gmail.com 204014c8c2 [X9D] We can avoid CONDENSED for values >1000 on X9D 2013-03-06 18:56:22 +00:00
bernet.andre@gmail.com fac0e5df5e [X9D] Autoswitch fixed 2013-03-05 15:42:10 +00:00
bernet.andre@gmail.com 41431161b3 [X9D] Overlapping label, labels in header (TBD...) 2013-03-05 14:04:39 +00:00
bernet.andre@gmail.com 4b09e1ed23 Reused previous flash saving to improve custom telemetry screens, Timers and footer line items now have labels on all boards 2013-03-05 13:49:53 +00:00
bernet.andre@gmail.com ea6820a046 Wrong array size... was too late last night I guess :\
Of interest: That different way of displaying the custom screen items I introduced in r2033 for conveniency happens to save a whopping 92 bytes on stock!! I forgot about stock when doing it, and when I remembered I expected it would be the opposite and I'd get a slap...
Might be worth looking if this could be replicated in other places!
2013-03-05 11:12:59 +00:00
bernet.andre@gmail.com bb83933c8c Had broken PLAY_TRACK custom function display on sky9x 2013-03-05 10:37:28 +00:00
bernet.andre@gmail.com a19cf2d7ef [X9D] Telemetry views 2013-03-05 09:50:14 +00:00
bernet.andre@gmail.com c66fab2e6d [X9D] 10 characters for audio files, 3-column on custom telemetry screens 2013-03-05 00:06:22 +00:00
open.20.fsguruh@xoxy.net 9f2b486152 [BRANCH] Created possibility to increase GVARS number; is set to 9
Warning!!!
==========
Be aware this version is in branch and is not supported currently by Companion9x. Whatever you configure will be lost in final version!

Because EEPROM interpretation changes anyway because of higher offset and weight values possible in this branch, I tried to align the bits a little bit different to allow a higher number of GVARS. The code change is nearly flash neutral. It costs only 18 bytes flash, but would us allow to either increase range for weight and offset further, or allow more GVARS.
I set it to 9 for this branch now. Please try and report.
It's very easy now to adjust the GVARS number by changing the constant in myeeprom.h. Just change the MAX_GVARS constant for your build in myeeprom.h in the beginning of the file.
The lower MAX_GVARS the higher is the possible number for weight and offset and vice versa.
That is quite likely too complicated for conversion so we need to agree maximum for GVARS.
Not sure in the moment, but this is a branch only and is just to play with it.
Not sure how Bertrand would like this anyway, so may be removed at all.
2013-03-03 13:57:30 +00:00
open.20.fsguruh@xoxy.net 214bc9c4d4 Small flash and data saving
I need Bertrand for this change, but also testers.
I removed ex_chans[] array, because I am the opinion it can be easily replaced by chans[].
According history ex_chans was there first, after that chans[] are introduced. Now we can use chans instead of ex_chans and get rid of this part to have savings. I am incorrect?
My tests are all OK. The only area I can imagive this change is influenced are flight phases changes. And only if output channels are used as input. But I think this way is even better. Please test and report.
2013-03-02 08:35:55 +00:00
open.20.fsguruh@xoxy.net 82783013fd arithmetic overflow check improved:
- Now it should be more unlikely to prevent arithmetic overflows. Please test.
- This change costs about 20 bytes flash
- Unfortunately still not bullet proof. A bullet proof check would cost additionally 100bytes flash, is it worth?
- To get in dangerous areas, both weight and offset needs to be set very high. Without offset no more overruns should occur.
2013-02-28 05:37:16 +00:00
open.20.fsguruh@xoxy.net 792412f5fe bugfix speed calculation for stock; flash saving 32bytes
A speed calculation didn't work on stock, should be fixed now. Be aware SPEED is now calculated on the input side. Just to remember was already in earlier version as well.
Found a way to reduce overflow protection and gives 32bytes back. Please test
2013-02-27 05:34:24 +00:00
open.20.fsguruh@xoxy.net 6fbbac60dc prevent arithmetic overflows
This version should finally prevent nearly all arithmetic overflows.
Unfortunately this costs over 100bytes flash.
Please test and state your option.
2013-02-26 22:36:28 +00:00
bernet.andre@gmail.com 8bb4681578 [X9D] Finer volume steps on the low end for use with headphones 2013-02-26 17:45:50 +00:00
bsongis 62d80d8145 [all] Small bugs again 2013-02-26 17:18:18 +00:00
bsongis b74f8ee61d [X9D] Cosmetics 2013-02-26 17:02:56 +00:00
bsongis 48a7090e6e [all] Timers countdown / minute beep are configurable
[stock] Port from a part of Andreas patch relative to timers. Thanks Andreas! It allowed me to implement the configurable beeps for timers at a almost 0 flash cost.
2013-02-26 16:07:41 +00:00
bsongis 6fc8ba804c [all] Timers countdown / minute beep are configurable
[stock] Port from a part of Andreas patch relative to timers. Thanks Andreas! It allowed me to implement the configurable beeps for timers at a almost 0 flash cost.
2013-02-26 16:07:41 +00:00
bernet.andre@gmail.com fbd1488b62 GVARs display/adjust was truncated to 8 bits 2013-02-26 15:29:54 +00:00
bsongis 42b41e8f03 [X9D] GVARS screen 2013-02-26 13:32:58 +00:00
bernet.andre@gmail.com 98aa332fb3 [all] Overflow when PPM frame length was at maximum with a 4-CH output 2013-02-26 12:18:13 +00:00
open.20.fsguruh@xoxy.net 5c8d5dbd95 Now extended range for weight, offset also without GVARS, GVARS fix, overruns fix
This version holds mainly bugfixes and prepares this branch for merge.
Please test and report.

- gvars didn't work for value ranges usually from -100 to 100 (e.g. diff function)
- gvars shown wrong also in models menu (same in trunk as well)
- gbirkus tested ranges with speed optimizations, overruns occured at half range of trunk version. Now this is fixed and a much bigger range can be used. Still overruns possible. Please test.
- ISR 10msec now safe and code optimized.
2013-02-25 22:08:23 +00:00
bsongis 78c713d7a5 [all] AdjustGVARs bugs fixed 2013-02-25 22:00:11 +00:00
bernet.andre@gmail.com 18385ceebd BATTGRAPH off by default
GVAR presentation in FP edit view
2013-02-25 21:34:28 +00:00
gbirkus@gmail.com 944c66dca4 adjustGV +/- was swapped 2013-02-25 21:32:09 +00:00
bsongis 56eec662a3 Compilation error 2013-02-25 20:16:51 +00:00
bernet.andre@gmail.com 74eb65117d [X9D] Massstorage 2013-02-25 20:16:36 +00:00
bsongis e35cf751de [9x] BATTGRAPH option added to display the Tx voltage
[all] AdjustGVARs feature reworked (now 4 modes)
[!ARM] PlayTrack can now play GVARs
2013-02-25 18:48:11 +00:00
bernet.andre@gmail.com d1b862a4f3 [X9D] Telemetry view
SIMU compilation
2013-02-24 18:06:09 +00:00
bernet.andre@gmail.com 38bcc1f29f [X9D] SPORT driver draft, only feeds the frsky packed decoder for displaying good old telemetry for now 2013-02-24 17:19:42 +00:00
bernet.andre@gmail.com 98100708d6 [X9D] Serial debug now uses a FIFO, RTC fixed 2013-02-24 15:48:03 +00:00
open.20.fsguruh@xoxy.net 83dedd83bc changed ISR masking back to old solution; throttle rescale bugfix with limits changed;
This change make ISR masking for 10msec call back to the old solution.
Bugfix for throttle time calculation if limits are changed.
Noticed my optimized recalculation routine was wrong.
Now I changed it and recalculation is done on 32bit basis which cause 16bytes more flash.
I also noticed the original version (in trunk) just does recalculation of 10 base. That means for full throttle range there would be only 10 steps noticed if limits are changed. That leads to a very unpresise calculation if your throttle limit do not match these steps.
I can do something similar but this time only with 8 steps but save 16bytes flash.
What's your opinion.
2013-02-24 14:11:12 +00:00
bernet.andre@gmail.com 5def4849fe [X9D] UART driver renamed, work on debug output 2013-02-24 12:31:02 +00:00
bsongis 87105c1268 [all] The Batt field was displayed as a timer 2013-02-23 17:27:02 +00:00
bsongis 74a6b54071 [X9D] Problem when switching a char in a model / phase name to lowercase 2013-02-23 16:36:37 +00:00
bsongis f7441620cb Issue 207 (first try, I can't test myself!) 2013-02-23 15:17:19 +00:00
bsongis 1b8e0f12b9 [X9D] Possibility to unselect the bitmap 2013-02-23 14:58:44 +00:00