Skip to content

DVR-238: Incorrect clock display in the Setting page

resolve hour field showing 25 and date field indexing issues

  • Add enum-based focus item IDs (FOCUS_ITEM_BITRATE through FOCUS_ITEM_SAVE_SETTINGS)
  • Implement comprehensive validation in cycle_value() with range checking
  • Add consistency validation function validate_focusable_items()
  • Fix date/time field indexing: month=6, day=7, year=8, hour=9, minute=10, second=11
  • Add debug logging with color-coded output for all focus operations
  • Replace magic numbers with enum constants throughout codebase
  • Ensure hour field validates 0-23 range, minute/second 0-59, month 1-12, day 1-31
  • Fix UI layout vs. data indexing mismatch in create_middle_column()

Root cause: Date/time fields were using incorrect indices causing:

  1. Hour field (ID 9) could receive minute values due to indexing errors
  2. Date fields had swapped indices (month/day confusion)
  3. No validation to prevent out-of-range values

Merge request reports

Loading