esp-hosted: wait for esp firmware init.

This commit is contained in:
Dario Nieuwenhuis
2023-06-21 19:05:20 +02:00
parent 082f1ab494
commit 764b43e82c
4 changed files with 37 additions and 3 deletions

View File

@ -11,6 +11,7 @@ use ioctl::Shared;
use proto::CtrlMsg;
use crate::ioctl::PendingIoctl;
use crate::proto::CtrlMsgPayload;
mod proto;
@ -308,6 +309,16 @@ where
};
debug!("event: {:?}", &event);
let Some(payload) = &event.payload else {
warn!("event without payload?");
return
};
match payload {
CtrlMsgPayload::EventEspInit(_) => self.shared.init_done(),
_ => {}
}
}
}