Skip to content

Commit

Permalink
Commented out compile errors for missing file.
Browse files Browse the repository at this point in the history
Fixed defaultConfig.json
  • Loading branch information
rstrouse authored and tagyoureit committed Feb 11, 2021
1 parent 87ebe85 commit 33e7e51
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion defaultConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
"port": 4200
},
"uuid": "65ee2581-e652-427e-99c6-17c6aa02a6e3"
},
}
}
},
"log": {
Expand Down
12 changes: 7 additions & 5 deletions web/Server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import { URL } from "url";
import { HttpInterfaceBindings } from './interfaces/httpInterface';
import { InfluxInterfaceBindings } from './interfaces/influxInterface';
import { MqttInterfaceBindings } from './interfaces/mqttInterface';
import { EquipmentManagerInterfaceBindings } from './interfaces/equipmentManagerInterface';
//import { EquipmentManagerInterfaceBindings } from './interfaces/equipmentManagerInterface';
import { Timestamp } from '../controller/Constants';
import extend = require("extend");
import { ConfigSocket } from "./services/config/ConfigSocket";
Expand Down Expand Up @@ -790,10 +790,12 @@ export class MqttInterfaceServer extends ProtoServer {

export class EquipmentManagerInterfaceServer extends ProtoServer {
public bindingsPath: string;
public bindings: EquipmentManagerInterfaceBindings;
//public bindings: EquipmentManagerInterfaceBindings;
private _fileTime: Date = new Date(0);
private _isLoading: boolean = false;
public get isConnected() { return this.isRunning && this.bindings.events.length > 0; }
public get isConnected() { return this.isRunning; }
// RKS: Commented out to get running again;
//public get isConnected() { return this.isRunning && this.bindings.events.length > 0; }
public init(cfg) {
this.uuid = cfg.uuid;
if (cfg.enabled) {
Expand All @@ -806,7 +808,7 @@ export class EquipmentManagerInterfaceServer extends ProtoServer {
try {
let bindings = JSON.parse(fs.readFileSync(this.bindingsPath, 'utf8'));
let ext = extend(true, {}, typeof cfg.context !== 'undefined' ? cfg.context.options : {}, bindings);
this.bindings = Object.assign<EquipmentManagerInterfaceBindings, any>(new EquipmentManagerInterfaceBindings(cfg), ext);
//this.bindings = Object.assign<EquipmentManagerInterfaceBindings, any>(new EquipmentManagerInterfaceBindings(cfg), ext);
this.isRunning = true;
this._isLoading = false;
const stats = fs.statSync(this.bindingsPath);
Expand Down Expand Up @@ -846,7 +848,7 @@ export class EquipmentManagerInterfaceServer extends ProtoServer {
public emitToClients(evt: string, ...data: any) {
if (this.isRunning) {
// Take the bindings and map them to the appropriate http GET, PUT, DELETE, and POST.
this.bindings.bindEvent(evt, ...data);
//this.bindings.bindEvent(evt, ...data);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion web/services/state/StateSocket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export class StateSocket {
});
sock.on('/chemController', async (data: any) => {
try {
console.log(`chemController: ${data}`);
//console.log(`chemController: ${data}`);
data = JSON.parse(data);

// Get the chem controller.
Expand Down

0 comments on commit 33e7e51

Please sign in to comment.