Pole display freezing after a while writing running text continously
AndhikaR opened this issue · 0 comments
AndhikaR commented
SerialPort Version
10.4.0
Node Version
14.21.3
Electron Version
15.2.0
Platform
No response
Architecture
x64
Hardware or chipset of serialport
No response
What steps will reproduce the bug?
this.status = 'Running'
this.timer = this.timer > 0 ? this.timer : INTERVAL / 1000
this.timerId = setInterval(() => {
this.textLength = this.poleTextIdle.split('')
if (this.startIndex === this.textLength.length) {
this.startIndex = 0
this.endIndex = 20
} else if (this.endIndex === this.textLength.length) {
this.startIndex++
} else {
this.startIndex++
this.endIndex++
}
this.textSend = this.textLength.slice(
this.startIndex,
this.endIndex
)
if (this.textSend.length < this.textLength.length) {
const minus = 20 - this.textSend.length
const tempStart = this.textLength.slice(0, minus)
const tempText = this.textSend.concat(tempStart)
const showText = tempText.join('')
// if (port) {
this.$nuxt.$emit('printPole', Buffer.from('\f'))
this.$nuxt.$emit('printPole', showText + '\n')
// }
} else {
const showText = this.textSend.join('')
this.$nuxt.$emit('printPole', Buffer.from('\f'))
this.$nuxt.$emit('printPole', showText + '\n')
}
this.timer -= 1
}, 1000)```
### What happens?
running text on poledisplay freezing after a while, need to replug the pole display to make it working again
### What should have happened?
pole display writing text interval continously
### Additional information
_No response_