mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
check in for inspection
This commit is contained in:
parent
66902b6bfb
commit
70aa5b792b
5 changed files with 15 additions and 8 deletions
|
|
@ -21,8 +21,8 @@ riscv = "0.5.6"
|
|||
debug-print = []
|
||||
print-panics = []
|
||||
report-memory = ["stats_alloc"]
|
||||
#default = ["print-panics", "debug-print"]
|
||||
default = ["print-panics"]
|
||||
default = ["print-panics", "debug-print"]
|
||||
#default = ["print-panics"]
|
||||
|
||||
[target.'cfg(any(windows, unix))'.dependencies]
|
||||
lazy_static = "1.4"
|
||||
|
|
|
|||
|
|
@ -141,10 +141,12 @@ fn xmain() -> ! {
|
|||
info!("GAM: entering main loop");
|
||||
loop {
|
||||
let maybe_env = xous::try_receive_message(gam_sid).unwrap();
|
||||
info!("GAM: Maybe Message: {:?}", maybe_env);
|
||||
match maybe_env {
|
||||
Some(envelope) => {
|
||||
// info!("GAM: Message: {:?}", envelope);
|
||||
info!("GAM: Message: {:?}", envelope);
|
||||
if let Ok(opcode) = Opcode::try_from(&envelope.body) {
|
||||
info!("GAM: Opcode: {:?}", opcode);
|
||||
match opcode {
|
||||
Opcode::ClearCanvas(gid) => {
|
||||
match canvases.get(&gid) {
|
||||
|
|
@ -185,6 +187,7 @@ fn xmain() -> ! {
|
|||
match &*value {
|
||||
rkyv::Archived::<api::Opcode>::RenderTextView(rtv) => {
|
||||
let mut tv = rtv.unarchive();
|
||||
info!("GAM: rendertextview {:?}", tv);
|
||||
match tv.get_op() {
|
||||
TextOp::Nop => (),
|
||||
TextOp::Render | TextOp::ComputeBounds => {
|
||||
|
|
@ -215,7 +218,7 @@ fn xmain() -> ! {
|
|||
|
||||
},
|
||||
};
|
||||
}
|
||||
},
|
||||
_ => panic!("GAM: invalid mutable borrow message"),
|
||||
};
|
||||
} else if let xous::Message::Borrow(m) = &envelope.body {
|
||||
|
|
@ -228,6 +231,7 @@ fn xmain() -> ! {
|
|||
match &*value {
|
||||
rkyv::Archived::<api::Opcode>::RenderObject(rtv) => {
|
||||
let obj: GamObject = rtv.unarchive();
|
||||
info!("GAM: renderobject {:?}", obj);
|
||||
if let Some(canvas) = canvases.get_mut(&obj.canvas) {
|
||||
// first, figure out if we should even be drawing to this canvas.
|
||||
if canvas.is_drawable() {
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ pub fn status_thread(canvas_gid: [u32; 4]) {
|
|||
Point::new(screensize.x, screensize.y),
|
||||
style_dark
|
||||
)).expect("GAM|status: Can't draw border line");
|
||||
loop {
|
||||
loop {
|
||||
let maybe_env = xous::try_receive_message(status_sid).unwrap();
|
||||
match maybe_env {
|
||||
Some(envelope) => {
|
||||
|
|
|
|||
|
|
@ -812,6 +812,7 @@ fn xmain() -> ! {
|
|||
let mut injected_keys: Queue<char, U64, _> = Queue::u8();
|
||||
#[cfg(not(target_os = "none"))]
|
||||
let (mut key_enqueue, mut key_dequeue) = injected_keys.split();
|
||||
/*
|
||||
loop {
|
||||
let maybe_env = xous::try_receive_message(kbd_sid).unwrap();
|
||||
match maybe_env {
|
||||
|
|
@ -941,5 +942,7 @@ fn xmain() -> ! {
|
|||
xous::send_message(*conn, api::Opcode::KeyboardEvent(keys).into()).map(|_| ()).expect("KBD: Couldn't send event to listener");
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
// this shuts up the keyboard thread from polluting the kernel logs when panics happen elsewhere
|
||||
loop {xous::receive_message(kbd_sid).unwrap(); xous::yield_slice();}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,8 +37,8 @@ fn main() {
|
|||
|
||||
fn try_main() -> Result<(), DynError> {
|
||||
let hw_pkgs = [
|
||||
//"gam",
|
||||
"shell",
|
||||
"gam",
|
||||
//"shell",
|
||||
"graphics-server",
|
||||
"ticktimer-server",
|
||||
"log-server",
|
||||
|
|
|
|||
Loading…
Reference in a new issue