From 9e1f4b88716a985759215ed9386afa0d2058a74a Mon Sep 17 00:00:00 2001 From: mincomk Date: Sat, 7 Jun 2025 16:16:35 +0900 Subject: [PATCH] fix: lua --- package.json | 2 +- src/multi-pid.ts | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) 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) {