fix lint errors

This commit is contained in:
Nikolaos Stefanou 2020-02-25 17:00:41 +00:00
parent 6348e7b8f0
commit 041a3ce2b6
No known key found for this signature in database
GPG Key ID: 904BA59F31C48FB6
3 changed files with 7 additions and 7 deletions

View File

@ -31,7 +31,7 @@ export class SerialSettingsTabComponent {
port: '',
baudrate: 115200,
databits: 8,
parity: "none",
parity: 'none',
rtscts: false,
stopbits: 1,
xany: false,

View File

@ -6,7 +6,7 @@ import { first } from 'rxjs/operators'
import { BaseTerminalTabComponent } from 'terminus-terminal'
import { SerialService } from '../services/serial.service'
import { SerialConnection, SerialSession } from '../api'
import { Subscription } from 'rxjs';
import { Subscription } from 'rxjs'
/** @hidden */
@Component({

View File

@ -1,5 +1,5 @@
import { Injectable, NgZone } from '@angular/core'
const SerialPort = require('serialport')
import SerialPort from 'serialport'
import { ToastrService } from 'ngx-toastr'
import { AppService, LogService } from 'terminus-core'
import { SerialConnection, SerialSession } from '../api'
@ -34,11 +34,11 @@ export class SerialService {
return session
}
async connectSession (session: SerialSession, logCallback?: (s: any) => void): Promise<void> {
async connectSession (session: SerialSession, _?: (s: any) => void): Promise<void> {
const serial = new SerialPort(session.connection.port, { autoOpen: false, baudRate: session.connection.baudrate,
dataBits: session.connection.databits, stopBits: session.connection.stopbits, parity: session.connection.parity,
rtscts: session.connection.rtscts, xon: session.connection.xon, xoff: session.connection.xoff,
xany: session.connection.xany })
dataBits: session.connection.databits, stopBits: session.connection.stopbits, parity: session.connection.parity,
rtscts: session.connection.rtscts, xon: session.connection.xon, xoff: session.connection.xoff,
xany: session.connection.xany })
session.serial = serial
let connected = false
await new Promise(async (resolve, reject) => {