Skip to content

Commit

Permalink
Add 7 segment display device type. (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusz-sz authored Oct 24, 2022
1 parent 500a17e commit 1b4afea
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1268,8 +1268,14 @@ export function io_ui(output: Digitaljs.Module) {
}
if (dev.type == 'Input')
dev.type = dev.bits == 1 ? 'Button' : 'NumEntry';
if (dev.type == 'Output')
dev.type = dev.bits == 1 ? 'Lamp' : 'NumDisplay';
if (dev.type == 'Output') {
if (dev.bits == 1)
dev.type = 'Lamp';
else if (dev.bits == 8 && (dev.label == 'display7' || dev.label.startsWith('display7_')))
dev.type = 'Display7';
else
dev.type = 'NumDisplay';
}
}
}

Expand Down

0 comments on commit 1b4afea

Please sign in to comment.