mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-25 01:05:12 +03:00
Merge pull request #861 from nmaggioni/release-2-3-0
Fix CLI commands delay
This commit is contained in:
commit
73b4dd61cd
1 changed files with 4 additions and 4 deletions
|
@ -96,13 +96,13 @@ function sendLinesWithDelay(outputArray) {
|
||||||
return (delay, line, index) => {
|
return (delay, line, index) => {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
helper.timeout.add('CLI_send_slowly', () => {
|
helper.timeout.add('CLI_send_slowly', () => {
|
||||||
var processingDelay = self.lineDelayMs;
|
let processingDelay = TABS.cli.lineDelayMs;
|
||||||
if (line.toLowerCase().startsWith('profile')) {
|
if (line.toLowerCase().startsWith('profile')) {
|
||||||
processingDelay = self.profileSwitchDelayMs;
|
processingDelay = TABS.cli.profileSwitchDelayMs;
|
||||||
}
|
}
|
||||||
const isLastCommand = outputArray.length === index + 1;
|
const isLastCommand = outputArray.length === index + 1;
|
||||||
if (isLastCommand && self.cliBuffer) {
|
if (isLastCommand && TABS.cli.cliBuffer) {
|
||||||
line = getCliCommand(line, self.cliBuffer);
|
line = getCliCommand(line, TABS.cli.cliBuffer);
|
||||||
}
|
}
|
||||||
TABS.cli.sendLine(line, () => {
|
TABS.cli.sendLine(line, () => {
|
||||||
resolve(processingDelay);
|
resolve(processingDelay);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue