Skip to content

Commit

Permalink
Update ODrive component title and adjust check condition for nodeData
Browse files Browse the repository at this point in the history
  • Loading branch information
TonProtofy committed Nov 18, 2024
1 parent 0cb7090 commit defad54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/protodevice/src/nodes/ODrive.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const ODrive = ({ node = {}, nodeData = {}, children, color }: any) => {
},
] as Field[]
return (
<Node node={node} isPreview={!node.id} title='ODrive motor' color={color} id={node.id} skipCustom={true}>
<Node node={node} isPreview={!node.id} title='ODrive motor UART' color={color} id={node.id} skipCustom={true}>
<NodeParams id={node.id} params={nodeParams} />
</Node>
)
Expand All @@ -23,7 +23,7 @@ export default {
type: 'CallExpression',
category: "actuators",
keywords: ["brushless", "motor","driver", "ODrive", "device"],
check: (node, nodeData) => node.type == "CallExpression" && nodeData.to?.startsWith('odrive'),
check: (node, nodeData) => node.type == "CallExpression" && nodeData.to == 'odrive',
getComponent: (node, nodeData, children) => <ODrive color={getColor('odrive')} node={node} nodeData={nodeData} children={children} />,
getInitialData: () => { return { to: 'odrive', "param-1": { value: "", kind: "StringLiteral" }, "param-2": { value: "", kind: "StringLiteral" }}}
}

0 comments on commit defad54

Please sign in to comment.