mirror of
https://github.com/Eugeny/tabby
synced 2024-11-14 17:07:15 +00:00
serial: slow feed mode - fixes #4901
This commit is contained in:
parent
5f94e84542
commit
08a38bbf61
3 changed files with 15 additions and 1 deletions
|
@ -20,6 +20,7 @@ export interface SerialProfileOptions extends StreamProcessingOptions, LoginScri
|
|||
xon?: boolean
|
||||
xoff?: boolean
|
||||
xany?: boolean
|
||||
slowSend?: boolean
|
||||
}
|
||||
|
||||
export const BAUD_RATES = [
|
||||
|
@ -123,7 +124,13 @@ export class SerialSession extends BaseSession {
|
|||
}
|
||||
|
||||
write (data: Buffer): void {
|
||||
this.streamProcessor.feedFromTerminal(data)
|
||||
if (!this.profile.options.slowSend) {
|
||||
this.streamProcessor.feedFromTerminal(data)
|
||||
} else {
|
||||
for (const byte of data) {
|
||||
this.streamProcessor.feedFromTerminal(Buffer.from([byte]))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async destroy (): Promise<void> {
|
||||
|
|
|
@ -77,6 +77,12 @@ ul.nav-tabs(ngbNav, #nav='ngbNav')
|
|||
.title Xany
|
||||
toggle([(ngModel)]='profile.options.xany')
|
||||
|
||||
.form-line
|
||||
.header
|
||||
.title Slow feed
|
||||
.description Sends data one byte at a time
|
||||
toggle([(ngModel)]='profile.options.slowFeed')
|
||||
|
||||
li(ngbNavItem)
|
||||
a(ngbNavLink) Login scripts
|
||||
ng-template(ngbNavContent)
|
||||
|
|
|
@ -30,6 +30,7 @@ export class SerialProfilesService extends ProfileProvider<SerialProfile> {
|
|||
inputNewlines: null,
|
||||
outputNewlines: null,
|
||||
scripts: [],
|
||||
slowSend: false,
|
||||
},
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue