Keep the screen on in flight, time out silent vision starts, gate Tripod on the ground

From the Mavic Pro simulator run on 2026-10-22:
- The tablet's 2-minute sleep blanked the flight screen mid-flight. The
  flight screen now sets FLAG_KEEP_SCREEN_ON while it is open.
- TapFly's GO got no answer from the aircraft and no error, so the button
  looked dead. ActiveTrack/TapFly starts now give up after 15 s with "the
  aircraft did not answer".
- Tripod works in the air but the flight controller ignores it on the
  ground, so the gate asks to take off first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
tajniak81andClaude Opus 5.5 committed 2026-10-22 10:38:07 +02:00
1 parent a7984d7f28
commit 8f259339fc
7 files changed
+76 -1

No files matched your search

@@ -4,10 +4,12 @@ import android.Manifest
import android.content.pm.PackageManager
import android.os.Build
import android.os.Bundle
import android.view.WindowManager
import androidx.core.app.ActivityCompat
import androidx.core.content.ContextCompat
import io.flutter.embedding.android.FlutterFragmentActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugin.common.MethodChannel
// FlutterFragmentActivity (not FlutterActivity) is required by local_auth so the
// platform BiometricPrompt can attach to a FragmentActivity host.
@@ -21,6 +23,16 @@ class MainActivity : FlutterFragmentActivity() {
// Live DJI video feed rendered behind the Flight Control HUD.
flutterEngine.platformViewsController.registry
.registerViewFactory(DjiVideoView.VIEW_TYPE, DjiVideoViewFactory())
// The flight screen keeps the display on (see ScreenAwake in Dart).
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, "pilotvault/screen").setMethodCallHandler { call, result ->
if (call.method == "keepOn") {
if (call.arguments == true) window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
else window.clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
result.success(null)
} else {
result.notImplemented()
}
}
}
override fun onCreate(savedInstanceState: Bundle?) {