pw_console: Early log message arrival fix
- 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 <tonymd@google.com>
Reviewed-by: Armando Montanez <amontanez@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
diff --git a/pw_console/py/pw_console/console_app.py b/pw_console/py/pw_console/console_app.py
index b836384..8051148 100644
--- a/pw_console/py/pw_console/console_app.py
+++ b/pw_console/py/pw_console/console_app.py
@@ -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
diff --git a/pw_console/py/pw_console/log_view.py b/pw_console/py/pw_console/log_view.py
index 2b54f9e..5ba56eb 100644
--- a/pw_console/py/pw_console/log_view.py
+++ b/pw_console/py/pw_console/log_view.py
@@ -143,6 +143,9 @@
# 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