2 Commits
Author SHA1 Message Date
Tobias Gesellchen 6f27a559e4 fix: auto-resolve whitespace and formatting issues using golangci-lint --fix
- Used 'golangci-lint run --fix' to automatically resolve formatting issues
- Fixed all 52 remaining wsl_v5 (whitespace) issues automatically
- Applied go fmt to ensure consistent formatting across codebase
- Touched 49 files with automatic formatting improvements

MAJOR PROGRESS: Reduced total issues from 79 to 27 (66% reduction!)
Remaining issues:
- gocyclo: 14 (complexity - requires manual refactoring)
- revive: 5 (style/naming)
- staticcheck: 5 (static analysis)
- unparam: 3 (unused parameters)
2026-01-09 23:12:08 +01:00
Tobias Gesellchen b4e6ce7042 feat: implement GET/POST /volume endpoints with press+release key pattern
Volume Control Implementation:
• Complete GET/POST /volume endpoint implementation with XML models
• Volume model with validation, clamping, and safety features
• Client methods: GetVolume(), SetVolume(), IncreaseVolume(), DecreaseVolume()
• CLI commands: -volume, -set-volume, -inc-volume, -dec-volume with safety limits
• Comprehensive volume level categorization and helper methods

Key Controls Enhancement:
• Fix press+release pattern: SendKey() now sends both press and release states
• Follows API documentation requirement for proper key simulation
• Add SendKeyPressOnly() and SendKeyReleaseOnly() for advanced usage
• Update documentation to reflect press+release behavior
• Add test for press+release pattern validation

Safety Features:
• Volume warnings for levels >30 with 2-second delay
• Increment/decrement limits (10 up, 20 down per command)
• Automatic volume clamping to 0-100 range
• Clear volume level descriptions (Mute, Quiet, Medium, High, Loud)

Testing & Documentation:
• Comprehensive volume control tests (30+ test cases)
• Complete documentation in docs/VOLUME-CONTROLS.md
• Updated key controls documentation for press+release pattern
• Real device testing with both SoundTouch 10 and 20
• All tests pass, no diagnostics errors

Real Device Integration:
• Fixed volume key press issues through proper press+release cycle
• Tested volume API endpoints with actual devices
• Safe volume levels maintained during testing

Breaking Changes: None
Backward Compatibility: Fully maintained

Production Ready:
 Volume control endpoints (GET/POST /volume)
 Enhanced key controls with proper press+release pattern
 Comprehensive safety features for volume management
 Real device validation and testing
2026-01-08 23:56:17 +01:00