Receive adaptive anc notifications

This commit is contained in:
Kavish Devar
2024-10-06 21:21:03 +05:30
parent 028d83b2a4
commit 2aeb2b02a7
21 changed files with 215 additions and 63 deletions

View File

@@ -52,16 +52,16 @@ def input_thread(connection: Connection):
while True:
anc_mode = input()
if anc_mode == '1':
connection.send(enums.SET_NOISE_CANCELLATION_OFF)
connection.send(enums.NOISE_CANCELLATION_OFF)
logging.info('ANC Off')
elif anc_mode == '2':
connection.send(enums.SET_NOISE_CANCELLATION_TRANSPARENCY)
connection.send(enums.NOISE_CANCELLATION_TRANSPARENCY)
logging.info('Transparency On')
elif anc_mode == '3':
connection.send(enums.SET_NOISE_CANCELLATION_ADAPTIVE)
connection.send(enums.NOISE_CANCELLATION_ADAPTIVE)
logging.info('Adaptive Transparency On')
elif anc_mode == '4':
connection.send(enums.SET_NOISE_CANCELLATION_ON)
connection.send(enums.NOISE_CANCELLATION_ON)
logging.info('ANC On')
else:
logging.error('Invalid ANC Mode')