Skip to content

Support full dynamic scalability - NUM_ZONES (1-48) - #2

Open
komal-SkyNET wants to merge 1 commit into
incubatorfrom
feature/increase-default-num-zones
Open

Support full dynamic scalability - NUM_ZONES (1-48)#2
komal-SkyNET wants to merge 1 commit into
incubatorfrom
feature/increase-default-num-zones

Conversation

@komal-SkyNET

Copy link
Copy Markdown
Owner

Summary

Updates the firmware to support 8 irrigation zones by default (previously 4), with full dynamic scalability from
1-48 zones.

Changes

  • Increased NUM_ZONES from 4 to 8 zones
  • Made code fully dynamic: Simply change NUM_ZONES constant and everything adapts automatically
    • Generated 48 callback functions (Hunter controller max)
    • Dynamic zone naming and Zigbee endpoint allocation
    • Loop-based callback attachment
  • Added compile-time safety checks: Prevents invalid NUM_ZONES values (must be 1-48)
  • Improved code readability: Added clear comments for configuration
  • Fixed pre-existing bug: Corrected malformed comment in HunterRoam.cpp

Technical Details

  • Zone names: Dynamically generated ("Zone 1", "Zone 2", ...)
  • Endpoints: Auto-assigned sequentially (10, 11, 12, ...)
  • Memory usage: 9.1% RAM, 40.9% Flash (plenty of headroom)
  • All array accesses are bounds-safe

Documentation

  • Updated README.md to reflect 8-zone default
  • Added inline comments explaining dynamic configuration

New default value for NUM_ZONES: 8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant