mirror of
https://github.com/Eugeny/tabby
synced 2024-11-15 01:17:14 +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
|
xon?: boolean
|
||||||
xoff?: boolean
|
xoff?: boolean
|
||||||
xany?: boolean
|
xany?: boolean
|
||||||
|
slowSend?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export const BAUD_RATES = [
|
export const BAUD_RATES = [
|
||||||
|
@ -123,7 +124,13 @@ export class SerialSession extends BaseSession {
|
||||||
}
|
}
|
||||||
|
|
||||||
write (data: Buffer): void {
|
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> {
|
async destroy (): Promise<void> {
|
||||||
|
|
|
@ -77,6 +77,12 @@ ul.nav-tabs(ngbNav, #nav='ngbNav')
|
||||||
.title Xany
|
.title Xany
|
||||||
toggle([(ngModel)]='profile.options.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)
|
li(ngbNavItem)
|
||||||
a(ngbNavLink) Login scripts
|
a(ngbNavLink) Login scripts
|
||||||
ng-template(ngbNavContent)
|
ng-template(ngbNavContent)
|
||||||
|
|
|
@ -30,6 +30,7 @@ export class SerialProfilesService extends ProfileProvider<SerialProfile> {
|
||||||
inputNewlines: null,
|
inputNewlines: null,
|
||||||
outputNewlines: null,
|
outputNewlines: null,
|
||||||
scripts: [],
|
scripts: [],
|
||||||
|
slowSend: false,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue