mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +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 = []
|
debug-print = []
|
||||||
print-panics = []
|
print-panics = []
|
||||||
report-memory = ["stats_alloc"]
|
report-memory = ["stats_alloc"]
|
||||||
#default = ["print-panics", "debug-print"]
|
default = ["print-panics", "debug-print"]
|
||||||
default = ["print-panics"]
|
#default = ["print-panics"]
|
||||||
|
|
||||||
[target.'cfg(any(windows, unix))'.dependencies]
|
[target.'cfg(any(windows, unix))'.dependencies]
|
||||||
lazy_static = "1.4"
|
lazy_static = "1.4"
|
||||||
|
|
|
||||||
|
|
@ -141,10 +141,12 @@ fn xmain() -> ! {
|
||||||
info!("GAM: entering main loop");
|
info!("GAM: entering main loop");
|
||||||
loop {
|
loop {
|
||||||
let maybe_env = xous::try_receive_message(gam_sid).unwrap();
|
let maybe_env = xous::try_receive_message(gam_sid).unwrap();
|
||||||
|
info!("GAM: Maybe Message: {:?}", maybe_env);
|
||||||
match maybe_env {
|
match maybe_env {
|
||||||
Some(envelope) => {
|
Some(envelope) => {
|
||||||
// info!("GAM: Message: {:?}", envelope);
|
info!("GAM: Message: {:?}", envelope);
|
||||||
if let Ok(opcode) = Opcode::try_from(&envelope.body) {
|
if let Ok(opcode) = Opcode::try_from(&envelope.body) {
|
||||||
|
info!("GAM: Opcode: {:?}", opcode);
|
||||||
match opcode {
|
match opcode {
|
||||||
Opcode::ClearCanvas(gid) => {
|
Opcode::ClearCanvas(gid) => {
|
||||||
match canvases.get(&gid) {
|
match canvases.get(&gid) {
|
||||||
|
|
@ -185,6 +187,7 @@ fn xmain() -> ! {
|
||||||
match &*value {
|
match &*value {
|
||||||
rkyv::Archived::<api::Opcode>::RenderTextView(rtv) => {
|
rkyv::Archived::<api::Opcode>::RenderTextView(rtv) => {
|
||||||
let mut tv = rtv.unarchive();
|
let mut tv = rtv.unarchive();
|
||||||
|
info!("GAM: rendertextview {:?}", tv);
|
||||||
match tv.get_op() {
|
match tv.get_op() {
|
||||||
TextOp::Nop => (),
|
TextOp::Nop => (),
|
||||||
TextOp::Render | TextOp::ComputeBounds => {
|
TextOp::Render | TextOp::ComputeBounds => {
|
||||||
|
|
@ -215,7 +218,7 @@ fn xmain() -> ! {
|
||||||
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
},
|
||||||
_ => panic!("GAM: invalid mutable borrow message"),
|
_ => panic!("GAM: invalid mutable borrow message"),
|
||||||
};
|
};
|
||||||
} else if let xous::Message::Borrow(m) = &envelope.body {
|
} else if let xous::Message::Borrow(m) = &envelope.body {
|
||||||
|
|
@ -228,6 +231,7 @@ fn xmain() -> ! {
|
||||||
match &*value {
|
match &*value {
|
||||||
rkyv::Archived::<api::Opcode>::RenderObject(rtv) => {
|
rkyv::Archived::<api::Opcode>::RenderObject(rtv) => {
|
||||||
let obj: GamObject = rtv.unarchive();
|
let obj: GamObject = rtv.unarchive();
|
||||||
|
info!("GAM: renderobject {:?}", obj);
|
||||||
if let Some(canvas) = canvases.get_mut(&obj.canvas) {
|
if let Some(canvas) = canvases.get_mut(&obj.canvas) {
|
||||||
// first, figure out if we should even be drawing to this canvas.
|
// first, figure out if we should even be drawing to this canvas.
|
||||||
if canvas.is_drawable() {
|
if canvas.is_drawable() {
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ pub fn status_thread(canvas_gid: [u32; 4]) {
|
||||||
Point::new(screensize.x, screensize.y),
|
Point::new(screensize.x, screensize.y),
|
||||||
style_dark
|
style_dark
|
||||||
)).expect("GAM|status: Can't draw border line");
|
)).expect("GAM|status: Can't draw border line");
|
||||||
loop {
|
loop {
|
||||||
let maybe_env = xous::try_receive_message(status_sid).unwrap();
|
let maybe_env = xous::try_receive_message(status_sid).unwrap();
|
||||||
match maybe_env {
|
match maybe_env {
|
||||||
Some(envelope) => {
|
Some(envelope) => {
|
||||||
|
|
|
||||||
|
|
@ -812,6 +812,7 @@ fn xmain() -> ! {
|
||||||
let mut injected_keys: Queue<char, U64, _> = Queue::u8();
|
let mut injected_keys: Queue<char, U64, _> = Queue::u8();
|
||||||
#[cfg(not(target_os = "none"))]
|
#[cfg(not(target_os = "none"))]
|
||||||
let (mut key_enqueue, mut key_dequeue) = injected_keys.split();
|
let (mut key_enqueue, mut key_dequeue) = injected_keys.split();
|
||||||
|
/*
|
||||||
loop {
|
loop {
|
||||||
let maybe_env = xous::try_receive_message(kbd_sid).unwrap();
|
let maybe_env = xous::try_receive_message(kbd_sid).unwrap();
|
||||||
match maybe_env {
|
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");
|
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> {
|
fn try_main() -> Result<(), DynError> {
|
||||||
let hw_pkgs = [
|
let hw_pkgs = [
|
||||||
//"gam",
|
"gam",
|
||||||
"shell",
|
//"shell",
|
||||||
"graphics-server",
|
"graphics-server",
|
||||||
"ticktimer-server",
|
"ticktimer-server",
|
||||||
"log-server",
|
"log-server",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue