Unnecessary `#if CONFIG_FOO == 1` checks were removed and the
statements were simplified to` #if CONFIG_FOO`.
`#ifdef CONFIG_FOO` statements were also changed to `#if CONFIG_FOO`
to keep the style as uniform as possible.
Refs #1085
The config parameter names defined in the relay_chn_defs.h file
have been changed back to their original names (with the CONFIG_ prefix),
so that they are not confused with application-level defines.
Refs #1085
It turned out that esp_event was adding extra complexity to the code base and it was completely unnecessary. So it has been removed from the component completely. The actions are now executed directly in the `relay_chn_distpacth_cmd()` and `relay_chn_tilt_dispatch_cmd()` functions.
This change has simplified the component as well as reduced the memory footprint.
Fixes #1084, refs #1083
- 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
The component allocates resources (timers, event loop) in relay_chn_create but never frees them. This is a resource leak.
Hence, a destroy function added to free the resources gracefully.
Fixes #1048.
Restructure the whole project tree so that the component can be unit tested. Also update some cmake files to update the modified paths, update test cases etc.
"relay_chn_tilt_sensitivity_set" and "relay_chn_tilt_sensitivity_get"
functions wasn't capable of dealing with "RELAY_CHN_ID_ALL"
channel ID. Hence it was causing load access system errors. This
commit fixes this bug and matures the sensitivity setter and getter.
* Add tilt feature.
* Fix the following bugs:
* warning: comparison is always true due to limited range of data type.
* Remove unnecessary esp_timer checks.
* The scheduled FREE command disrupts the current command.
* Fatal pin mapping issue.
* Make code optimizations and improvements:
* Optimize event loop queue size depending on channel count.
* Change the channels' starting state to FREE.
* Remove the unnecessary relay_chn_invalidate_inertia_timer function.
* Change the relay_chn_start_inertia_timer function as relay_chn_start_esp_timer_once and modify the function so that it be a generic esp timer start function.
* Optimize the if statement that checks the last run cmd in the relay_chn_execute_stop.