Fix volume adjustment
This commit is contained in:
parent
9745b18316
commit
34485f5a57
|
@ -4,8 +4,6 @@
|
||||||
#define ADJ_TYPEMATIC_DELAY 500
|
#define ADJ_TYPEMATIC_DELAY 500
|
||||||
#define ADJ_TYPEMATIC_REPEAT 33
|
#define ADJ_TYPEMATIC_REPEAT 33
|
||||||
|
|
||||||
#define VOLUME_INITIAL 0.8
|
|
||||||
|
|
||||||
const char *settingNames[4] = {"c", "r", "d", "*"};
|
const char *settingNames[4] = {"c", "r", "d", "*"};
|
||||||
|
|
||||||
// quellUntil can be set to give the user time to get their fingers off the continuous adjustment buttons.
|
// quellUntil can be set to give the user time to get their fingers off the continuous adjustment buttons.
|
||||||
|
@ -38,7 +36,7 @@ void setupVolume() {
|
||||||
case ADJUST_DOWN:
|
case ADJUST_DOWN:
|
||||||
{
|
{
|
||||||
float vol = volume[i] + float(volAdjust)*0.02;
|
float vol = volume[i] + float(volAdjust)*0.02;
|
||||||
volume[i] = min(max(vol, 1.0), 0.0);
|
volume[i] = max(min(vol, 1.0), 0.0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -22,8 +22,9 @@ Tuning tuning = Tuning(NOTE_D4, PITCH_CONCERT_D4, TUNINGSYSTEM_JUST);
|
||||||
Adafruit_SSD1306 display(128, 32, &Wire, -1);
|
Adafruit_SSD1306 display(128, 32, &Wire, -1);
|
||||||
|
|
||||||
// Settings
|
// Settings
|
||||||
|
#define VOLUME_INITIAL 0.8
|
||||||
uint8_t patch[4] = {0};
|
uint8_t patch[4] = {0};
|
||||||
float volume[5] = {0.8, 0.8, 0.8, 0.8, 0.5};
|
float volume[5] = {VOLUME_INITIAL, VOLUME_INITIAL, VOLUME_INITIAL, VOLUME_INITIAL, 0.5};
|
||||||
|
|
||||||
// Pipes
|
// Pipes
|
||||||
#define NUM_DRONES 3
|
#define NUM_DRONES 3
|
||||||
|
|
Loading…
Reference in New Issue