From 79d86c113e3a660522989a059cad30f40df002ba Mon Sep 17 00:00:00 2001 From: Jason Thomas Date: Mon, 11 Sep 2023 18:29:06 -0600 Subject: [PATCH 1/2] Display raw UINT/INT values as hex --- .../openc3-tool-common/src/components/DetailsDialog.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/openc3-cosmos-init/plugins/packages/openc3-tool-common/src/components/DetailsDialog.vue b/openc3-cosmos-init/plugins/packages/openc3-tool-common/src/components/DetailsDialog.vue index f3e808550..1054f56ba 100644 --- a/openc3-cosmos-init/plugins/packages/openc3-tool-common/src/components/DetailsDialog.vue +++ b/openc3-cosmos-init/plugins/packages/openc3-tool-common/src/components/DetailsDialog.vue @@ -292,7 +292,14 @@ export default { } } } - this.rawValue = values[0][0] + if ( + this.details.data_type.includes('INT') && + !this.details.array_size + ) { + this.rawValue = '0x' + values[0][0].toString(16).toUpperCase() + } else { + this.rawValue = values[0][0] + } this.convertedValue = values[1][0] this.formattedValue = values[2][0] this.unitsValue = values[3][0] From 85af3e4f3a2375dc2540ac35d3a69f883ed435cd Mon Sep 17 00:00:00 2001 From: Jason Thomas Date: Tue, 12 Sep 2023 22:42:36 -0600 Subject: [PATCH 2/2] Include both dec and hex --- .../openc3-tool-common/src/components/DetailsDialog.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openc3-cosmos-init/plugins/packages/openc3-tool-common/src/components/DetailsDialog.vue b/openc3-cosmos-init/plugins/packages/openc3-tool-common/src/components/DetailsDialog.vue index 1054f56ba..637596b1f 100644 --- a/openc3-cosmos-init/plugins/packages/openc3-tool-common/src/components/DetailsDialog.vue +++ b/openc3-cosmos-init/plugins/packages/openc3-tool-common/src/components/DetailsDialog.vue @@ -296,7 +296,10 @@ export default { this.details.data_type.includes('INT') && !this.details.array_size ) { - this.rawValue = '0x' + values[0][0].toString(16).toUpperCase() + // For INT and UINT display both dec and hex + this.rawValue = `${values[0][0]} (0x${values[0][0] + .toString(16) + .toUpperCase()})` } else { this.rawValue = values[0][0] }