From 21eab2e528f927d225faa76d18fb5ba0840a1627 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Tue, 23 Dec 2025 02:27:30 +0000 Subject: [PATCH] pass parent object references to EqChannel and EqCell --- lib/io.ps1 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/io.ps1 b/lib/io.ps1 index af42e2c..eebe18f 100644 --- a/lib/io.ps1 +++ b/lib/io.ps1 @@ -64,30 +64,30 @@ class IOEq : IRemote { class EqChannel : IRemote { [System.Collections.ArrayList]$cell - [string]$eqId + [Object]$eq EqChannel ([int]$index, [Object]$eq) : base ($index, $eq.remote) { - $this.eqId = $eq.identifier() + $this.eq = $eq if ($eq.kindOfEq -eq 'Bus') { AddFloatMembers -PARAMS @('trim', 'delay') } $this.cell = @() $cellCount = $this.remote.kind.cells for ($c = 0; $c -lt $cellCount; $c++) { - $this.cell.Add([EqCell]::new($c, $this.remote, $this.identifier())) + $this.cell.Add([EqCell]::new($c, $this)) } } [string] identifier () { - return '{0}.Channel[{1}]' -f $this.eqId, $this.index + return '{0}.Channel[{1}]' -f $this.eq.identifier(), $this.index } } class EqCell : IRemote { - [string]$channelId + [Object]$channel - EqCell ([int]$index, [Object]$remote, [string]$channelId) : base ($index, $remote) { - $this.channelId = $channelId + EqCell ([int]$index, [Object]$channel) : base ($index, $channel.remote) { + $this.channel = $channel AddBoolMembers -PARAMS @('on') AddIntMembers -PARAMS @('type') @@ -95,7 +95,7 @@ class EqCell : IRemote { } [string] identifier () { - return '{0}.Cell[{1}]' -f $this.channelId, $this.index + return '{0}.Cell[{1}]' -f $this.channel.identifier(), $this.index } }