Skip to content

feat: add manual date and location entry screens#402

Open
mrosseel wants to merge 9 commits intobrickbots:mainfrom
mrosseel:date
Open

feat: add manual date and location entry screens#402
mrosseel wants to merge 9 commits intobrickbots:mainfrom
mrosseel:date

Conversation

@mrosseel
Copy link
Collaborator

@mrosseel mrosseel commented Mar 24, 2026

Summary

  • UIDateEntry: New date entry screen (YYYY-MM-DD) that automatically follows UITimeEntry when setting time manually, so users can set both time and date when GPS is unavailable
  • UILocationEntry: New 3-step coordinate entry (lat → lon → alt) for manual location input, accessible from Tools > Place&Time > Set Location > Enter Coords
  • Location management: "Load Location" shows saved locations (with empty state message), "Save Location" saves current position with a name prompt (shows "No location lock" if no fix)
  • Manual time protection: Manual time/date is protected from GPS overwrite via __datetime_manual flag
  • Consistent navigation: Right=confirm/forward, Left=back/cancel across all entry screens; last box stays selected instead of wrapping
  • Shared helper: Location.make_fix() static method used by both UI callbacks and web server
  • GPS status: Date now shown alongside time in detailed view
  • Separate resets: "Reset Location" and "Reset Time/Date" are independent menu items

Test plan

  • Navigate to Tools > Place&Time > Set Time/Date, enter time, confirm → date entry should appear pre-filled
  • Confirm date → verify datetime is set and persists (not overwritten by GPS)
  • Test Left key: goes back one box, cancels with popup on first box
  • Last box stays selected after filling (no wrap to first box)
  • Navigate to Tools > Place&Time > Set Location > Enter Coords
  • Enter lat → lon → alt flow, verify location is set
  • Test pre-fill from existing locked location
  • Tools > Place&Time > Set Location > Load Location shows "No locations" when empty
  • Tools > Place&Time > Set Location > Save Location saves current position, shows "No location lock" if no fix
  • Reset Location and Reset Time/Date work independently
  • GPS status detailed view shows date
  • Verify web interface location setting still works

mrosseel and others added 9 commits March 24, 2026 20:30
Add UIDateEntry screen that automatically follows UITimeEntry,
allowing users to set both time and date when GPS is unavailable.

Add UILocationEntry with three-step lat/lon/alt flow for manual
coordinate entry, using the same chaining pattern.

Key changes:
- New UIDateEntry: 3-box date entry (YYYY-MM-DD) with pre-fill
- New UILocationEntry: 3-step coordinate entry (lat → lon → alt)
- UITimeEntry chains to UIDateEntry on confirm
- Location.make_fix() helper shared between UI and web server
- Consistent navigation: Right=confirm, Left=back/cancel
- Menu restructured: "Set Time/Date", location submenu with
  "Enter Coords" and "Saved" options

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- set_datetime() ignored manual times earlier than current time due to
  GPS clock-drift guard. Add force parameter to bypass the guard.
- Manual time/date setting now sends "time_force" message to GPS queue.
- GPS status detailed view now shows the date alongside time.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fakeGPS sends time updates every 0.5s with datetime.now(), immediately
overwriting any manually set time. Add __datetime_manual flag that
blocks GPS time updates once time is manually set. Reset clears it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Location reset should not clear manual time. Add separate
"Reset Time/Date" menu item and reset_datetime GPS message.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Auto-advance and key_right were using modulo wrap, sending cursor
back to box 0 after filling the last box. Now stays on last box
so the user can press Right to confirm.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
TYPE_CHECKING stubs for gettext `_` already satisfy ruff's F821
check, so the blanket ignore for ui/*.py is not needed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Rename "Saved" to "Load Location", show "No saved locations"
  message when list is empty instead of blank screen
- Add "Save Location" menu item that prompts for name, shows
  "No location lock" if no GPS/manual fix is set
- Use Location.make_fix() in location list load action
- Menu: Enter Coords / Load Location / Save Location

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- "No saved locations" -> "No locations" for bold font fit
- "Set: date time" -> "date\ntime" two-line format

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant