mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
add debug help to tokens, remove the unused RTC token entry
This commit is contained in:
parent
ce61d5415a
commit
77e44075a6
1 changed files with 11 additions and 2 deletions
|
|
@ -12,14 +12,13 @@ use xous_ipc::String;
|
|||
*/
|
||||
|
||||
// if you add more UxContexts, and you want them authorized by the GAM, add their names here.
|
||||
const TOKEN_SLOTS: usize = 10;
|
||||
const TOKEN_SLOTS: usize = 9;
|
||||
const EXPECTED_BOOT_CONTEXTS: [&'static str; TOKEN_SLOTS] = [
|
||||
"shellchat",
|
||||
"main menu",
|
||||
"status",
|
||||
"emoji menu",
|
||||
"rootkeys modal",
|
||||
"rtc modal",
|
||||
"rootkeys menu",
|
||||
"test modal",
|
||||
"pddb modal",
|
||||
|
|
@ -50,6 +49,16 @@ impl<'a> TokenManager {
|
|||
allow = false
|
||||
}
|
||||
}
|
||||
// throw a bone to the dev who has to debug this error. This typically only triggers after a major
|
||||
// refactor and some UX element was removed and we forgot to update it in this table here.
|
||||
if !allow {
|
||||
log::info!("Occupied token slots:");
|
||||
for t in self.tokens.iter() {
|
||||
if let Some(s) = t {
|
||||
log::info!("{}", s.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
allow
|
||||
}
|
||||
pub(crate) fn claim_token(&mut self, name: &str) -> Option<[u32; 4]> {
|
||||
|
|
|
|||
Loading…
Reference in a new issue