Averaging signal lever #508
Replies: 7 comments 2 replies
-
Yes, I need to switch to sprite anyway to have multiple skin posibilities. I'm not sure what you want to change on the behaviour of averaging. Do you want to have a more stable .x readout? You can also try to play with your smoothing parameter (alpha) to get a better result. |
Beta Was this translation helpful? Give feedback.
-
Lower alpha slow down slope of signal rise or fall and it take too much time to see value but not solve unstable .x readout because incoming signal data are to fast. |
Beta Was this translation helpful? Give feedback.
-
Maybe split it in two? So average the x. and .x seperatly? |
Beta Was this translation helpful? Give feedback.
-
Maybe it could work, I still insist that it would be best to show every tenth value or something like that or convert it to lower rate. |
Beta Was this translation helpful? Give feedback.
-
Yes, but a jumping meter can be also very annoying. And the .x values aren't that accurate. |
Beta Was this translation helpful? Give feedback.
-
Ok, so combine of two methods low pass and lower rate will look more professional |
Beta Was this translation helpful? Give feedback.
-
My workaround at the moment is like this:
And moved smeter bar outside that timer to work smoothly. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I would like to propose a change to the method of averaging the signal level, currently it is based on a low-pass filter formula:
SAvg = (((SAvg * 9) + 5) / 10) + SStatus;
While trying to experiment with this, I changed it to something simpler:
SAvg = (alpha * SStatus * 10) + (1 - alpha) * SAvg; where alpha=0.1
Unfortunately, the effect is still the same.
My idea is to reduce the value refresh, preferably using sampling rate conversion, this should reduce the flickering of decimal value readings with full 0.1 resolution.
In addition, it is worth changing the display method to Sprite, e.g. something like this in my code:
SignalSprite.fillSprite(BackgroundColor);
SignalSprite.loadFont(FONT48);
SignalSprite.drawString(String(SStatus / 10.0 , 1) + " ", 92, 0);
SignalSprite.unloadFont();
SignalSprite.pushSprite(225, 108);
This look nice for me, also I rendered smaller monospace font for this - 36.
Beta Was this translation helpful? Give feedback.
All reactions