mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
fix #227
This commit is contained in:
parent
c483890f9c
commit
9c2523ded4
2 changed files with 38 additions and 9 deletions
|
|
@ -430,6 +430,7 @@ perform the Xous firmware upgrade. This requires running manual update commands,
|
|||
- Cleanup areas where `net` could block on a hung `connection_manager`
|
||||
- Stop running CI on `betrusted-soc` commits: there have been no changes to the design, all of the recent commits are fixing breaking changes in CI tooling. We should not force users to update their `soc` for a design that hasn't actually changed. Thus, users may note that the `soc` commit is not parallel with HEAD on `main`. CI & release staging will from now on be manually triggered only when an actual design change is made.
|
||||
- `smoltcp` is pinned to a branch. A lot of significant fixes have occurred since their last release in June, and we'd like to get this baked into 0.9.15. It's unclear when they will tag out a release, so this is a temporary fix to allow us to move ahead. Will revert to an officially blessed release once it's available!
|
||||
- fix #227 (make wlan status sends fail gracefully)
|
||||
|
||||
## Roadmap
|
||||
- Lots of testing and bug fixes
|
||||
|
|
|
|||
|
|
@ -223,7 +223,10 @@ pub(crate) fn connection_manager(sid: xous::SID, activity_interval: Arc<AtomicU3
|
|||
wifi_stats_cache = WlanStatus::from_ipc(WlanStatusIpc::default());
|
||||
for &sub in status_subscribers.keys() {
|
||||
let buf = Buffer::into_buf(com::WlanStatusIpc::from_status(wifi_stats_cache)).or(Err(xous::Error::InternalError)).unwrap();
|
||||
buf.send(sub, WifiStateCallback::Update.to_u32().unwrap()).or(Err(xous::Error::InternalError)).unwrap();
|
||||
match buf.send(sub, WifiStateCallback::Update.to_u32().unwrap()) {
|
||||
Err(e) => log::warn!("Couldn't update wifi state subscriber: {:?}", e),
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
wifi_state = WifiState::Error;
|
||||
}
|
||||
|
|
@ -240,7 +243,10 @@ pub(crate) fn connection_manager(sid: xous::SID, activity_interval: Arc<AtomicU3
|
|||
wifi_stats_cache = WlanStatus::from_ipc(WlanStatusIpc::default());
|
||||
for &sub in status_subscribers.keys() {
|
||||
let buf = Buffer::into_buf(com::WlanStatusIpc::from_status(wifi_stats_cache)).or(Err(xous::Error::InternalError)).unwrap();
|
||||
buf.send(sub, WifiStateCallback::Update.to_u32().unwrap()).or(Err(xous::Error::InternalError)).unwrap();
|
||||
match buf.send(sub, WifiStateCallback::Update.to_u32().unwrap()) {
|
||||
Err(e) => log::warn!("Couldn't update wifi state subscriber: {:?}", e),
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
}
|
||||
WifiState::Error => {
|
||||
|
|
@ -332,7 +338,10 @@ pub(crate) fn connection_manager(sid: xous::SID, activity_interval: Arc<AtomicU3
|
|||
log::debug!("stats update: {:?}", wifi_stats_cache);
|
||||
for &sub in status_subscribers.keys() {
|
||||
let buf = Buffer::into_buf(com::WlanStatusIpc::from_status(wifi_stats_cache)).or(Err(xous::Error::InternalError)).unwrap();
|
||||
buf.send(sub, WifiStateCallback::Update.to_u32().unwrap()).or(Err(xous::Error::InternalError)).unwrap();
|
||||
match buf.send(sub, WifiStateCallback::Update.to_u32().unwrap()) {
|
||||
Err(e) => log::warn!("Couldn't update wifi state subscriber: {:?}", e),
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
if wifi_stats_cache.ipv4.dhcp == com_rs::DhcpState::Bound {
|
||||
wifi_state = WifiState::Connected;
|
||||
|
|
@ -384,7 +393,10 @@ pub(crate) fn connection_manager(sid: xous::SID, activity_interval: Arc<AtomicU3
|
|||
wifi_stats_cache = WlanStatus::from_ipc(WlanStatusIpc::default());
|
||||
for &sub in status_subscribers.keys() {
|
||||
let buf = Buffer::into_buf(com::WlanStatusIpc::from_status(wifi_stats_cache)).or(Err(xous::Error::InternalError)).unwrap();
|
||||
buf.send(sub, WifiStateCallback::Update.to_u32().unwrap()).or(Err(xous::Error::InternalError)).unwrap();
|
||||
match buf.send(sub, WifiStateCallback::Update.to_u32().unwrap()) {
|
||||
Err(e) => log::warn!("Couldn't update wifi state subscriber: {:?}", e),
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -456,7 +468,11 @@ pub(crate) fn connection_manager(sid: xous::SID, activity_interval: Arc<AtomicU3
|
|||
log::debug!("stats update: {:?}", wifi_stats_cache);
|
||||
for &sub in status_subscribers.keys() {
|
||||
let buf = Buffer::into_buf(com::WlanStatusIpc::from_status(wifi_stats_cache)).or(Err(xous::Error::InternalError)).unwrap();
|
||||
buf.send(sub, WifiStateCallback::Update.to_u32().unwrap()).or(Err(xous::Error::InternalError)).unwrap();
|
||||
match buf.send(sub, WifiStateCallback::Update.to_u32().unwrap()) {
|
||||
// just issue a warning -- this isn't a hard error because subscribers can disappear, but good to know this is happening.
|
||||
Err(e) => log::warn!("Couldn't update wifi state subscriber: {:?}", e),
|
||||
_ => (),
|
||||
};
|
||||
}
|
||||
}
|
||||
WifiState::Off => {
|
||||
|
|
@ -480,7 +496,10 @@ pub(crate) fn connection_manager(sid: xous::SID, activity_interval: Arc<AtomicU3
|
|||
log::debug!("stats update: {:?}", wifi_stats_cache);
|
||||
for &sub in status_subscribers.keys() {
|
||||
let buf = Buffer::into_buf(com::WlanStatusIpc::from_status(wifi_stats_cache)).or(Err(xous::Error::InternalError)).unwrap();
|
||||
buf.send(sub, WifiStateCallback::Update.to_u32().unwrap()).or(Err(xous::Error::InternalError)).unwrap();
|
||||
match buf.send(sub, WifiStateCallback::Update.to_u32().unwrap()) {
|
||||
Err(e) => log::warn!("Couldn't update wifi state subscriber: {:?}", e),
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -587,7 +606,10 @@ pub(crate) fn connection_manager(sid: xous::SID, activity_interval: Arc<AtomicU3
|
|||
log::debug!("stats update: {:?}", wifi_stats_cache);
|
||||
for &sub in status_subscribers.keys() {
|
||||
let buf = Buffer::into_buf(com::WlanStatusIpc::from_status(wifi_stats_cache)).or(Err(xous::Error::InternalError)).unwrap();
|
||||
buf.send(sub, WifiStateCallback::Update.to_u32().unwrap()).or(Err(xous::Error::InternalError)).unwrap();
|
||||
match buf.send(sub, WifiStateCallback::Update.to_u32().unwrap()) {
|
||||
Err(e) => log::warn!("Couldn't update wifi state subscriber: {:?}", e),
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
if !run.swap(true, Ordering::SeqCst) {
|
||||
if !pumping.load(Ordering::SeqCst) { // avoid having multiple pump messages being sent if a user tries to rapidly toggle the run/stop switch
|
||||
|
|
@ -612,7 +634,10 @@ pub(crate) fn connection_manager(sid: xous::SID, activity_interval: Arc<AtomicU3
|
|||
log::debug!("stats update: {:?}", wifi_stats_cache);
|
||||
for &sub in status_subscribers.keys() {
|
||||
let buf = Buffer::into_buf(com::WlanStatusIpc::from_status(wifi_stats_cache)).or(Err(xous::Error::InternalError)).unwrap();
|
||||
buf.send(sub, WifiStateCallback::Update.to_u32().unwrap()).or(Err(xous::Error::InternalError)).unwrap();
|
||||
match buf.send(sub, WifiStateCallback::Update.to_u32().unwrap()) {
|
||||
Err(e) => log::warn!("Couldn't update wifi state subscriber: {:?}", e),
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
if !run.swap(true, Ordering::SeqCst) {
|
||||
if !pumping.load(Ordering::SeqCst) { // avoid having multiple pump messages being sent if a user tries to rapidly toggle the run/stop switch
|
||||
|
|
@ -640,7 +665,10 @@ pub(crate) fn connection_manager(sid: xous::SID, activity_interval: Arc<AtomicU3
|
|||
log::debug!("stats update: {:?}", wifi_stats_cache);
|
||||
for &sub in status_subscribers.keys() {
|
||||
let buf = Buffer::into_buf(com::WlanStatusIpc::from_status(wifi_stats_cache)).or(Err(xous::Error::InternalError)).unwrap();
|
||||
buf.send(sub, WifiStateCallback::Update.to_u32().unwrap()).or(Err(xous::Error::InternalError)).unwrap();
|
||||
match buf.send(sub, WifiStateCallback::Update.to_u32().unwrap()) {
|
||||
Err(e) => log::warn!("Couldn't update wifi state subscriber: {:?}", e),
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
}
|
||||
Some(ConnectionManagerOpcode::EcReset) => msg_scalar_unpack!(msg, _, _, _, _, {
|
||||
|
|
|
|||
Loading…
Reference in a new issue