switch to laptop ap
handles robot restarts better
This commit is contained in:
parent
3ea2af5c60
commit
02720f32dd
1 changed files with 14 additions and 1 deletions
|
@ -15,6 +15,7 @@ use core::mem::transmute;
|
||||||
use core::panic::PanicInfo;
|
use core::panic::PanicInfo;
|
||||||
use core::str::from_utf8;
|
use core::str::from_utf8;
|
||||||
|
|
||||||
|
use cyw43::JoinOptions;
|
||||||
use cyw43_pio::{PioSpi, DEFAULT_CLOCK_DIVIDER};
|
use cyw43_pio::{PioSpi, DEFAULT_CLOCK_DIVIDER};
|
||||||
use embassy_rp::i2c::{Async, I2c};
|
use embassy_rp::i2c::{Async, I2c};
|
||||||
use embassy_rp::multicore::{spawn_core1, Stack};
|
use embassy_rp::multicore::{spawn_core1, Stack};
|
||||||
|
@ -178,7 +179,19 @@ async fn main(spawner: Spawner) {
|
||||||
defmt::unwrap!(spawner.spawn(net_task(runner)));
|
defmt::unwrap!(spawner.spawn(net_task(runner)));
|
||||||
|
|
||||||
// password is not terribly private information
|
// password is not terribly private information
|
||||||
control.start_ap_wpa2("cruisecontrol", "dxSk2avMFvsY", 5).await;
|
//control.start_ap_wpa2("cruisecontrol", "dxSk2avMFvsY", 5).await;
|
||||||
|
|
||||||
|
loop {
|
||||||
|
match control
|
||||||
|
.join("cruisecontrol", JoinOptions::new("dxSk2avMFvsY".as_bytes()))
|
||||||
|
.await
|
||||||
|
{
|
||||||
|
Ok(_) => break,
|
||||||
|
Err(err) => {
|
||||||
|
info!("join failed with status={}", err.status);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let mut rx_buffer = [0; 4096];
|
let mut rx_buffer = [0; 4096];
|
||||||
let mut tx_buffer = [0; 4096];
|
let mut tx_buffer = [0; 4096];
|
||||||
|
|
Loading…
Reference in a new issue