Camera module imports intval class properly.
This commit is contained in:
parent
b5fbe0153b
commit
5b418aeccd
|
@ -1,7 +1,6 @@
|
|||
'use strict';
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const Intval = require("intval");
|
||||
const Log = require("log");
|
||||
const intval_1 = require("intval");
|
||||
/** class representing camera functions **/
|
||||
class Camera {
|
||||
/**
|
||||
|
@ -28,6 +27,7 @@ class Camera {
|
|||
*
|
||||
**/
|
||||
async init() {
|
||||
const Log = require('log');
|
||||
this.log = await Log({ label: this.id });
|
||||
this.ipc = require('electron').ipcMain;
|
||||
this.listen();
|
||||
|
@ -129,7 +129,7 @@ class Camera {
|
|||
async connectIntval(event, arg) {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (arg.connect) {
|
||||
this.intval = new Intval(arg.url);
|
||||
this.intval = new intval_1.Intval(arg.url);
|
||||
this.intval.connect((err, ms, state) => {
|
||||
if (err) {
|
||||
this.ui.send('intval', { connected: false });
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,7 +1,6 @@
|
|||
'use strict';
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const Intval = require("intval");
|
||||
const Log = require("log");
|
||||
const intval_1 = require("intval");
|
||||
/** class representing camera functions **/
|
||||
class Camera {
|
||||
/**
|
||||
|
@ -28,6 +27,7 @@ class Camera {
|
|||
*
|
||||
**/
|
||||
async init() {
|
||||
const Log = require('log');
|
||||
this.log = await Log({ label: this.id });
|
||||
this.ipc = require('electron').ipcMain;
|
||||
this.listen();
|
||||
|
@ -129,7 +129,7 @@ class Camera {
|
|||
async connectIntval(event, arg) {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (arg.connect) {
|
||||
this.intval = new Intval(arg.url);
|
||||
this.intval = new intval_1.Intval(arg.url);
|
||||
this.intval.connect((err, ms, state) => {
|
||||
if (err) {
|
||||
this.ui.send('intval', { connected: false });
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,7 +1,6 @@
|
|||
'use strict';
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const Intval = require("intval");
|
||||
const Log = require("log");
|
||||
const intval_1 = require("intval");
|
||||
/** class representing camera functions **/
|
||||
class Camera {
|
||||
/**
|
||||
|
@ -28,6 +27,7 @@ class Camera {
|
|||
*
|
||||
**/
|
||||
async init() {
|
||||
const Log = require('log');
|
||||
this.log = await Log({ label: this.id });
|
||||
this.ipc = require('electron').ipcMain;
|
||||
this.listen();
|
||||
|
@ -129,7 +129,7 @@ class Camera {
|
|||
async connectIntval(event, arg) {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (arg.connect) {
|
||||
this.intval = new Intval(arg.url);
|
||||
this.intval = new intval_1.Intval(arg.url);
|
||||
this.intval.connect((err, ms, state) => {
|
||||
if (err) {
|
||||
this.ui.send('intval', { connected: false });
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,6 +4,12 @@
|
|||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@types/caseless": {
|
||||
"version": "0.12.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.2.tgz",
|
||||
"integrity": "sha512-6ckxMjBBD8URvjB6J3NcnuAn5Pkl7t3TizAg+xdlzzQGSPSmBcXf8KoIH0ua/i+tio+ZRUHEXp0HEmvaR4kt0w==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/electron": {
|
||||
"version": "1.6.10",
|
||||
"resolved": "https://registry.npmjs.org/@types/electron/-/electron-1.6.10.tgz",
|
||||
|
@ -13,6 +19,15 @@
|
|||
"electron": "*"
|
||||
}
|
||||
},
|
||||
"@types/form-data": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-2.2.1.tgz",
|
||||
"integrity": "sha512-JAMFhOaHIciYVh8fb5/83nmuO/AHwmto+Hq7a9y8FzLDcC1KCU344XDOMEmahnrTFlHjgh4L0WJFczNIX2GxnQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"@types/fs-extra": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-7.0.0.tgz",
|
||||
|
@ -28,6 +43,24 @@
|
|||
"integrity": "sha512-wa09itaLE8L705aXd8F80jnFpxz3Y1/KRHfKsYL2bPc0XF+wEWu8sR9n5bmeu8Ba1N9z2GRNzm/YdHcghLkLKg==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/request": {
|
||||
"version": "2.48.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.1.tgz",
|
||||
"integrity": "sha512-ZgEZ1TiD+KGA9LiAAPPJL68Id2UWfeSO62ijSXZjFJArVV+2pKcsVHmrcu+1oiE3q6eDGiFiSolRc4JHoerBBg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/caseless": "*",
|
||||
"@types/form-data": "*",
|
||||
"@types/node": "*",
|
||||
"@types/tough-cookie": "*"
|
||||
}
|
||||
},
|
||||
"@types/tough-cookie": {
|
||||
"version": "2.3.5",
|
||||
"resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-2.3.5.tgz",
|
||||
"integrity": "sha512-SCcK7mvGi3+ZNz833RRjFIxrn4gI1PPR3NtuIS+6vMkvmsGjosqTJwRt5bAEFLRz+wtJMWv8+uOnZf2hi2QXTg==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/uuid": {
|
||||
"version": "3.4.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-3.4.4.tgz",
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
"@types/electron": "^1.6.10",
|
||||
"@types/fs-extra": "^7.0.0",
|
||||
"@types/node": "^11.10.4",
|
||||
"@types/request": "^2.48.1",
|
||||
"@types/uuid": "^3.4.4",
|
||||
"jsdoc-to-markdown": "^4.0.1",
|
||||
"typescript": "^3.3.3333"
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
import Intval = require('intval');
|
||||
import Log = require('log');
|
||||
import { Intval } from 'intval';
|
||||
import { delay } from 'delay';
|
||||
|
||||
/** class representing camera functions **/
|
||||
|
@ -36,6 +35,7 @@ class Camera {
|
|||
*
|
||||
**/
|
||||
private async init () {
|
||||
const Log = require('log');
|
||||
this.log = await Log({ label : this.id });
|
||||
this.ipc = require('electron').ipcMain;
|
||||
this.listen();
|
||||
|
|
|
@ -8,6 +8,7 @@ declare module 'exec';
|
|||
declare module 'spawn';
|
||||
declare module 'systeminformation';
|
||||
declare module 'exit';
|
||||
declare module 'request';
|
||||
|
||||
interface Device {
|
||||
arduino : string;
|
||||
|
|
Loading…
Reference in New Issue