Skip to content

Commit

Permalink
(WIP) Fixes nasa#72, upgrade PyQt4 to PyQt5 and implement other fixes…
Browse files Browse the repository at this point in the history
… as needed
  • Loading branch information
lbleier-GSFC committed May 7, 2020
1 parent 49fc159 commit be45b09
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions Subsystems/tlmGUI/GenericTelemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ class SubsystemTelemetry(QDialog, Ui_GenericTelemetryDialog):
def __init__(self):
super().__init__()
self.setupUi(self)
self.pktCount = 0
self.btnClose.clicked.connect(self.closeWin)

#
Expand Down Expand Up @@ -83,10 +82,11 @@ def initGTTlmReceiver(self, subscr):
#
def processPendingDatagrams(self, datagram):
#
# Show number of packets received
# Show sequence number
#
self.pktCount += 1
self.sequenceCount.setValue(self.pktCount)
packetSeq = unpack(">H", datagram[2:4])
seqCount = packetSeq[0] & 0x3FF ## sequence count mask
self.sequenceCount.setValue(seqCount)

#
# Decode and display all packet elements
Expand Down
6 changes: 3 additions & 3 deletions Subsystems/tlmGUI/TelemetrySystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ def strToHex(aString):
# Dump the telemetry packet
#
def dumpPacket(self, packetData):
appIdString = f"{ord(packetData[0]):02X}"
appIdString += f"{ord(packetData[1]):02X}"
# appIdString = f"{ord(packetData[0]):02X}"
# appIdString += f"{ord(packetData[1]):02X}"
appId = (ord(packetData[0]) << 8) + (ord(packetData[1]))
print("\n-----------------------------------------------")
print("\nPacket: App ID =", hex(appId))
Expand Down Expand Up @@ -116,7 +116,7 @@ def processPendingDatagrams(self, datagram):
#
# Decode the packet and forward it to the correct port (if there is one)
#
streamId, _, _ = unpack(">HHH", datagram[:6])
streamId, _, _ = unpack(">3H", datagram[:6])

# Uncomment the next two lines to debug
# print "Packet ID = " , hex(streamId)
Expand Down

0 comments on commit be45b09

Please sign in to comment.