From f4106ecb3d3a057b5cf3229c17fd62e7013ab9b7 Mon Sep 17 00:00:00 2001 From: cmaddox5 Date: Mon, 18 Sep 2023 10:48:24 -0400 Subject: [PATCH] Added translation to logger. --- lib/screens/ol_crowding/logger.ex | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/screens/ol_crowding/logger.ex b/lib/screens/ol_crowding/logger.ex index 22984531e..287e4b204 100644 --- a/lib/screens/ol_crowding/logger.ex +++ b/lib/screens/ol_crowding/logger.ex @@ -5,6 +5,7 @@ defmodule Screens.OlCrowding.Logger do use GenServer alias Screens.Predictions.Prediction + alias Screens.Util def start_link(opts) do GenServer.start_link(__MODULE__, opts) @@ -38,7 +39,13 @@ defmodule Screens.OlCrowding.Logger do {:ok, predictions} = fetch_predictions_fn.(fetch_params) next_train_prediction = List.first(predictions) - crowding_levels = Enum.map_join(prediction.vehicle.carriages, ",", & &1.occupancy_status) + + crowding_levels = + Enum.map_join( + prediction.vehicle.carriages, + ",", + &Util.translate_carriage_occupancy_status(&1.occupancy_status) + ) cond do # A car's crowding level changed. Log it and shutdown the process.