Skip to content

Commit

Permalink
Potential fix for #503
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmarkov committed Oct 18, 2024
1 parent 74c7a27 commit 59db1a0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/wifi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2122,9 +2122,9 @@ impl fmt::Debug for ApStaDisconnectedRef {
#[repr(C)]
pub struct HomeChannelChange {
old_chan: u8,
old_snd: WifiSecondChan,
old_snd: Option<WifiSecondChan>,
new_chan: u8,
new_snd: WifiSecondChan,
new_snd: Option<WifiSecondChan>,
}

#[cfg(not(any(
Expand Down Expand Up @@ -2340,9 +2340,9 @@ impl EspEventDeserializer for WifiEvent<'_> {

WifiEvent::HomeChannelChange(HomeChannelChange {
old_chan: payload.old_chan,
old_snd: payload.old_snd.try_into().unwrap(),
old_snd: payload.old_snd.try_into().ok(),
new_chan: payload.new_chan,
new_snd: payload.new_snd.try_into().unwrap(),
new_snd: payload.new_snd.try_into().ok(),
})
}
_ => panic!("unknown event ID: {}", event_id),
Expand Down

0 comments on commit 59db1a0

Please sign in to comment.