Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Commit

Permalink
liveDataViewer.ts: adjusted ticker min draw distances
Browse files Browse the repository at this point in the history
  • Loading branch information
KierPalin committed Nov 13, 2024
1 parent c7416de commit b93a2e5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions liveDataViewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -375,18 +375,17 @@ namespace microcode {
const y = Math.round(Screen.HEIGHT - ((((reading - sensor.getMinimum()) / range) * (BUFFERED_SCREEN_HEIGHT - fromY)))) - fromY

// Make sure the ticker won't be cut-off by other UI elements
if (!tickerYValues.some(v => Math.abs(v - y) <= 4)) {
if (!tickerYValues.some(v => Math.abs(v - y) <= 5)) {
screen().print(
sensor.getNthReading(sensor.getBufferLength() - 1).toString().slice(0, 4),
this.windowLeftBuffer + sensor.getBufferLength() + 4,
y - 1,
color,
bitmaps.font5,
)
// basic.showString(sensor.getNthReading(sensor.getBufferLength() - 1).toString().slice(0, 5))
}

tickerYValues.push(y - 1)
tickerYValues.push(y)
}
}
}
Expand Down

0 comments on commit b93a2e5

Please sign in to comment.