From 98042908548b3e6db4206c54990a53255df843af Mon Sep 17 00:00:00 2001 From: bunnie Date: Tue, 2 Mar 2021 21:57:52 +0800 Subject: [PATCH] add some primers to the status loop this helps the screen-up time appear faster, so we aren't waiting for a full poll interval for new data to appear before the system apears to be powered on --- services/gam/src/status.rs | 3 +++ xtask/src/main.rs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/services/gam/src/status.rs b/services/gam/src/status.rs index 44c3359a8..40bd0bb8f 100644 --- a/services/gam/src/status.rs +++ b/services/gam/src/status.rs @@ -59,6 +59,9 @@ pub fn status_thread(canvas_gid: [u32; 4]) { )).expect("GAM|status: Can't draw border line"); com::request_battstat_events(xous::names::SERVER_NAME_STATUS, com_conn).expect("GAM|status: couldn't request events from COM"); + // prime the loop + com::get_batt_stats_nb(com_conn).expect("Can't get battery stats from COM"); + last_seconds = last_seconds - 1; // this will force the uptime to redraw info!("GAM|status: starting main loop"); loop { let maybe_env = xous::try_receive_message(status_sid).unwrap(); diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 0dd4174d1..4f8e380fa 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -44,7 +44,7 @@ fn try_main() -> Result<(), DynError> { "log-server", "com", "xous-names", - //"keyboard", + "keyboard", "trng", //"llio", ];