Rename cookie.
Fix unused alias.
This commit is contained in:
parent
aa0624b43c
commit
e888f1330b
3 changed files with 4 additions and 6 deletions
|
@ -22,7 +22,7 @@ defmodule Firmware.Application do
|
||||||
# List all child processes to be supervised
|
# List all child processes to be supervised
|
||||||
def children(:host) do
|
def children(:host) do
|
||||||
{:ok, _} = Node.start(:"host@0.0.0.0")
|
{:ok, _} = Node.start(:"host@0.0.0.0")
|
||||||
Node.set_cookie(:testcookie)
|
Node.set_cookie(:tastycookie)
|
||||||
true = Node.connect(:"esrom@esrom.lan")
|
true = Node.connect(:"esrom@esrom.lan")
|
||||||
[]
|
[]
|
||||||
end
|
end
|
||||||
|
|
|
@ -63,7 +63,7 @@ defmodule Firmware.MixProject do
|
||||||
def release do
|
def release do
|
||||||
[
|
[
|
||||||
overwrite: true,
|
overwrite: true,
|
||||||
cookie: "testcookie",
|
cookie: "tastycookie",
|
||||||
include_erts: &Nerves.Release.erts/0,
|
include_erts: &Nerves.Release.erts/0,
|
||||||
steps: [&Nerves.Release.init/1, :assemble]
|
steps: [&Nerves.Release.init/1, :assemble]
|
||||||
]
|
]
|
||||||
|
|
|
@ -67,11 +67,9 @@ defmodule Morse.Worker do
|
||||||
end
|
end
|
||||||
|
|
||||||
_ ->
|
_ ->
|
||||||
alias Circuits.GPIO
|
|
||||||
|
|
||||||
def toggle_lamp(state) do
|
def toggle_lamp(state) do
|
||||||
{:ok, gpio} = GPIO.open(relay_pin(), :output)
|
{:ok, gpio} = Circuits.GPIO.open(relay_pin(), :output)
|
||||||
GPIO.write(gpio, state)
|
Circuits.GPIO.write(gpio, state)
|
||||||
end
|
end
|
||||||
|
|
||||||
defp relay_pin() do
|
defp relay_pin() do
|
||||||
|
|
Loading…
Reference in a new issue