Show distance to home as a fourth field in the fly-mode details pill
Adds computeDistanceToHomeM() (mission_stats.dart) alongside the existing rubber-band-target helper, wired through MissionFooterBar -> BottomStatsBar the same way flyMissionStatus already is. Only appears once a home point is known, as the last field after waypoint/distance/ duration. Generalized HomePointIcon to take an optional strokeColor: the map marker keeps its dark-fill-plus-white-outline look, while the details pill uses a plain white fill (strokeColor: null) to match the existing monochrome flag/ruler/clock icons instead of looking like a dropped-in map pin.
This commit is contained in:
@@ -24,6 +24,7 @@ class MissionFooterBar extends ConsumerWidget {
|
||||
required this.totalDistanceM,
|
||||
required this.totalDurationSec,
|
||||
this.flyMissionStatus,
|
||||
this.distanceToHomeM,
|
||||
this.droneStatus,
|
||||
required this.warnings,
|
||||
this.showWarningsBanner = true,
|
||||
@@ -48,6 +49,11 @@ class MissionFooterBar extends ConsumerWidget {
|
||||
/// Distanz/Zeit dorthin. Bleibt im Plan-Modus null.
|
||||
final FlyMissionStatus? flyMissionStatus;
|
||||
|
||||
/// Nur im Fly-Modus gesetzt (Doku: "zeige die Entfernung zum Home Punkt
|
||||
/// als letztes element in der details pille im fly modus an") - siehe
|
||||
/// BottomStatsBar.distanceToHomeM.
|
||||
final double? distanceToHomeM;
|
||||
|
||||
/// Nur im Fly-Modus gesetzt (Doku: "im fly modus zeigt die drone pille
|
||||
/// den zustand der drohne") - siehe BottomStatsBar.droneStatus. FlyScreen
|
||||
/// setzt hier immer einen Wert (auch ohne Telemetrie-Frame, siehe dortige
|
||||
@@ -127,6 +133,7 @@ class MissionFooterBar extends ConsumerWidget {
|
||||
totalDistanceM: totalDistanceM,
|
||||
totalDurationSec: totalDurationSec,
|
||||
flyMissionStatus: flyMissionStatus,
|
||||
distanceToHomeM: distanceToHomeM,
|
||||
droneStatus: droneStatus,
|
||||
onTap: onDetailsTap,
|
||||
warnings: warnings,
|
||||
|
||||
Reference in New Issue
Block a user