From 9d34ea08050e74ffae36c81be7af57621b8a970f Mon Sep 17 00:00:00 2001 From: Neil Enns Date: Sat, 11 Jan 2025 17:53:03 -0800 Subject: [PATCH] Adjust default step to 2 Fixes #372 --- com.neil-enns.trackaudio.sdPlugin/pi/mainVolume.html | 2 +- com.neil-enns.trackaudio.sdPlugin/pi/stationVolume.html | 2 +- src/controllers/mainVolume.ts | 4 ++-- src/controllers/stationVolume.ts | 7 ++++--- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/com.neil-enns.trackaudio.sdPlugin/pi/mainVolume.html b/com.neil-enns.trackaudio.sdPlugin/pi/mainVolume.html index bcacb0b..34aa256 100644 --- a/com.neil-enns.trackaudio.sdPlugin/pi/mainVolume.html +++ b/com.neil-enns.trackaudio.sdPlugin/pi/mainVolume.html @@ -10,7 +10,7 @@ setting="changeAmount" min="1" max="10" - default="1" + default="2" showlabels required > diff --git a/com.neil-enns.trackaudio.sdPlugin/pi/stationVolume.html b/com.neil-enns.trackaudio.sdPlugin/pi/stationVolume.html index d08d857..7ccc6d4 100644 --- a/com.neil-enns.trackaudio.sdPlugin/pi/stationVolume.html +++ b/com.neil-enns.trackaudio.sdPlugin/pi/stationVolume.html @@ -18,7 +18,7 @@ setting="changeAmount" min="1" max="10" - default="1" + default="2" showlabels required > diff --git a/src/controllers/mainVolume.ts b/src/controllers/mainVolume.ts index f4821b9..1c41c00 100644 --- a/src/controllers/mainVolume.ts +++ b/src/controllers/mainVolume.ts @@ -137,8 +137,8 @@ export class MainVolumeController extends BaseController { * Convenience property to get the changeAmount value of settings. */ get changeAmount() { - const amount = this.settings.changeAmount ?? 1; - return amount > 0 ? amount : 1; + const amount = this.settings.changeAmount ?? 2; + return amount > 0 ? amount : 2; } override reset(): void { diff --git a/src/controllers/stationVolume.ts b/src/controllers/stationVolume.ts index 3271451..2399f7c 100644 --- a/src/controllers/stationVolume.ts +++ b/src/controllers/stationVolume.ts @@ -102,9 +102,9 @@ export class StationVolumeController extends BaseController { this._outputVolume = newValue; - // This isn't debounced to ensure speedy updates when the volume changes. + // This isn't debounced to ensure speedy updates when the volume changes. this.refreshImage(); - this.refreshTitle(); + this.refreshTitle(); } /** @@ -205,7 +205,8 @@ export class StationVolumeController extends BaseController { * Convenience property to get the changeAmount value of settings. */ get changeAmount() { - return this.settings.changeAmount ?? 1; + const amount = this.settings.changeAmount ?? 2; + return amount > 0 ? amount : 2; } override reset(): void {