refactor: enhance code clarity and maintainability across multiple files

- Updated comments to improve clarity and adhere to best practices in ascii.go, main.go, and diagnostics.
- Removed unnecessary linter directives for improved readability in imaging.go and ptz.go.
- Reformatted function signatures and added helper calls in tests for consistency and clarity.
- Enhanced error handling and logging consistency in various server files, ensuring better maintainability.
This commit is contained in:
0x524a
2025-12-02 22:21:20 -05:00
parent c1daba5be6
commit 02f79ea7a7
12 changed files with 70 additions and 56 deletions
+2 -2
View File
@@ -347,8 +347,8 @@ func (s *Server) HandleSetImagingSettings(body interface{}) (interface{}, error)
// HandleGetOptions handles GetOptions request.
func (s *Server) HandleGetOptions(body interface{}) (interface{}, error) {
// Return available imaging options/capabilities
const maxImagingValue = 100 //nolint:mnd // Maximum imaging parameter value
const maxExposureTime = 10000 //nolint:mnd // Maximum exposure time in microseconds
const maxImagingValue = 100 // Maximum imaging parameter value
const maxExposureTime = 10000 // Maximum exposure time in microseconds
options := &ImagingOptions{
Brightness: &FloatRange{Min: 0, Max: maxImagingValue},
ColorSaturation: &FloatRange{Min: 0, Max: maxImagingValue},