debug statements added to getters and setters

made some rearrangements to the dot sourcing

ButtonTypes enum added to macrobuttons.ps1

login string now includes version number

Test-RegistryValue added to inst.ps1
This commit is contained in:
2023-08-16 02:52:12 +01:00
parent ff1bd5e6cc
commit 1397c14522
10 changed files with 127 additions and 93 deletions

View File

@@ -1,5 +1,3 @@
. $PSScriptRoot\meta.ps1
class IBus {
[int]$index
[Object]$remote
@@ -13,20 +11,26 @@ class IBus {
return "Bus[" + $this.index + "]"
}
[string] ToString() {
return $this.GetType().Name + $this.index
}
[single] Getter ($param) {
return $this.remote.Getter("$($this.identifier()).$param")
$this.ToString() + " Getter: $($this.Cmd($param))" | Write-Debug
return $this.remote.Getter($this.Cmd($param))
}
[string] Getter_String ($param) {
return $this.remote.Getter_String("$($this.identifier()).$param")
$this.ToString() + " Getter_String: $($this.Cmd($param))" | Write-Debug
return $this.remote.Getter_String($this.Cmd($param))
}
[void] Setter ($param, $val) {
$this.remote.Setter("$($this.identifier()).$param", $val)
$this.ToString() + " Setter: $($this.Cmd($param))=$val" | Write-Debug
$this.remote.Setter($this.Cmd($param), $val)
}
[string] Cmd ($param) {
if ([string]::IsNullOrEmpty($param)) {
return $this.identifier()
}
return "$($this.identifier()).$param"
}
}
@@ -45,6 +49,10 @@ class Bus : IBus {
$this.levels = [BusLevels]::new($index, $remote)
}
[string] ToString() {
return $this.GetType().Name + $this.index
}
[void] FadeTo ([single]$target, [int]$time) {
$this.Setter('FadeTo', "($target, $time)")
}