Skip to content

Commit

Permalink
refactor: using buds pro 2 instead buds 2 pro
Browse files Browse the repository at this point in the history
  • Loading branch information
george124816 committed Apr 2, 2023
1 parent 640a945 commit 5499d30
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 56 deletions.
107 changes: 59 additions & 48 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![earbuds-git](https://img.shields.io/aur/version/earbuds-git?style=flat-square&label=earbuds-git&logo=arch-linux)](https://aur.archlinux.org/packages/earbuds-git/)

# LiveBudsCli
A free cli tool to control your [Galaxy buds live](https://www.samsung.com/us/mobile-audio/galaxy-buds-live), [Galaxy Buds+](https://www.samsung.com/us/mobile/audio/galaxy-buds-plus/), [Galaxy Buds Pro](https://www.samsung.com/us/mobile/audio/galaxy-buds-pro/),[Galaxy Buds 2](https://www.samsung.com/us/mobile-audio/galaxy-buds2/) and [Galaxy Buds 2 Pro](https://www.samsung.com/us/mobile-audio/galaxy-buds2-pro/)
A free cli tool to control your [Galaxy buds live](https://www.samsung.com/us/mobile-audio/galaxy-buds-live), [Galaxy Buds+](https://www.samsung.com/us/mobile/audio/galaxy-buds-plus/), [Galaxy Buds Pro](https://www.samsung.com/us/mobile/audio/galaxy-buds-pro/), [Galaxy Buds 2](https://www.samsung.com/us/mobile-audio/galaxy-buds2/) and [Galaxy Buds 2 Pro](https://www.samsung.com/us/mobile-audio/galaxy-buds2-pro/)

`Note: This requires your buds to be up to date. Buds with old firmware aren't supported`

Expand Down
2 changes: 1 addition & 1 deletion src/daemon/bluetooth/bt_connection_listener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ fn name_to_model(device_name: &str) -> Model {
Model::BudsLive
} else if device_name.contains("buds pro") {
Model::BudsPro
} else if device_name.contains("buds pro 2") {
} else if device_name.contains("buds 2 pro") {
Model::BudsPro2
} else if device_name.contains("buds+") {
Model::BudsPlus
Expand Down
12 changes: 6 additions & 6 deletions src/daemon/buds_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,23 +120,23 @@ impl BudsInfo {
3
}
}
Model::BudsPro2 => {
Model::BudsLive => 0,
Model::BudsPlus => {
if self.has_feature(Feature::ExtraHighAmbientVolume) {
4
} else {
3
}
}
Model::BudsLive => 0,
Model::BudsPlus => {
Model::Buds => 3,
Model::Buds2 => 3,
Model::BudsPro2 => {
if self.has_feature(Feature::ExtraHighAmbientVolume) {
4
} else {
3
}
}
Model::Buds => 3,
Model::Buds2 => 3,
}
}

Expand Down Expand Up @@ -233,6 +233,6 @@ enum DefModel {
BudsPlus,
BudsLive,
BudsPro,
BudsPro2,
Buds2,
BudsPro2,
}

0 comments on commit 5499d30

Please sign in to comment.