Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #202, naming error #217

Merged
merged 1 commit into from
Nov 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Subsystems/tlmGUI/GenericTelemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,26 +66,26 @@ def display_telemetry_item(self, datagram, tlm_index, label_field, value_field):
except UnboundLocalError:
pass
tlm_field2 = datagram[item_start:item_start +
int(tlmItemSize[tlm_index])]
int(tlm_item_size[tlm_index])]
if tlm_field2:
tlm_field = unpack(tlm_field1, tlm_field2)
if tlm_item_display_type[tlm_index] == 'Dec':
value_field.setText(str(tlm_field[0]))
elif tlm_item_display_type[tlm_index] == 'Hex':
value_field.setText(hex(tlm_field[0]))
elif tlm_item_display_type[tlm_index] == 'Enm':
value_field.setText(tlmItemEnum[tlm_index][int(tlm_field[0])])
value_field.setText(tlm_item_enum[tlm_index][int(tlm_field[0])])
elif tlm_item_display_type[tlm_index] == 'Str':
value_field.setText(tlm_field[0].decode('utf-8', 'ignore'))
label_field.setText(tlmItemDesc[tlm_index])
label_field.setText(tlm_item_desc[tlm_index])
else:
print("ERROR: Can't unpack buffer of length", len(tlm_field2))

# Start the telemetry receiver (see GTTlmReceiver class)
def init_gt_tlm_receiver(self, subscr):
self.setWindowTitle(f"{page_title} for: {subscr}")
self.thread = GTTlmReceiver(subscr)
self.thread.gtSignalTlmDatagram.connect(self.process_pending_datagrams)
self.thread.gt_signal_tlm_datagram.connect(self.process_pending_datagrams)
self.thread.finished.connect(self.thread.deleteLater)
self.thread.start()

Expand Down Expand Up @@ -215,9 +215,9 @@ def usage():
#
# Read in the contents of the telemetry packet definition
#
tlm_item_is_valid, tlmItemDesc, \
tlm_item_start, tlmItemSize, \
tlm_item_display_type, tlmItemFormat = ([] for _ in range(6))
tlm_item_is_valid, tlm_item_desc, \
tlm_item_start, tlm_item_size, \
tlm_item_display_type, tlm_item_format = ([] for _ in range(6))

tlm_item_enum = [None] * 40

Expand Down