   end
 
   @doc false
-  @spec parse_end_stops(binary) ::
-          {:report_end_stops, binary, binary, binary, binary, binary, binary, binary}
-  def parse_end_stops(<<
-        "XA",
-        xa::size(8),
-        32,
-        "XB",
-        xb::size(8),
-        32,
-        "YA",
-        ya::size(8),
-        32,
-        "YB",
-        yb::size(8),
-        32,
-        "ZA",
-        za::size(8),
-        32,
-        "ZB",
-        zb::size(8),
-        32,
-        "Q",
-        tag::binary
-      >>),
-      do: {
-        tag,
-        {:report_end_stops, xa |> pes, xb |> pes, ya |> pes, yb |> pes, za |> pes, zb |> pes}
-      }
+  @spec parse_end_stops(binary)
+    :: {:report_end_stops,
+        binary, binary, binary, binary, binary, binary, binary}
+  def parse_end_stops(
+    <<"XA", xa::size(8), 32,
+      "XB", xb::size(8), 32,
+      "YA", ya::size(8), 32,
+      "YB", yb::size(8), 32,
+      "ZA", za::size(8), 32,
+      "ZB", zb::size(8), 32,
+      "Q", tag::binary >>)
+  do
+    r = :report_end_stops
+    msg = {r, xa |> pes, xb |> pes, ya |> pes, yb |> pes, za |> pes, zb |> pes}
+    {tag, msg}
+  end
 
   # lol
   @spec pes(48 | 49) :: 0 | 1

          | :report_encoder_position_scaled
          | :report_encoder_position_raw

  @spec report_xyz(binary, reporter) :: {binary, {reporter, binary, binary, binary}}
  defp report_xyz(position, reporter) when is_bitstring(position),
    do: position |> String.split(" ") |> do_parse_pos(reporter)

  defp do_parse_pos(["X" <> x, "Y" <> y, "Z" <> z, "Q" <> tag], reporter)
       when reporter in [:report_current_position, :report_encoder_position_scaled] do
    {tag, {reporter, String.to_float(x), String.to_float(y), String.to_float(z)}}
  end

  defp do_parse_pos(["X" <> x, "Y" <> y, "Z" <> z, "Q" <> tag], reporter) do
    {tag, {reporter, String.to_integer(x), String.to_integer(y), String.to_integer(z)}}
  end

  defp do_parse_pos(l, _) do

    {:unhandled_gcode, code}
  end

  @spec parse_report_calibration(binary)
    :: {binary, {:report_calibration, binary, binary}}
  defp parse_report_calibration(r) do
    [axis_and_status | [q]] = String.split(r, " Q")
    <<a::size(8), b::size(8)>> = axis_and_status
