diff --git a/package.json b/package.json index 15e88a4..d0df97c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "computercraft-mutil", - "version": "1.0.5", + "version": "1.0.6", "description": "", "license": "ISC", "author": "", diff --git a/src/multi-pid.ts b/src/multi-pid.ts index 8f82104..daee9f1 100644 --- a/src/multi-pid.ts +++ b/src/multi-pid.ts @@ -8,9 +8,10 @@ export class MultiPID { public constructor(channels: number, params: PIDParameters) { this.channels = channels; - this.pids = Array(channels) - .fill(0) - .map((_) => new PID(params)); + this.pids = []; + for (var i = 0; i < channels; i++) { + this.pids.push(new PID(params)); + } } public setSetpoint(channel: number, setpoint: number) {