diff --git a/graphql.schema.json b/graphql.schema.json index 6b75f650d..dc1a4575d 100644 --- a/graphql.schema.json +++ b/graphql.schema.json @@ -2689,11 +2689,11 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "String", + "name": "Float", "ofType": null } }, - "defaultValue": "\"420000\"", + "defaultValue": "420000", "isDeprecated": false, "deprecationReason": null }, diff --git a/src/api/src/graphql/inputs/SerialConnectionConfigInput.ts b/src/api/src/graphql/inputs/SerialConnectionConfigInput.ts index f2c99cdd2..3e849b7a1 100644 --- a/src/api/src/graphql/inputs/SerialConnectionConfigInput.ts +++ b/src/api/src/graphql/inputs/SerialConnectionConfigInput.ts @@ -5,7 +5,7 @@ export default class SerialConnectionConfigInput { @Field(() => String) port: string; - @Field(() => String) + @Field(() => Number) baudRate: number; constructor() { diff --git a/src/ui/components/SerialConnectionForm/index.tsx b/src/ui/components/SerialConnectionForm/index.tsx index 091fdb123..894c2a548 100644 --- a/src/ui/components/SerialConnectionForm/index.tsx +++ b/src/ui/components/SerialConnectionForm/index.tsx @@ -123,7 +123,7 @@ const SerialConnectionForm: FunctionComponent = ( }, [data, previousData]); const onSubmit = () => { if (currentValue !== null) { - onConnect(currentValue?.value, baudRate); + onConnect(currentValue?.value, currentBaud); } }; return ( diff --git a/src/ui/gql/generated/types.ts b/src/ui/gql/generated/types.ts index d4f58e929..d8a59fdf2 100644 --- a/src/ui/gql/generated/types.ts +++ b/src/ui/gql/generated/types.ts @@ -336,7 +336,7 @@ export type Release = { }; export type SerialConnectionConfigInput = { - readonly baudRate?: Scalars['String']['input']; + readonly baudRate?: Scalars['Float']['input']; readonly port?: Scalars['String']['input']; }; diff --git a/src/ui/views/SerialMonitorView/index.tsx b/src/ui/views/SerialMonitorView/index.tsx index 823d0192e..1e024f305 100644 --- a/src/ui/views/SerialMonitorView/index.tsx +++ b/src/ui/views/SerialMonitorView/index.tsx @@ -86,7 +86,7 @@ const SerialMonitorView: FunctionComponent = () => { variables: { input: { port: newSerialDevice, - baudRate: newBaudRate.toString(), + baudRate: newBaudRate, }, }, })