View Source Tello.Controller.Receiver behaviour (Tello v0.3.0)
The behaviour to define a custom receiver for Tello.Controller
.
# Define custom receiver
defmodule MyReceiver do
use Tello.Controller.Receiver
def receive_message(data) do
# Do something with the data
end
end
# Set customer receiver while starting the client.
{:ok, client, controller, status_listener} =
Tello.start(
controller: [ip: {127, 0, 0, 1}, port: tello_server_port, receiver: MyReceiver]
)
Link to this section Summary
Link to this section Types
@type t() :: module()