# This is a pw_console config file that defines a default window layout.
# For more info on what can be added to this file see:
#   https://pigweed.dev/pw_console/py/pw_console/docs/user_guide.html#configuration
config_title: pw_console

# Window layout
windows:
  # Left split with tabbed views.
  Split 1 tabbed:
    Python Repl:
      hidden: False
  # Right split with stacked views.
  Split 2 stacked:
    Device Logs:
      hidden: False
    Host Logs:
      hidden: False
    Pubsub Events:
      loggers:
        device.pubsub_events:
          level: DEBUG
      hidden: False

window_column_split_method: vertical
# window_column_split_method: horizontal

# Default colors:
ui_theme: dark
code_theme: pigweed-code
swap_light_and_dark: False

# A few other choices:
# ui_theme: high-contrast-dark
# ui_theme: nord
# ui_theme: synthwave84
# code_theme: gruvbox-dark
# code_theme: pigweed-code-light
# code_theme: synthwave84

# Log display options:
spaces_between_columns: 2
hide_date_from_log_time: True
recolor_log_lines_to_match_level: False

column_order:
  # Column name
  - time
  - level
  - timestamp
  - module
  # Hidden:
  # - source_name

column_order_omit_unspecified_columns: True

snippets:
  Echo RPC:
    code: |
      device.rpcs.pw.rpc.EchoService.Echo(msg='hello world')
    description: |
      Send a string to the device and receive a response with the same
      message back.

      >>> device.rpcs.pw.rpc.EchoService.Echo(msg='hello world')
      (Status.OK, pw.rpc.EchoMessage(msg='hello world'))

  Reboot to bootloader:
    code: |
      device.rpcs.board.Board.Reboot(reboot_type=1)
    description: |
      Sent a reboot request to the device. The console must be
      relaunched to reconnect.

  Get onboard temp sensor value:
    code: |
      device.rpcs.board.Board.OnboardTemp()
    description: |
      Get the current value of the onboard temperature sensor.

      ```pycon
      >>> device.rpcs.board.Board.OnboardTemp()
      (Status.OK, board.OnboardTempResponse(temp=24.797744750976562))
      ```

  Log onboard temp sensor values every 1000ms:
    code: |
      call = device.rpcs.board.Board.OnboardTempStream.invoke(
          request_args=dict(sample_interval_ms=1000),
          on_next=lambda _, message: LOG.info(message)
      )
    description: |
      Start logging with:

      ```pycon
      >>> call = device.rpcs.board.Board.OnboardTempStream.invoke(request_args=dict(sample_interval_ms=1000), on_next=lambda _, message: LOG.info(message))
      ```

      Log messages will appear in the 'Host Logs' window.
      To stop the streaming RPC run `call.cancel()`:

      ```pycon
      >>> call.cancel()
      True
      ```
