feat/1080-run-limit #36

Merged
ismail merged 6 commits from feat/1080-run-limit into dev 2025-08-22 16:56:23 +02:00
Owner

Summary

This pull request introduces the run limit feature for relay channels with persistent NVS storage. It also simplifies the component by removing unnecessary esp_event usage, optimizes timer callbacks and event loop resource sizing, and enhances test coverage. These changes improve maintainability, reduce memory footprint, and ensure more reliable behavior across different configurations.

TICKET-1080

Changes

  • Added run limit feature for relay channels with NVS support.
  • Introduced Kconfig options and APIs for managing run limits.
  • Implemented automatic stop mechanism using run limit timers.
  • Updated NVS handling to persist run limit values.
  • Added and executed unit tests for the run limit feature.
  • Enhanced sdkconfig.defaults to cover individual and combined configurations.
  • Optimized event loop queue and task stack sizes based on config factors.
  • Removed esp_event usage from the component to reduce complexity.
  • Optimized timer callbacks for better efficiency.
  • Optimized a flip test case to after the removal of esp_event.
  • #1080 - Add run limit feature for relay channels
  • #1083 - Optimize event loop resource size
  • #1084 - Remove unnecessary esp_event usage

Breaking Changes

None.

Migration Guide

N/A

## Summary This pull request introduces the **run limit feature** for relay channels with persistent NVS storage. It also simplifies the component by removing unnecessary `esp_event` usage, optimizes timer callbacks and event loop resource sizing, and enhances test coverage. These changes improve maintainability, reduce memory footprint, and ensure more reliable behavior across different configurations. TICKET-1080 ## Changes - Added run limit feature for relay channels with NVS support. - Introduced Kconfig options and APIs for managing run limits. - Implemented automatic stop mechanism using run limit timers. - Updated NVS handling to persist run limit values. - Added and executed unit tests for the run limit feature. - Enhanced `sdkconfig.defaults` to cover individual and combined configurations. - Optimized event loop queue and task stack sizes based on config factors. - Removed `esp_event` usage from the component to reduce complexity. - Optimized timer callbacks for better efficiency. - Optimized a flip test case to after the removal of `esp_event`. ## Related Issues - #1080 - Add run limit feature for relay channels - #1083 - Optimize event loop resource size - #1084 - Remove unnecessary esp_event usage ## Breaking Changes None. ## Migration Guide N/A
ismail added the Kind/FeatureKind/Enhancement labels 2025-08-22 16:55:44 +02:00
ismail self-assigned this 2025-08-22 16:55:44 +02:00
ismail added 6 commits 2025-08-22 16:55:45 +02:00
- 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 sdkconfig.defaults files were enhanced to test the component against all individual configurations for more granularity, as well as with all combinations to ensure consistency and integrity across all configurations.
The event loop queue and  task stack size is optimized to be determined by config factors.

Fixes #1083
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
ismail requested review from Owners 2025-08-22 16:55:45 +02:00
ismail merged commit 6a4872f194 into dev 2025-08-22 16:56:23 +02:00
Sign in to join this conversation.
No Reviewers
KozmotronikTech/Owners
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: KozmotronikTech/relay_chn#36