feat(valve): Add current measurement callbacks and shell commands

This commit introduces several enhancements to the valve library.

- New weak callback functions `valve_current_open_callback` and `valve_current_close_callback` are added to allow the application to monitor the current during valve opening and closing operations.
- The `movement_timeout_handler` now correctly sets the valve state to `VALVE_STATE_OPEN` and movement to `VALVE_MOVEMENT_IDLE` upon timeout.
- New shell commands `valve open`, `valve close`, and `valve stop` are added for direct control of the valve.
- The existing setting commands are reorganized under a `valve set` subcommand, and their names are shortened (e.g., `set_open_t` to `open_t`).
- The default configuration for `LIB_MODBUS_SERVER` and `LIB_VALVE` is changed to `n`.
Signed-off-by: Eduard Iten <eduard@iten.pro>
This commit is contained in:
2025-07-22 10:53:24 +02:00
parent 08c47f00f8
commit 9325fa20c8
5 changed files with 93 additions and 13 deletions

View File

@@ -1,6 +1,6 @@
config LIB_VALVE
bool "Enable Valve Library"
default y
default n
help
Enable the Valve Library.