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

@@ -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) {