You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add dynamic framerate control with intelligent clamping (v2.3.0)
Added comprehensive framerate control system with automatic hardware limit enforcement:
New Features:
- POST /v1/camera/framerate - Change framerate dynamically with smart clamping
- Automatic clamping to hardware maximum based on current resolution
- User-friendly API that never rejects requests, applies best available framerate
- Detailed response with requested vs applied framerate and clamping indicator
Enhanced Capabilities:
- GET /v1/camera/capabilities now includes:
- current_framerate: Currently configured framerate
- max_framerate_for_current_resolution: Max fps for active resolution
- framerate_limits_by_resolution: Complete table of limits per resolution
Resolution-based Framerate Limits:
- 4K (3840x2160): max 30 fps
- 1440p (2560x1440): max 40 fps
- 1080p (1920x1080): max 50 fps
- 720p (1280x720): max 120 fps
- VGA (640x480): max 120 fps
Implementation:
- Added calculate_max_framerate() function based on pixel count
- Added set_framerate() method in CameraController with intelligent clamping
- State tracking for current width, height, and framerate
- Resolution changes now preserve current framerate setting
Testing:
- Added 3 new integration tests (16 total tests, all passing)
- test_capabilities_with_framerate_limits
- test_framerate_change_normal
- test_framerate_change_with_clamping
Documentation:
- Updated README.md with v2.3 features and usage examples
- Updated CHANGELOG.md with comprehensive v2.3.0 entry
- Added cURL and Python examples for framerate control
- API version bumped to 2.3.0
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
> 🆕 **New in v2.1**: Exposure value (EV) compensation, noise reduction modes, advanced AE controls (constraint/exposure modes), AWB mode presets, autofocus trigger, dynamic resolution change, and corrected exposure limits! Perfect for low-light scenarios.
13
+
> 🆕 **New in v2.3**: Dynamic framerate control with intelligent clamping! Request any framerate and the API automatically applies the maximum for your resolution. Enhanced capabilities endpoint with complete framerate limits table.
14
+
>
15
+
> ℹ️ **v2.2 features**: Camera capabilities discovery endpoint to query supported resolutions, exposure/gain limits, and available features.
Change camera framerate dynamically with intelligent clamping. The API automatically applies the hardware maximum for your current resolution, ensuring a user-friendly experience without rejected requests.
0 commit comments