Skip to content

Commit

Permalink
Merge pull request #101 from george124816/master
Browse files Browse the repository at this point in the history
feat: add buds 2 pro support
  • Loading branch information
JojiiOfficial committed Apr 2, 2023
2 parents fc10f71 + 5499d30 commit 4a2d75f
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 49 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/) and [Galaxy Buds 2](https://www.samsung.com/us/mobile-audio/galaxy-buds2/)
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: 2 additions & 0 deletions src/daemon/bluetooth/bt_connection_listener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ 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 2 pro") {
Model::BudsPro2
} else if device_name.contains("buds+") {
Model::BudsPlus
} else if device_name.contains("buds2") {
Expand Down
8 changes: 8 additions & 0 deletions src/daemon/buds_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,13 @@ impl BudsInfo {
}
Model::Buds => 3,
Model::Buds2 => 3,
Model::BudsPro2 => {
if self.has_feature(Feature::ExtraHighAmbientVolume) {
4
} else {
3
}
}
}
}

Expand Down Expand Up @@ -227,4 +234,5 @@ enum DefModel {
BudsLive,
BudsPro,
Buds2,
BudsPro2,
}

0 comments on commit 4a2d75f

Please sign in to comment.