Skip to content

Commit

Permalink
more explicit code
Browse files Browse the repository at this point in the history
  • Loading branch information
robamu committed Jun 18, 2022
1 parent 51b62aa commit 7fdf07f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions spacepackets/ecss/tc.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
"""This module contains the PUS telecommand class representation to pack telecommands.
"""
from __future__ import annotations

import struct
import sys
from typing import Tuple

Expand Down Expand Up @@ -262,8 +264,7 @@ def pack(self) -> bytearray:
crc_func = mkPredefinedCrcFun(crc_name="crc-ccitt-false")
self._crc = crc_func(packed_data)
self._valid = True
packed_data.append((self._crc & 0xFF00) >> 8)
packed_data.append(self._crc & 0xFF)
packed_data.extend(struct.pack("!H", self._crc))
return packed_data

@classmethod
Expand Down

0 comments on commit 7fdf07f

Please sign in to comment.