Rename time_sec to limit_sec in relay channel functions for clarity

Fixes #1087
This commit is contained in:
2025-08-26 18:08:05 +03:00
parent 9a6b8c9f80
commit 79a66c19d7
5 changed files with 30 additions and 30 deletions

View File

@@ -226,15 +226,15 @@ esp_err_t relay_chn_ctl_get_run_limit_all(uint16_t *limits_sec);
*
* Sets the time limit in seconds for the specified channel. It will not proceed
* if the channel ID is invalid.
* If the time_sec value is lesser than the CONFIG_RELAY_CHN_RUN_LIMIT_MIN_SEC,
* If the limit_sec value is lesser than the CONFIG_RELAY_CHN_RUN_LIMIT_MIN_SEC,
* the value will be set to CONFIG_RELAY_CHN_RUN_LIMIT_MIN_SEC.
* If the time_sec value is greater than the CONFIG_RELAY_CHN_RUN_LIMIT_MAX_SEC,
* If the limit_sec value is greater than the CONFIG_RELAY_CHN_RUN_LIMIT_MAX_SEC,
* the value will be set to CONFIG_RELAY_CHN_RUN_LIMIT_MAX_SEC.
*
* @param chn_id The ID of the relay channel to query.
* @param time_sec The run limit time in seconds.
* @param limit_sec The run limit time in seconds.
*/
void relay_chn_set_run_limit(uint8_t chn_id, uint16_t time_sec);
void relay_chn_set_run_limit(uint8_t chn_id, uint16_t limit_sec);
/**
* @brief Sets the run limits for all configured relay channels.
@@ -466,14 +466,14 @@ uint16_t relay_chn_get_run_limit(void);
*
* Sets the time limit in seconds for the channel. It will not proceed
* if the channel ID is invalid.
* If the time_sec value is lesser than the CONFIG_RELAY_CHN_RUN_LIMIT_MIN_SEC,
* If the limit_sec value is lesser than the CONFIG_RELAY_CHN_RUN_LIMIT_MIN_SEC,
* the value will be set to CONFIG_RELAY_CHN_RUN_LIMIT_MIN_SEC.
* If the time_sec value is greater than the CONFIG_RELAY_CHN_RUN_LIMIT_MAX_SEC,
* If the limit_sec value is greater than the CONFIG_RELAY_CHN_RUN_LIMIT_MAX_SEC,
* the value will be set to CONFIG_RELAY_CHN_RUN_LIMIT_MAX_SEC.
*
* @param time_sec The run limit time in seconds.
* @param limit_sec The run limit time in seconds.
*/
void relay_chn_set_run_limit(uint16_t time_sec);
void relay_chn_set_run_limit(uint16_t limit_sec);
#endif // CONFIG_RELAY_CHN_ENABLE_RUN_LIMIT == 1

View File

@@ -214,9 +214,9 @@ esp_err_t relay_chn_ctl_get_run_limit_all(uint16_t *limits_sec);
* @brief Set the run limit for the specified channel
*
* @param chn_id The ID of the relay channel to query.
* @param time_sec The run limit time in seconds.
* @param limit_sec The run limit time in seconds.
*/
extern void relay_chn_ctl_set_run_limit(uint8_t chn_id, uint16_t time_sec);
extern void relay_chn_ctl_set_run_limit(uint8_t chn_id, uint16_t limit_sec);
/**
* @brief Sets the run limits for all configured relay channels.
@@ -253,9 +253,9 @@ static inline esp_err_t relay_chn_get_run_limit_all(uint16_t *limits_sec)
return relay_chn_ctl_get_run_limit_all(limits_sec);
}
static inline void relay_chn_set_run_limit(uint8_t chn_id, uint16_t time_sec)
static inline void relay_chn_set_run_limit(uint8_t chn_id, uint16_t limit_sec)
{
relay_chn_ctl_set_run_limit(chn_id, time_sec);
relay_chn_ctl_set_run_limit(chn_id, limit_sec);
}
static inline esp_err_t relay_chn_set_run_limit_all(uint16_t *limits_sec)
@@ -358,18 +358,18 @@ extern uint16_t relay_chn_ctl_get_run_limit(void);
/**
* @brief Set the run limit for the channel
*
* @param time_sec The run limit time in seconds.
* @param limit_sec The run limit time in seconds.
*/
extern void relay_chn_ctl_set_run_limit(uint16_t time_sec);
extern void relay_chn_ctl_set_run_limit(uint16_t limit_sec);
static inline uint16_t relay_chn_get_run_limit(void)
{
return relay_chn_ctl_get_run_limit();
}
static inline void relay_chn_set_run_limit(uint16_t time_sec)
static inline void relay_chn_set_run_limit(uint16_t limit_sec)
{
relay_chn_ctl_set_run_limit(time_sec);
relay_chn_ctl_set_run_limit(limit_sec);
}
#endif // CONFIG_RELAY_CHN_ENABLE_RUN_LIMIT == 1