Fix the example
This commit is contained in:
parent
2dc421a589
commit
5fa1b8bc26
@ -516,7 +516,7 @@ pub struct BssInfo {
|
||||
pub bssid: [u8; 6],
|
||||
pub beacon_period: u16,
|
||||
pub capability: u16,
|
||||
pub ssid: heapless::String<32>,
|
||||
pub ssid: heapless::Vec<u8, 32>,
|
||||
pub rssi: i16,
|
||||
pub security: BssSecurity,
|
||||
}
|
||||
@ -573,10 +573,7 @@ impl BssInfo {
|
||||
0 => BssSecurity::Open,
|
||||
_ => BssSecurity::None,
|
||||
};
|
||||
let ssid = heapless::String::from_utf8(
|
||||
heapless::Vec::from_slice(&bss_info.ssid[..bss_info.ssid_len as usize]).unwrap(),
|
||||
)
|
||||
.ok()?;
|
||||
let ssid = heapless::Vec::from_slice(&bss_info.ssid[..bss_info.ssid_len as usize]).unwrap();
|
||||
let BssInfoInternal {
|
||||
version,
|
||||
length,
|
||||
|
@ -65,7 +65,7 @@ async fn main(spawner: Spawner) {
|
||||
.set_power_management(cyw43::PowerManagementMode::PowerSave)
|
||||
.await;
|
||||
|
||||
let mut scanner = control.scan().await;
|
||||
let mut scanner = control.scan(Default::default()).await;
|
||||
while let Some(bss) = scanner.next().await {
|
||||
if let Ok(ssid_str) = str::from_utf8(&bss.ssid) {
|
||||
info!("scanned {} == {:x}", ssid_str, bss.bssid);
|
||||
|
Loading…
Reference in New Issue
Block a user