Skip to content

Commit

Permalink
pw_console: Early log message arrival fix
Browse files Browse the repository at this point in the history
- The LogView class was not checking for existing messages in the
  LogStore instance on startup. This gave the impression that only one
  log arrived until the user scrolls or a new message arrives.
- Bump pw_console MAX_FPS to 30.

Change-Id: Ib8017e076f0da9d1e6d6b29ee944ade002148bc4
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/95364
Pigweed-Auto-Submit: Anthony DiGirolamo <[email protected]>
Reviewed-by: Armando Montanez <[email protected]>
Commit-Queue: Auto-Submit <[email protected]>
  • Loading branch information
AnthonyDiGirolamo authored and CQ Bot Account committed May 19, 2022
1 parent 936601e commit c70fb56
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pw_console/py/pw_console/console_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
# Don't send fake_device logs to the root Python logger.
_FAKE_DEVICE_LOG.propagate = False

MAX_FPS = 15
MAX_FPS = 30
MIN_REDRAW_INTERVAL = (60.0 / MAX_FPS) / 60.0


Expand Down
3 changes: 3 additions & 0 deletions pw_console/py/pw_console/log_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ def __init__(
# Cache of formatted text tuples used in the last UI render.
self._line_fragment_cache: List[StyleAndTextTuples] = []

# Check if any logs are already in the log_store and update the view.
self.new_logs_arrived()

def view_mode_changed(self) -> None:
self._reset_log_screen_on_next_render = True

Expand Down

0 comments on commit c70fb56

Please sign in to comment.