Private Sub btFTP_Click
If Not(ftpChuck.IsInitialized) Then ftpChuck.Initialize("ftp", "192.168.42.1", 61, "", "") 'ftp port61 on the chuck to upload flightPlan
ftpChuck.PassiveMode = True
Dim myPath, myFile As String
myPath = manager.GetString("missionFilesPath")
If myPath = "" Then myPath = File.DirRootExternal
myFile = "flightplan.mavlink"
ftpChuck.UploadFile(myPath, myFile, True, myFile)
End Sub
Sub ftp_UploadCompleted (ServerPath As String, Success As Boolean)
Log(ServerPath & ", Success=" & Success)
If Success = False Then
Log(LastException.Message)
ToastMessageShow("upload to chuck failed", False)
Else
ToastMessageShow("upload to chuck ok", False)
End If
End Sub