Add run limit feature for relay channels with NVS support
- Introduced configuration options for enabling run limits in Kconfig. - Added APIs to get and set run limits for individual relay channels. - Implemented run limit timer functionality to automatically stop channels. - Updated NVS handling to store and retrieve run limit values. - Enhanced documentation in README and code comments to reflect new feature. Closes #1080
This commit is contained in:
32
Kconfig
32
Kconfig
@@ -17,6 +17,12 @@ menu "Relay Channel Driver Configuration"
|
||||
help
|
||||
Number of relay channels between 1 and 8.
|
||||
|
||||
config RELAY_CHN_ENABLE_RUN_LIMIT
|
||||
bool "Enable run limit for channels"
|
||||
default n
|
||||
help
|
||||
Enable run limit for channels as an extra layer of output protection.
|
||||
|
||||
config RELAY_CHN_ENABLE_TILTING
|
||||
bool "Enable tilting on relay channels"
|
||||
default n
|
||||
@@ -61,4 +67,30 @@ menu "Relay Channel NVS Storage Configuration"
|
||||
The name of the custom NVS partition used for storing relay channel
|
||||
configuration. Make sure the name is exactly the same as label defined
|
||||
in the relevant partition table.
|
||||
endmenu
|
||||
|
||||
menu "Relay Channel Run Limit Configuration"
|
||||
depends on RELAY_CHN_ENABLE_RUN_LIMIT
|
||||
|
||||
config RELAY_CHN_RUN_LIMIT_MIN_SEC
|
||||
int "Minimum run limit in seconds"
|
||||
range 1 60
|
||||
default 10
|
||||
help
|
||||
Minimum run limit in seconds for channels.
|
||||
|
||||
config RELAY_CHN_RUN_LIMIT_MAX_SEC
|
||||
int "Maximum run limit in seconds"
|
||||
range 60 3600
|
||||
default 600
|
||||
help
|
||||
Maximum run limit in seconds for channels.
|
||||
|
||||
config RELAY_CHN_RUN_LIMIT_DEFAULT_SEC
|
||||
int "Default run limit in seconds"
|
||||
range 10 3600
|
||||
default 60
|
||||
help
|
||||
Default run limit in seconds for channels.
|
||||
|
||||
endmenu
|
||||
Reference in New Issue
Block a user