Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion sim/dalboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ namespace pxsim {
// board hardware version
hardwareVersion = 1;

yieldCount = 0

constructor() {
super()

Expand Down Expand Up @@ -132,7 +134,14 @@ namespace pxsim {
}
}


onEveryYield() {
let count = 0
const data = this.ledMatrixState.image.data
for (let i = 0; i < data.length; ++i)
if (data[i]) count++
pxsim.control.__log(1, `leds: ${count}\n`)
}

initAsync(msg: SimulatorRunMessage): Promise<void> {
super.initAsync(msg);

Expand Down
Loading