Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Esp32_radio/Esp32_radio.ino
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,8 @@ sv bool longclick = false ; // True if longclick de
enum enc_menu_t { VOLUME, PRESET, TRACK } ; // State for rotary encoder menu
enc_menu_t enc_menu_mode = VOLUME ; // Default is VOLUME mode

int VolumeStep = 5; // Step for changing Volume by Rotary Encoder

//
struct progpin_struct // For programmable input pins
{
Expand Down Expand Up @@ -4343,17 +4345,17 @@ void chk_enc()
switch ( enc_menu_mode ) // Which mode (VOLUME, PRESET, TRACK)?
{
case VOLUME :
if ( ( ini_block.reqvol + rotationcount ) < 0 ) // Limit volume
if ( ( ini_block.reqvol + (rotationcount * VolumeStep)) < 0 ) // Limit volume
{
ini_block.reqvol = 0 ; // Limit to normal values
}
else if ( ( ini_block.reqvol + rotationcount ) > 100 )
else if ( ( ini_block.reqvol + (rotationcount * VolumeStep) ) > 100 )
{
ini_block.reqvol = 100 ; // Limit to normal values
}
else
{
ini_block.reqvol += rotationcount ;
ini_block.reqvol += rotationcount * VolumeStep;
}
muteflag = false ; // Mute off
break ;
Expand Down