Skip to content

Commit

Permalink
fixups for demos (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewhammer authored Jan 14, 2021
1 parent 50e8521 commit 34addb3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions scripts/MirrorGarden-demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ echo
echo Hint: Ready for manual mini-terminal connection:
echo For example:
echo
echo ic-mt connect 127.0.0.1:8000 `dfx canister id MirrorGarden` --user '("xyz", (100, 200, 200))'
echo ic-mt connect 127.0.0.1:8000 `dfx canister id MirrorGarden` --user '("User", (100, 200, 200))'
echo
case ${1} in
"" | "0")
Expand All @@ -29,7 +29,7 @@ case ${1} in
echo
;;
"2")
ic-mt ${2} connect 127.0.0.1:8000 `dfx canister id MirrorGarden` --user '("Alice", (100, 200, 200))'
ic-mt ${2} connect 127.0.0.1:8000 `dfx canister id MirrorGarden` --user '("Alice", (100, 200, 200))' &
ic-mt ${2} connect 127.0.0.1:8000 `dfx canister id MirrorGarden` --user '("Bob", (200, 100, 200))' &
echo
echo Started two live terminals, for Alice and Bob.
Expand Down
12 changes: 6 additions & 6 deletions src/bin/ic-mt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ async fn local_event_loop(ctx: ConnectCtx) -> Result<(), IcmtError> {
replay_events.len(),
frame_size
);
dump_events.extend(replay_events.clone());
dump_events.extend(replay_events_now.clone());
update_out.send(ServiceCall::Update(
replay_events_now,
graphics::Request::All(window_dim.clone()),
Expand All @@ -442,10 +442,10 @@ async fn local_event_loop(ctx: ConnectCtx) -> Result<(), IcmtError> {
};
match update_msg {
Ok(graphics) => {
info!("graphics.len() = {}", graphics.len());
debug!("graphics.len() = {}", graphics.len());
dump_graphics.extend(graphics);
update_responses += 1;
info!("update_responses = {}", update_responses);
debug!("update_responses = {}", update_responses);
if is_live {
/* send the local events in the view buffer */
let req = if ctx.cfg.cli_opt.all_graphics {
Expand All @@ -471,7 +471,7 @@ async fn local_event_loop(ctx: ConnectCtx) -> Result<(), IcmtError> {
}
};
update_requests += 1;
info!("update_requests = {}", update_requests);
debug!("update_requests = {}", update_requests);
update_events = view_events;
view_events = vec![];
dirty_flag = true;
Expand Down Expand Up @@ -519,7 +519,7 @@ async fn local_event_loop(ctx: ConnectCtx) -> Result<(), IcmtError> {
match view_in.try_recv() {
Ok(rr) => {
view_responses += 1;
info!("view_responses = {}", view_responses);
debug!("view_responses = {}", view_responses);

do_redraw(
&(ctx.cfg).cli_opt,
Expand All @@ -546,7 +546,7 @@ async fn local_event_loop(ctx: ConnectCtx) -> Result<(), IcmtError> {
view_out.send(Some((window_dim.clone(), events)))?;

view_requests += 1;
info!("view_requests = {}", view_requests);
debug!("view_requests = {}", view_requests);
}
};

Expand Down

0 comments on commit 34addb3

Please sign in to comment.