Skip to content

Commit

Permalink
NR strength limits df8oe#2
Browse files Browse the repository at this point in the history
  • Loading branch information
DD4WH committed Feb 4, 2018
1 parent c1cdee6 commit 9cd3a58
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions mchf-eclipse/drivers/audio/audio_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,9 @@ enum {
#define RX_DECIMATION_RATE_24KHZ 2 // Decimation/Interpolation rate in receive function for 24 kHz sample rate
#define RX_DECIMATION_RATE_48KHZ 1 // Deimcation/Interpolation rate in receive function for 48 kHz sample rate (e.g. no decimation!)

#define DSP_NR_STRENGTH_MIN 5
#define DSP_NR_STRENGTH_MAX 100 // Maximum menu setting for DSP "Strength"
#define DSP_NR_STRENGTH_STEP 5
#define DSP_NR_STRENGTH_DEFAULT 60 // Default setting
#ifdef OBSOLETE_NR
//
Expand Down
4 changes: 2 additions & 2 deletions mchf-eclipse/drivers/ui/menu/ui_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -784,10 +784,10 @@ void UiMenu_UpdateItem(uint16_t select, uint16_t mode, int pos, int var, char* o
case MENU_DSP_NR_STRENGTH: // DSP Noise reduction strength

var_change = UiDriverMenuItemChangeUInt8(var, mode, &ts.dsp_nr_strength,
1,
DSP_NR_STRENGTH_MIN,
DSP_NR_STRENGTH_MAX,
DSP_NR_STRENGTH_DEFAULT,
2
DSP_NR_STRENGTH_STEP
);
if(var_change)
{
Expand Down
4 changes: 2 additions & 2 deletions mchf-eclipse/drivers/ui/ui_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -3437,8 +3437,8 @@ static void UiDriver_CheckEncoderTwo()
break;
case ENC_TWO_MODE_NR:
if (is_dsp_nr()) // only allow adjustment if DSP NR is active
{
ts.dsp_nr_strength = change_and_limit_uint(ts.dsp_nr_strength,pot_diff_step * 2,1,DSP_NR_STRENGTH_MAX);
{ //
ts.dsp_nr_strength = change_and_limit_uint(ts.dsp_nr_strength,pot_diff_step * DSP_NR_STRENGTH_STEP,DSP_NR_STRENGTH_MIN,DSP_NR_STRENGTH_MAX);

// this causes considerable noise
//AudioDriver_SetRxAudioProcessing(ts.dmod_mode, false);
Expand Down

0 comments on commit 9cd3a58

Please sign in to comment.