General code and comment cleanup

This commit is contained in:
2025-09-04 16:59:00 +03:00
parent 7244b57061
commit bf5e3a4426
25 changed files with 213 additions and 218 deletions

View File

@@ -81,7 +81,7 @@ esp_err_t relay_chn_nvs_init()
ESP_LOGE(TAG, "Failed to create deinit semaphore");
return ESP_ERR_NO_MEM;
}
nvs_queue_handle = xQueueCreate(RELAY_CHN_NVS_QUEUE_LEN, sizeof(relay_chn_nvs_msg_t));
if (!nvs_queue_handle) {
ESP_LOGE(TAG, "Failed to create NVS queue");
@@ -165,7 +165,7 @@ static esp_err_t relay_chn_nvs_task_set_direction(uint8_t ch, uint8_t direction)
esp_err_t relay_chn_nvs_get_direction(uint8_t ch, relay_chn_direction_t *direction, relay_chn_direction_t default_val)
{
ESP_RETURN_ON_FALSE(direction != NULL, ESP_ERR_INVALID_ARG, TAG, "Direction pointer is NULL");
uint8_t direction_val;
esp_err_t ret = nvs_get_u8(relay_chn_nvs, RELAY_CHN_KEY_DIR, &direction_val);
if (ret == ESP_ERR_NVS_NOT_FOUND) {
@@ -295,7 +295,7 @@ static esp_err_t relay_chn_nvs_task_set_tilt_count(uint8_t ch, uint16_t tilt_cou
esp_err_t relay_chn_nvs_get_tilt_count(uint8_t ch, uint16_t *tilt_count, uint16_t default_val)
{
ESP_RETURN_ON_FALSE(tilt_count != NULL, ESP_ERR_INVALID_ARG, TAG, "Counter pointers are NULL");
esp_err_t ret;
#if CONFIG_RELAY_CHN_COUNT > 1
char key[NVS_KEY_NAME_MAX_SIZE];