Skip to content

Commit

Permalink
Callback to data interval
Browse files Browse the repository at this point in the history
  • Loading branch information
tsmbland committed Dec 12, 2023
1 parent 1ca2e7e commit fcbb679
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/pages/control.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,3 +327,12 @@ def default_button_click(n_clicks: int | None) -> list[str]:
get_default("PC02-Left"),
get_default("PC02-Right"),
]


@callback(
[Output("data_interval", "interval")], [Input("update-interval-slider", "value")]
)
def update_interval(value: int) -> list[int]:
"""Returns the update interval value."""
log.debug(f"Update interval set to {value} seconds.")
return [value * 1000]

0 comments on commit fcbb679

Please sign in to comment.