Skip to content

Commit 2fbe490

Browse files
committed
Fix logic for detecting wlan0 unconfigured
1 parent 30f8d29 commit 2fbe490

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/circuits_quickstart/application.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ defmodule CircuitsQuickstart.Application do
2222
defp setup_wifi() do
2323
kv = Nerves.Runtime.KV.get_all()
2424

25-
if true?(kv["wifi_force"]) or wlan0_unconfigured?() do
25+
if true?(kv["wifi_force"]) or not wlan0_configured?() do
2626
ssid = kv["wifi_ssid"]
2727
passphrase = kv["wifi_passphrase"]
2828

@@ -33,7 +33,7 @@ defmodule CircuitsQuickstart.Application do
3333
end
3434
end
3535

36-
defp wlan0_unconfigured?() do
36+
defp wlan0_configured?() do
3737
VintageNet.get_configuration("wlan0") |> VintageNetWiFi.network_configured?()
3838
catch
3939
_, _ -> false

0 commit comments

Comments
 (0)