Rename the Fly-mode Warnings tab to System Messages, log connection/upload events

Renames DroneEvent/DroneEventSeverity/droneEventLogProvider/
DroneStatusWarningsPanel to SystemMessage/SystemMessageSeverity/
systemMessageLogProvider/DroneStatusMessagesPanel throughout, matching
what the tab now actually shows - general system messages, not just
drone-health warnings.

Adds a new SystemMessageSeverity.info level (blue) for messages that
aren't a warning/error, and three new message sources on top of the
existing battery/failsafe detection:
- "Connected", logged the first time telemetryProvider produces a frame
  after having none - the mirror image of the existing "Connection lost"
  detection (which already fires on the first stream error after having
  had data), so no new transport-specific dependency was needed.
- "Connection type changed to X", from watching connectionSettingsProvider
  (skips the initial load so it doesn't fire on every app start).
- "Mission sent (N waypoints)" / "Mission upload failed: ...", logged
  from FlyScreen's send handler via a new public log() method on the
  notifier, alongside the existing snackbar.

Verified on the Pixel_10a emulator: entering Fly mode logs "Connected"
once the mock telemetry starts, and tapping the send button logs
"Mission sent (3 waypoints)" right after the snackbar.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Constantin Leue
2026-08-06 10:47:38 +02:00
co-authored by Claude Sonnet 5
parent 13475cc4f3
commit b09d00ab9f
10 changed files with 386 additions and 144 deletions
+6 -5
View File
@@ -10,7 +10,7 @@ import '../dmc_colors.dart';
import '../providers/active_drone_profile_provider.dart';
import '../providers/altitude_profile_provider.dart';
import '../providers/mission_meta_provider.dart';
import 'drone_status_warnings_panel.dart';
import 'drone_status_messages_panel.dart';
import 'missions_drones_panel.dart';
import 'mountain_peak_icon.dart';
import 'paper_plane_icon.dart';
@@ -90,9 +90,10 @@ class BottomStatsBar extends ConsumerWidget {
/// Nur im Fly-Modus gesetzt (Doku: "im fly screen den warnings button
/// durch einen wp send button ersetzen") - wenn gesetzt, ersetzt der
/// Sende-Knopf (Papierflieger, horizontal, pink) den runden Warnungs-
/// Knopf komplett, unabhaengig von [warnings]. Warnungen/Ereignis-Log
/// bleiben im Fly-Modus weiterhin ueber die Drohnen-Status-Pille
/// erreichbar (dort als eigener Tab), siehe DroneStatusWarningsPanel.
/// Knopf komplett, unabhaengig von [warnings]. System Messages (Doku:
/// "aendere das warnings Menü in System Messages") bleiben im Fly-Modus
/// weiterhin ueber die Drohnen-Status-Pille erreichbar (dort als eigener
/// Tab), siehe DroneStatusMessagesPanel.
final VoidCallback? onSendTap;
/// Zeigt einen Ladeindikator statt des Papierflieger-Icons und ignoriert
@@ -187,7 +188,7 @@ class BottomStatsBar extends ConsumerWidget {
// Profile werden waehrend des Fluges ohnehin
// nicht gewechselt.
onTap: () => Navigator.of(context).push(MaterialPageRoute(
builder: (_) => const DroneStatusWarningsPanel.status(),
builder: (_) => const DroneStatusMessagesPanel.status(),
)),
)
: _NameChip(