Add tilt feature, fix bugs, improve code.

* 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.
This commit is contained in:
2025-02-21 12:43:00 +03:00
parent dcb5453522
commit a694938224
3 changed files with 443 additions and 26 deletions

View File

@@ -17,4 +17,13 @@ menu "Relay Channel Driver Configuration"
help
Number of relay channels between 1 and 8.
config RELAY_CHN_ENABLE_TILTING
bool "Enable tilting on relay channels"
default n
help
This option controls enabling tilting on channels. Tilting makes
a channel move with a specific pattern moving with small steps
at a time. Tilting is specifically designed for controlling some
types of curtains that need to be adjusted to let enter specific
amount of day light.
endmenu