identifier, kindOfEq

- move identifier back to BusEq and StripEq for clarity and looser coupling
- adjust kindmap so we can get channel count with kindOfEq
This commit is contained in:
pblivingston 2025-11-27 20:21:43 -05:00
parent d13b08eff4
commit 8038fc24ce
3 changed files with 16 additions and 12 deletions

View File

@ -84,7 +84,11 @@ class BusMode : IRemote {
}
class BusEq : Eq {
BusEq ([int]$index, [Object]$remote) : base ($index, $remote, 'Bus', $remote.kind.bus_ch) {
BusEq ([int]$index, [Object]$remote) : base ($index, $remote, 'Bus') {
}
[string] identifier () {
return 'Bus[' + $this.index + '].EQ'
}
}

View File

@ -1,29 +1,25 @@
class Eq : IRemote {
[System.Collections.ArrayList]$channel
[string]$prefix
[string]$kindOfEq
Eq ([int]$index, [Object]$remote, [string]$prefix, [int]$chCount) : base ($index, $remote) {
$this.prefix = $prefix
Eq ([int]$index, [Object]$remote, [string]$kindOfEq) : base ($index, $remote) {
$this.kindOfEq = $kindOfEq
AddBoolMembers -PARAMS @('on', 'ab')
$this.channel = @()
for ($ch = 0; $ch -lt $chCount; $ch++) {
for ($ch = 0; $ch -lt $remote.kind.eq_ch[$this.kindOfEq]; $ch++) {
$this.channel.Add([EqChannel]::new($ch, $remote, $this.identifier()))
}
}
[string] identifier () {
return '{0}[{1}].EQ' -f $this.prefix, $this.index
}
[void] Load ([string]$filename) {
$param = 'Command.Load{0}Eq[{1}]' -f $this.prefix, $this.index
$param = 'Command.Load{0}Eq[{1}]' -f $this.kindOfEq, $this.index
$this.remote.Setter($param, $filename)
}
[void] Save ([string]$filename) {
$param = 'Command.Save{0}Eq[{1}]' -f $this.prefix, $this.index
$param = 'Command.Save{0}Eq[{1}]' -f $this.kindOfEq, $this.index
$this.remote.Setter($param, $filename)
}
}

View File

@ -153,7 +153,11 @@ class StripDenoiser : IRemote {
}
class StripEq : Eq {
StripEq ([int]$index, [Object]$remote) : base ($index, $remote, 'Strip', $remote.kind.strip_ch) {
StripEq ([int]$index, [Object]$remote) : base ($index, $remote, 'Strip') {
}
[string] identifier () {
return 'Strip[' + $this.index + '].EQ'
}
}