msp over wifi implemented
This commit is contained in:
@@ -10,6 +10,7 @@ class MockFlightControllerLink implements FlightControllerLink {
|
||||
int? _activeWaypointIndex;
|
||||
StreamController<TelemetryFrame>? _telemetryController;
|
||||
Timer? _ticker;
|
||||
double _heading = 0;
|
||||
|
||||
@override
|
||||
FcCapabilities get capabilities => const FcCapabilities(
|
||||
@@ -22,11 +23,17 @@ class MockFlightControllerLink implements FlightControllerLink {
|
||||
Future<void> connect() async {
|
||||
_telemetryController = StreamController<TelemetryFrame>.broadcast();
|
||||
_ticker = Timer.periodic(const Duration(seconds: 1), (_) {
|
||||
// Kurs dreht sich langsam weiter statt fest zu stehen, damit die
|
||||
// Rotation des Drohnen-Markers (DroneMarkerIcon) auch ohne Hardware
|
||||
// sichtbar ueberprueft werden kann (Doku 9: UI-Entwicklung ohne
|
||||
// Hardware).
|
||||
_heading = (_heading + 5) % 360;
|
||||
_telemetryController?.add(TelemetryFrame(
|
||||
lat: 52.5,
|
||||
lon: 13.4,
|
||||
altitudeM: 120,
|
||||
speedMs: 18,
|
||||
headingDeg: _heading,
|
||||
armed: _armed,
|
||||
activeWaypointIndex: _activeWaypointIndex,
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user