mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
fix missing update to display in panic handler
This commit is contained in:
parent
46624addd0
commit
5d2c65cb6c
2 changed files with 4 additions and 10 deletions
|
|
@ -34,7 +34,6 @@ const TOP_OFFSET: usize = 48;
|
||||||
/// Width and height of the panic box in characters
|
/// Width and height of the panic box in characters
|
||||||
const WIDTH_CHARS: usize = 40;
|
const WIDTH_CHARS: usize = 40;
|
||||||
const HEIGHT_CHARS: usize = 24;
|
const HEIGHT_CHARS: usize = 24;
|
||||||
const TOTAL_CHARS: usize = WIDTH_CHARS * HEIGHT_CHARS;
|
|
||||||
/// these are fixed by the monospace font
|
/// these are fixed by the monospace font
|
||||||
const GLYPH_HEIGHT: usize = 15;
|
const GLYPH_HEIGHT: usize = 15;
|
||||||
const GLYPH_WIDTH: usize = 7;
|
const GLYPH_WIDTH: usize = 7;
|
||||||
|
|
@ -57,7 +56,6 @@ pub(crate) fn panic_handler_thread(
|
||||||
.expect("Couldn't create panic server");
|
.expect("Couldn't create panic server");
|
||||||
|
|
||||||
let mut display = unsafe { PanicDisplay::new(hwfb, control) };
|
let mut display = unsafe { PanicDisplay::new(hwfb, control) };
|
||||||
let mut panic_text = xous_ipc::String::<TOTAL_CHARS>::new();
|
|
||||||
loop {
|
loop {
|
||||||
let msg = xous::receive_message(panic_server).unwrap();
|
let msg = xous::receive_message(panic_server).unwrap();
|
||||||
|
|
||||||
|
|
@ -67,7 +65,6 @@ pub(crate) fn panic_handler_thread(
|
||||||
is_panic.store(true, Ordering::Relaxed);
|
is_panic.store(true, Ordering::Relaxed);
|
||||||
display.panic_rectangle();
|
display.panic_rectangle();
|
||||||
display.append_string(" ~~Guru Meditation~~\n\n");
|
display.append_string(" ~~Guru Meditation~~\n\n");
|
||||||
display.update_dirty();
|
|
||||||
}
|
}
|
||||||
let body = match msg.body.memory_message() {
|
let body = match msg.body.memory_message() {
|
||||||
Some(body) => body,
|
Some(body) => body,
|
||||||
|
|
@ -84,13 +81,7 @@ pub(crate) fn panic_handler_thread(
|
||||||
&body.buf.as_slice()[..len]
|
&body.buf.as_slice()[..len]
|
||||||
)};
|
)};
|
||||||
display.append_string(s);
|
display.append_string(s);
|
||||||
panic_text.append(
|
display.update_dirty();
|
||||||
unsafe{
|
|
||||||
core::str::from_utf8_unchecked(
|
|
||||||
&body.buf.as_slice()[..len]
|
|
||||||
)
|
|
||||||
}
|
|
||||||
).ok();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -106,6 +106,9 @@ impl<'a> ShellCmdApi<'a> for Test {
|
||||||
|
|
||||||
if let Some(sub_cmd) = tokens.next() {
|
if let Some(sub_cmd) = tokens.next() {
|
||||||
match sub_cmd {
|
match sub_cmd {
|
||||||
|
"panic" => {
|
||||||
|
assert!(1 == 0, "Panic test: 1 == 0 failure!");
|
||||||
|
}
|
||||||
"instant" => {
|
"instant" => {
|
||||||
write!(ret, "start elapsed_ms {}\n", env.ticktimer.elapsed_ms()).unwrap();
|
write!(ret, "start elapsed_ms {}\n", env.ticktimer.elapsed_ms()).unwrap();
|
||||||
let now = Instant::now();
|
let now = Instant::now();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue