This commit is contained in:
2025-06-07 16:16:35 +09:00
parent 4e0fb3417e
commit 9e1f4b8871
2 changed files with 5 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "computercraft-mutil", "name": "computercraft-mutil",
"version": "1.0.5", "version": "1.0.6",
"description": "", "description": "",
"license": "ISC", "license": "ISC",
"author": "", "author": "",

View File

@@ -8,9 +8,10 @@ export class MultiPID {
public constructor(channels: number, params: PIDParameters) { public constructor(channels: number, params: PIDParameters) {
this.channels = channels; this.channels = channels;
this.pids = Array(channels) this.pids = [];
.fill(0) for (var i = 0; i < channels; i++) {
.map((_) => new PID(params)); this.pids.push(new PID(params));
}
} }
public setSetpoint(channel: number, setpoint: number) { public setSetpoint(channel: number, setpoint: number) {