Commit Graph
4 Commits
Author SHA1 Message Date
Constantin LeueandClaude Sonnet 5 db6b46140c Add center reticle control for dropping waypoints
- ReticleButton: fixed-at-screen-center "+" circle (HTML prototype:
  #centerCluster/#reticleBtn), tapping it drops a waypoint at the current
  map center.
- CurrentMissionNotifier (Riverpod): holds the waypoint list for the
  mission being edited. Reactive single-value state per doc 4.16, so
  Riverpod rather than a new Bloc/Cubit.
- MissionMap now renders each waypoint as a CircleLayer marker (white
  border, dark fill, matching the prototype's L.circleMarker styling).
- PlanScreen owns the MapController needed to read the camera center on
  tap, and wires the reticle to the provider.

Default altitude/speed/catch-radius (60m / 15 m/s / 60m) are hardcoded to
the T1 Ranger default profile values from the prototype for now - TODO
once drone profile settings (doc 3.5) exist.

Verified with flutter analyze, flutter test (incl. a new test covering the
add-waypoint path), and a real run on the Pixel_10a emulator: panned the
map and dropped two waypoints, both markers stayed correctly georeferenced.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-27 22:21:35 +02:00
Constantin LeueandClaude Sonnet 5 fc7d014fda Add top bar for switching between Plan and Fly mode
- TopModeBar widget: persistent pill-shaped header (HTML prototype:
  #topBarWrap/#editModeBtn/#flyModeBtn) tinted in the active mode's color,
  with the inactive mode offered as a solid button in the corner to switch
  into it.
- AppShell now provides a single shared Scaffold + Stack, overlaying
  TopModeBar on top of whichever screen (Plan/Fly) is active, instead of
  each screen owning its own Scaffold.
- Wired the Fly button to AppModeCubit.toFly(), which enforces the
  Ready-to-Fly gate (doc 4.5). Since upload/verify isn't wired up yet, the
  gate is never satisfied yet, so tapping Fly now shows a SnackBar instead
  of throwing an uncaught StateError.
- Extended the widget test to cover both the bar's presence and the
  gate-rejection path (was the source of a real bug: an initial
  negative-margin Container hack for the "bleed into the corner" look
  violated Container's margin.isNonNegative assertion and crashed the
  whole tree - fixed with padding instead).

Verified with flutter analyze, flutter test, and a real run on the
Pixel_10a emulator (visually matches the prototype screenshots in design/,
Fly-tap correctly shows the gate message without crashing or switching mode).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-27 07:40:40 +02:00
Constantin LeueandClaude Sonnet 5 02dd1bc11a Lock app to landscape fullscreen and add first OSM map
- Lock orientation to landscape (sensorLandscape in the manifest,
  SystemChrome.setPreferredOrientations in main.dart) and enable immersive
  fullscreen, matching the prototype's full-bleed map UI (doc 7.7).
- Add MissionMap widget: flutter_map + standard OSM raster tiles, same
  default center/zoom as the HTML prototype (Amsterdam, zoom 16), OSM
  attribution bottom-left. PlanScreen now renders it full-screen instead of
  the placeholder text.
- Add the release-manifest INTERNET permission (previously only present in
  the debug manifest, which would have silently broken tile loading and any
  future network calls in release builds).
- Update the smoke test to check for the FlutterMap widget instead of the
  removed placeholder text.

Verified with flutter analyze, flutter test, and a real run on the
Pixel_10a emulator (fullscreen landscape confirmed, tiles loading).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-27 07:27:15 +02:00
Constantin LeueandClaude Sonnet 5 346fcc2183 Add Flutter project skeleton (Android-only MVP)
Five-layer architecture per DMC_Architektur_und_Design.md: FlightControllerLink
abstraction (Mock + MSP stub), protocol-neutral mission domain layer, App-Mode
state machine with Ready-to-Fly gate, Drift persistence schema, and placeholder
UI screens wired via go_router. App icon generated from design/Y2_pink_dark.svg.
Verified with flutter analyze and flutter test.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-26 21:28:25 +02:00