Skip to content

Commit 976d5d3

Browse files
committed
Robot now shows ports for a component
1 parent 1357155 commit 976d5d3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/toolbox/hardware_category.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ export function getHardwareCategory(currentModule: commonStorage.Module) {
4949
name: 'Hardware',
5050
contents: [
5151
getRobotMechanismsBlocks(currentModule),
52-
getComponentsBlocks(currentModule),
52+
getComponentsBlocks(currentModule, false),
5353
]
5454
};
5555
}
5656
if (currentModule.moduleType === commonStorage.MODULE_TYPE_MECHANISM) {
57-
return getComponentsBlocks(currentModule);
57+
return getComponentsBlocks(currentModule, true);
5858
}
5959
// Return default empty category if module type doesn't match
6060
return {
@@ -239,14 +239,14 @@ function getRobotMethodsBlocks(currentModule: commonStorage.Module) {
239239
};
240240
}
241241

242-
function getComponentsBlocks(currentModule: commonStorage.Module) {
242+
function getComponentsBlocks(currentModule: commonStorage.Module, hideParams : boolean) {
243243
const contents = [];
244244

245245
// Add the "+ Component" category
246246
contents.push({
247247
kind: 'category',
248248
name: '+ Component',
249-
contents: getAllPossibleComponents(true)
249+
contents: getAllPossibleComponents(hideParams)
250250
});
251251

252252
// Get components from the current workspace

0 commit comments

Comments
 (0)