Rename cookie.

Fix unused alias.
This commit is contained in:
Pim Kunis 2019-08-24 17:59:03 +02:00
parent aa0624b43c
commit e888f1330b
3 changed files with 4 additions and 6 deletions

View file

@ -22,7 +22,7 @@ defmodule Firmware.Application do
# List all child processes to be supervised
def children(:host) do
{:ok, _} = Node.start(:"host@0.0.0.0")
Node.set_cookie(:testcookie)
Node.set_cookie(:tastycookie)
true = Node.connect(:"esrom@esrom.lan")
[]
end

View file

@ -63,7 +63,7 @@ defmodule Firmware.MixProject do
def release do
[
overwrite: true,
cookie: "testcookie",
cookie: "tastycookie",
include_erts: &Nerves.Release.erts/0,
steps: [&Nerves.Release.init/1, :assemble]
]

View file

@ -67,11 +67,9 @@ defmodule Morse.Worker do
end
_ ->
alias Circuits.GPIO
def toggle_lamp(state) do
{:ok, gpio} = GPIO.open(relay_pin(), :output)
GPIO.write(gpio, state)
{:ok, gpio} = Circuits.GPIO.open(relay_pin(), :output)
Circuits.GPIO.write(gpio, state)
end
defp relay_pin() do