Skip to content

Commit

Permalink
[Fix] Awareness level setting not work
Browse files Browse the repository at this point in the history
  • Loading branch information
melianmiko committed Sep 24, 2024
1 parent 8a9c10a commit 662fad7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
7 changes: 3 additions & 4 deletions openfreebuds/driver/huawei/handler/anc.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,10 @@ async def on_package(self, pkg: HuaweiSppPackage):
# If cancellation turned on and support levels, list them
new_props["level"] = self.cancel_level_options.get(data[0], data[0])
new_props["level_options"] = ",".join(self.cancel_level_options.values())

if data[1] == 2 and self.w_voice_boost:
elif data[1] == 2 and self.w_voice_boost:
# If awareness turned on and support voice boost
new_props["level"] = "voice_boost" if data[0] != 0 else "normal"
new_props["level_options"] = "normal,voice_boost"
new_props["level"] = self.awareness_level_options.get(data[0], data[0])
new_props["level_options"] = ",".join(self.awareness_level_options.values())

await self.driver.put_property("anc", None, new_props)

Expand Down
1 change: 1 addition & 0 deletions scripts/build_debian/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ install:
pip install --upgrade --no-dependencies --target="${DESTDIR}${DIST_PACKAGES_PATH}" ${WHEEL_FILE}
mkdir -p ${DESTDIR}/usr/bin
mv ${DESTDIR}${DIST_PACKAGES_PATH}/bin/* ${DESTDIR}/usr/bin/
ln -s ${DESTDIR}/usr/bin/openfreebuds_qt ${DESTDIR}/usr/bin/openfreebuds
sed -i '1 s/^.*$$/\#\!\/usr\/bin\/env python3/' ${DESTDIR}/usr/bin/*
rm -rf ${DESTDIR}${DIST_PACKAGES_PATH}/bin
mkdir -p ${DESTDIR}/usr/share/icons/hicolor/256x256/apps
Expand Down

0 comments on commit 662fad7

Please sign in to comment.