feat: accept calibration readings only from a chosen tag
This commit is contained in:
@@ -23,6 +23,16 @@ defmodule Localiser.Web.Channels.CalibrationChannel do
|
||||
{:noreply, socket}
|
||||
end
|
||||
|
||||
def handle_info({:calibration_scan_reading, _sensor_id, tag_id, rssi}, socket) do
|
||||
push(socket, "scan_reading", %{tag_id: tag_id, rssi: rssi})
|
||||
{:noreply, socket}
|
||||
end
|
||||
|
||||
def handle_info({:calibration_tag_set, _sensor_id, tag_id}, socket) do
|
||||
push(socket, "tag_set", %{tag_id: tag_id})
|
||||
{:noreply, socket}
|
||||
end
|
||||
|
||||
def handle_info({:stage_started, _sensor_id, distance, completed_count}, socket) do
|
||||
push(socket, "stage_started", %{distance: distance, completed_stages: completed_count})
|
||||
{:noreply, socket}
|
||||
|
||||
Reference in New Issue
Block a user