Hi Petr,

On 2026-10-10T12:27:54, Petr Hodina via B4 Relay
<[email protected]> wrote:
> cmd: button: add live monitor subcommand
>
> 'button list' prints state once and exits. The new subcommand 'monitor'
> loops the input states with default timeout 5s so live verification
> on the device is easier.

'loops the input states' is still there. Please can you reword it?
Please also mention Ctrl-C, what a zero timeout means, and the move of
the state printing into show_button_status() so that 'list' can share
it. Something like: "Add a 'monitor' subcommand which redraws the
state of all buttons every 100ms until Ctrl-C is pressed or a timeout
(default 5s, 0 for none) expires, so that buttons can be checked live
on a device. Move the state printing from list_buttons() into a new
show_button_status() so both subcommands produce the same output."

With the commit message fixed:

Reviewed-by: Simon Glass <[email protected]>

>
> Signed-off-by: Petr Hodina <[email protected]>
>
> cmd/button.c | 104 +++++++++++++++++++++++++++++++++++++++++++++++++++++------
>  1 file changed, 95 insertions(+), 9 deletions(-)

Regards,
Simon

Reply via email to