diff --git a/src/clientdlg.cpp b/src/clientdlg.cpp index 06b90e97..b862b25c 100755 --- a/src/clientdlg.cpp +++ b/src/clientdlg.cpp @@ -906,7 +906,7 @@ void CClientDlg::OnTimerSigMet() // linear transformation of the input level range to the progress-bar // range dCurSigLevelL -= LOW_BOUND_SIG_METER; - dCurSigLevelL *= NUM_STEPS_INP_LEV_METER / + dCurSigLevelL *= NUM_STEPS_LED_BAR / ( UPPER_BOUND_SIG_METER - LOW_BOUND_SIG_METER ); // lower bound the signal @@ -916,7 +916,7 @@ void CClientDlg::OnTimerSigMet() } dCurSigLevelR -= LOW_BOUND_SIG_METER; - dCurSigLevelR *= NUM_STEPS_INP_LEV_METER / + dCurSigLevelR *= NUM_STEPS_LED_BAR / ( UPPER_BOUND_SIG_METER - LOW_BOUND_SIG_METER ); // lower bound the signal diff --git a/src/clientdlg.h b/src/clientdlg.h index ffa0571a..1649653b 100755 --- a/src/clientdlg.h +++ b/src/clientdlg.h @@ -60,10 +60,6 @@ #define BUFFER_LED_UPDATE_TIME_MS 300 // ms #define LED_BAR_UPDATE_TIME_MS 1000 // ms -// range for signal level meter -#define LOW_BOUND_SIG_METER ( -50.0 ) // dB -#define UPPER_BOUND_SIG_METER ( 0.0 ) // dB - // number of ping times > upper bound until error message is shown #define NUM_HIGH_PINGS_UNTIL_ERROR 5 diff --git a/src/global.h b/src/global.h index 493febdc..68a2880d 100755 --- a/src/global.h +++ b/src/global.h @@ -169,10 +169,14 @@ LED bar: lbr // maximum number of fader settings to be stored (together with the fader tags) #define MAX_NUM_STORED_FADER_SETTINGS 100 -// defines for LED input level meter -#define NUM_STEPS_INP_LEV_METER 8 -#define RED_BOUND_INP_LEV_METER 7 -#define YELLOW_BOUND_INP_LEV_METER 5 +// defines for LED level meter CMultiColorLEDBar +#define NUM_STEPS_LED_BAR 8 +#define RED_BOUND_LED_BAR 7 +#define YELLOW_BOUND_LED_BAR 5 + +// range for signal level meter +#define LOW_BOUND_SIG_METER ( -50.0 ) // dB +#define UPPER_BOUND_SIG_METER ( 0.0 ) // dB // Maximum number of connected clients at the server. If you want to change this // paramter you have to modify the code on some places, too! The code tag diff --git a/src/multicolorledbar.cpp b/src/multicolorledbar.cpp index b27114c3..8baedfb8 100755 --- a/src/multicolorledbar.cpp +++ b/src/multicolorledbar.cpp @@ -33,7 +33,7 @@ CMultiColorLEDBar::CMultiColorLEDBar ( QWidget* parent, Qt::WindowFlags f ) : QFrame ( parent, f ) { // set total number of LEDs - iNumLEDs = NUM_STEPS_INP_LEV_METER; + iNumLEDs = NUM_STEPS_LED_BAR; // create layout and set spacing to zero pMainLayout = new QVBoxLayout ( this ); @@ -105,14 +105,14 @@ void CMultiColorLEDBar::setValue ( const int value ) if ( iLEDIdx < value ) { // check which color we should use (green, yellow or red) - if ( iLEDIdx < YELLOW_BOUND_INP_LEV_METER ) + if ( iLEDIdx < YELLOW_BOUND_LED_BAR ) { // green region vecpLEDs[iLEDIdx]->setColor ( cLED::RL_GREEN ); } else { - if ( iLEDIdx < RED_BOUND_INP_LEV_METER ) + if ( iLEDIdx < RED_BOUND_LED_BAR ) { // yellow region vecpLEDs[iLEDIdx]->setColor ( cLED::RL_YELLOW );