diff --git a/src/c3card_gateway_command.erl b/src/c3card_gateway_command.erl index ffb6442..c2b70f2 100644 --- a/src/c3card_gateway_command.erl +++ b/src/c3card_gateway_command.erl @@ -36,9 +36,9 @@ handle_command({candy, Turn}) -> noreply; handle_command(ping) -> spawn(fun() -> - c3card_neopixel:toggle_led(1, 120), - c3card_neopixel:clear_all() - end), + c3card_neopixel:toggle_led(1, 120), + c3card_neopixel:clear_all() + end), {reply, pong}; handle_command(Command) -> io:format("unknown command from gateway: ~p~n", [Command]), diff --git a/src/c3card_wifi.erl b/src/c3card_wifi.erl index e75e79f..21f0d14 100644 --- a/src/c3card_wifi.erl +++ b/src/c3card_wifi.erl @@ -40,17 +40,17 @@ start(Config) -> {synchronized, fun ntp_syncronized/1}]}, {sta, [{connected, fun connected/0}, {got_ip, fun(IpInfo) -> - got_ip(IpInfo), - Parent ! {ip, IpInfo} - end}, + got_ip(IpInfo), + Parent ! {ip, IpInfo} + end}, {disconnected, fun disconnected/0}, {ssid, SSID}, {psk, Psk}]}], case network:start(NetConfig) of {ok, _Pid} -> - receive - {ip, IpInfo} -> {ok, IpInfo} - end; + receive + {ip, IpInfo} -> {ok, IpInfo} + end; Error -> ?LOG_ERROR("an error happened: ~p", [Error]), Error