linux-rust: add anc control for nothing device

This commit is contained in:
Kavish Devar
2025-11-10 00:02:16 +05:30
parent 381b09725b
commit 23cf5728e9
3 changed files with 139 additions and 24 deletions

View File

@@ -341,6 +341,14 @@ impl App {
Some(DeviceType::Nothing) => {
self.device_states.insert(mac.clone(), DeviceState::Nothing(NothingState {
anc_mode: NothingAncMode::Off,
anc_mode_state: combo_box::State::new(vec![
NothingAncMode::Off,
NothingAncMode::Transparency,
NothingAncMode::AdaptiveNoiseCancellation,
NothingAncMode::LowNoiseCancellation,
NothingAncMode::MidNoiseCancellation,
NothingAncMode::HighNoiseCancellation
]),
}));
}
_ => {}
@@ -444,6 +452,9 @@ impl App {
}
BluetoothUIMessage::ATTNotification(mac, handle, value) => {
debug!("ATT Notification for {}: handle=0x{:04X}, value={:?}", mac, handle, value);
// TODO: Handle Nothing's ANC Mode changes here
let ui_rx = Arc::clone(&self.ui_rx);
let wait_task = Task::perform(
wait_for_message(ui_rx),