Packages

An elixir library for MAVLink, an application that enables communication with other systems using the MAVLink protocol over serial, UDP and TCP connections, and utility modules for performing common MAVLink commands and tasks with one or more remote vehicles.

Current section

Files

Jump to
xmavlink lib mavlink_util supervisor.ex
Raw

lib/mavlink_util/supervisor.ex

defmodule XMAVLink.Util.Supervisor do
@moduledoc false
use Supervisor
def start_link(opts) do
Supervisor.start_link(__MODULE__, opts, name: __MODULE__)
end
@impl true
def init(opts) do
router = Keyword.get(opts, :router, XMAVLink.Router)
children = [
{XMAVLink.Util.FocusManager, %{}},
{XMAVLink.Util.CacheManager, %{router: router}}
]
Supervisor.init(children, strategy: :one_for_one)
end
end