Skip to content
Open
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ enum class BoolWatchPref(
QuietTimeMotionBacklight("dndMotionBacklight", "Quiet Time - Motion Backlight", true, description = "Enable motion backlight during Quiet Time"),
MusicShowVolumeControls("musicShowVolumeControls", "Show Volume Controls", true),
MusicShowProgressBar("musicShowProgressBar", "Show Progress Bar", true),
MusicPrioritizeWhenPlaying("musicPrioritizeWhenPlaying", "Prioritize when playing", true, description = "Prioritize the Music app in the Launcher when media is playing"),
;

override val type = WatchPrefType.TypeBoolean
Expand Down Expand Up @@ -359,6 +360,17 @@ enum class BacklightTouchWakeMode(override val code: UByte, override val display
Off(2u, "Off"),
}

// pebble-firmware:src/fw/shell/normal/prefs.c - s_music_long_press_vibe_intensity
enum class MusicLongPressVibeIntensity(override val code: UByte, override val displayName: String) : WatchPrefEnum {
VeryLow(10u, "Very Low"),
Low(25u, "Low"),
MediumLow(40u, "Medium-Low"),
Medium(55u, "Medium"),
MediumHigh(70u, "Medium-High"),
High(85u, "High"),
VeryHigh(100u, "Very High"),
}

enum class EnumWatchPref(
override val id: String,
override val displayName: String,
Expand Down Expand Up @@ -458,6 +470,13 @@ enum class EnumWatchPref(
defaultValue = BacklightTouchWakeMode.DoubleTap,
options = BacklightTouchWakeMode.entries,
),
MusicVibeIntensity(
id = "musicLongPressVibeIntensity",
displayName = "Long Press Vibe Intensity",
description = "Intensity of long press haptic feedback. Only applicable when Show Volume Controls is enabled",
defaultValue = MusicLongPressVibeIntensity.VeryHigh,
options = MusicLongPressVibeIntensity.entries,
),
;

override val type = WatchPrefType.TypeUInt8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ fun WatchPref<*>.section(): Section = when (this) {
BoolWatchPref.QuietTimeMotionBacklight -> Section.QuietTime
BoolWatchPref.MusicShowVolumeControls -> Section.Music
BoolWatchPref.MusicShowProgressBar -> Section.Music
BoolWatchPref.MusicPrioritizeWhenPlaying -> Section.Music
EnumWatchPref.MusicVibeIntensity -> Section.Music
}

private fun numberPref(item: WatchPreference<Long>, libPebble: LibPebble): SettingsItem {
Expand Down