@impl true
@doc """
Make a quick network scan , and push it to the front !
"""
@spec handle_cast({:push_wifi_networks}, State.t()) :: {:noreply, State.t()}
def handle_cast({:push_wifi_networks}, state) do
# TO DO should work on making the state updatable !
Logger.info("scan")
networks = VintageNetWifi.quick_scan(4000)
:ok = Ps.broadcast(MainPubSub, "main:0", {:push_wifi_networks, networks})
{:noreply, state}
end
hi guys , here i have the VintageNetWifi , the module will be availble till the entire Nerves Runtime is running -i.e running the app in the Target - , but i need to keep the code even in the case of not having the module available at the moment !
in the mix.exs , i didnt define that dep , but it's defined in one of this nerves systems !