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
This commit is contained in:
bunnie 2021-03-02 21:57:52 +08:00
parent 61b609d705
commit 9804290854
2 changed files with 4 additions and 1 deletions

View file

@ -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();

View file

@ -44,7 +44,7 @@ fn try_main() -> Result<(), DynError> {
"log-server",
"com",
"xous-names",
//"keyboard",
"keyboard",
"trng",
//"llio",
];