Skip to content

Commit

Permalink
Fixing the arguments to use full type names
Browse files Browse the repository at this point in the history
  • Loading branch information
LeStarch committed Oct 12, 2023
1 parent 0046b3e commit 149011a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/fprime_gds/flask/static/addons/commanding/arguments.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export function squashify_argument(argument) {
let field = argument.type.MEMBER_LIST[i][0];
value[field] = squashify_argument(argument.value[field]);
}
} else if (argument.type.name[0] == 'U') {
} else if (["U64Type", "U32Type", "U16Type", "U8Type"].indexOf(argument.type.name) != -1) {
if (argument.value.startsWith("0x")) {
// Hexadecimal
value = parseInt(argument.value, 16);
Expand All @@ -133,10 +133,10 @@ export function squashify_argument(argument) {
value = parseInt(argument.value, 10);
}
}
else if (argument.type.name[0] == 'I') {
else if (["I64Type", "I32Type", "I16Type", "I8Type"].indexOf(argument.type.name) != -1) {
value = parseInt(argument.value, 10);
}
else if (argument.type.name[0] == 'F') {
else if (["F64Type", "F32Type"].indexOf(argument.type.name) != -1) {
value = parseFloat(argument.value);
}
return value;
Expand Down

0 comments on commit 149011a

Please sign in to comment.