We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5ad4ef3 commit 41ae6a3Copy full SHA for 41ae6a3
packages/sample/src/HubStringify.ts
@@ -1,13 +1,10 @@
1
import { RevHub } from "@rev-robotics/expansion-hub";
2
3
export function hubHierarchyToString(hub: RevHub): string {
4
- let result = `USB Expansion Hub: ${hub.moduleAddress}\n`;
5
-
6
- if (hub.isExpansionHub()) {
7
- console.log(`Is open? ${hub.isOpen}`);
8
- }
+ let result = "";
9
10
if (hub.isParent()) {
+ result = `USB Expansion Hub: ${hub.serialNumber} ${hub.moduleAddress}\n`;
11
for (const child of hub.children) {
12
result += `\tUSB Expansion Hub: ${child.moduleAddress}\n`;
13
}
0 commit comments