feat(valve): Implement obstacle detection with configurable thresholds

Introduces separate configurable current thresholds for obstacle detection
during valve opening and closing movements.

- Added  state to .
- Added  and
   to .
- Modified  to implement obstacle detection in ,
  setting  on high current, and to load/save
  these new thresholds via settings.
- Added new setter/getter functions for obstacle thresholds to  and .
- Updated  with new shell commands (, )
  and updated  to display these settings.
- Updated  to document the new registers and error states.
- Updated  to include new register definitions, menu options,
  and display of obstacle current thresholds.
This commit is contained in:
2025-07-11 00:27:31 +02:00
parent a3e8d5c168
commit 3c2235733b
6 changed files with 152 additions and 8 deletions

View File

@@ -89,9 +89,21 @@ enum {
*/
REG_HOLDING_MAX_CLOSING_TIME_S = 0x0002,
/**
* @brief Minimum current threshold in mA for end-position detection.
* @brief Minimum current threshold in mA for end-position detection during opening.
*/
REG_HOLDING_VALVE_END_CURRENT_THRESHOLD_MA = 0x0003,
REG_HOLDING_END_CURRENT_THRESHOLD_OPEN_MA = 0x0003,
/**
* @brief Minimum current threshold in mA for end-position detection during closing.
*/
REG_HOLDING_END_CURRENT_THRESHOLD_CLOSE_MA = 0x0004,
/**
* @brief Obstacle current threshold in mA for opening.
*/
REG_HOLDING_OBSTACLE_CURRENT_THRESHOLD_OPEN_MA = 0x0005,
/**
* @brief Obstacle current threshold in mA for closing.
*/
REG_HOLDING_OBSTACLE_CURRENT_THRESHOLD_CLOSE_MA = 0x0006,
/**
* @brief Bitmask for reading and writing digital outputs. Bit 0: Output 1,
* Bit 1: Output 2. 1=ON, 0=OFF.