Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactors alt/az moves, exposes a TelescopeApi module
- Loading branch information
1 parent
1b17efa
commit 27e7b41
Showing
2 changed files
with
92 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
defmodule Scope.TelescopeApi do | ||
def create(name), do: GenServer.start_link(Scope.Telescope, name) | ||
|
||
def home(pid), do: GenServer.call(pid, :home, 10000) | ||
|
||
def show(pid), do: GenServer.cast(pid, :show) | ||
|
||
def up(pid), do: GenServer.cast(pid, :start_move_up) | ||
def down(pid), do: GenServer.cast(pid, :start_move_down) | ||
def left(pid), do: GenServer.cast(pid, :start_move_left) | ||
def right(pid), do: GenServer.cast(pid, :start_move_right) | ||
|
||
def stop(pid), do: GenServer.cast(pid, :stop_move) | ||
end |