diff --git a/src/frontpanel.rs b/src/frontpanel.rs index 76263ef..ad5ec5e 100644 --- a/src/frontpanel.rs +++ b/src/frontpanel.rs @@ -27,6 +27,7 @@ pub enum ActionSwitch { #[derive(Clone, Copy, Debug)] pub enum FrontpanelInteraction { ActionSw(ActionSwitch, SwitchState), + AddrData(u16), Power(bool), } @@ -163,6 +164,7 @@ impl Widget for &mut Frontpanel<'_> { { self.state.ad_sws = (self.state.ad_sws & !(bit_mask)) | (u16::from(sw_state) << (16 - i)); + self.interaction = Some(FrontpanelInteraction::AddrData(self.state.ad_sws())); resp.mark_changed(); }; }); diff --git a/src/state.rs b/src/state.rs index f7ea83a..9d22204 100644 --- a/src/state.rs +++ b/src/state.rs @@ -95,6 +95,7 @@ impl EmuState { self.audio_tx.send(AudioMessage::FanOff).unwrap(); } } + FrontpanelInteraction::AddrData(_) => (), } self.update_fp(); }