Skip to content

Commit 72f86ec

Browse files
committed
Fix CmdSender binary commands
1 parent f01b3ed commit 72f86ec

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

openc3-cosmos-init/plugins/packages/openc3-vue-common/src/components/CommandEditor.vue

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,11 @@ export default {
265265
if (parameter.format_string && parameter.default) {
266266
val = sprintf(parameter.format_string, parameter.default)
267267
}
268-
if (Object.prototype.toString.call(val).slice(8, -1) === 'Object') {
269-
val = JSON.stringify(val).replace(/\\n/g, '')
268+
if (
269+
Object.prototype.toString.call(val).slice(8, -1) ===
270+
'Object'
271+
) {
272+
val = this.convertToString(val)
270273
}
271274
let range = 'N/A'
272275
if (
@@ -275,12 +278,10 @@ export default {
275278
) {
276279
if (parameter.data_type === 'FLOAT') {
277280
if (parameter.minimum < -1e6) {
278-
parameter.minimum =
279-
parameter.minimum.toExponential(3)
281+
parameter.minimum = parameter.minimum.toExponential(3)
280282
}
281283
if (parameter.maximum > 1e6) {
282-
parameter.maximum =
283-
parameter.maximum.toExponential(3)
284+
parameter.maximum = parameter.maximum.toExponential(3)
284285
}
285286
}
286287
range = `${parameter.minimum}..${parameter.maximum}`

openc3-cosmos-init/plugins/packages/openc3-vue-common/src/util/cmdUtilities.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ export default {
9797
}
9898
} else if (value.json_class === 'Float' && value.raw) {
9999
returnValue = value.raw
100+
} else {
101+
// For other objects, use JSON.stringify as a fallback
102+
returnValue = JSON.stringify(value).replace(/\\n/g, '')
100103
}
101104
} else {
102105
returnValue = String(value)

playwright/utilities.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export class Utilities {
3030
}
3131

3232
async selectTargetPacketItem(target: string, packet?: string, item?: string) {
33+
await expect(this.page.locator('[data-test=select-target]')).toBeEnabled()
3334
await this.page.locator('[data-test=select-target]').click()
3435
await this.page.getByRole('option', { name: target, exact: true }).click()
3536
await expect(

0 commit comments

Comments
 (0)