Make Starfire Move light helper hotplug aware

This commit is contained in:
Meta Vens 2026-06-14 19:40:03 +01:00
commit 3ebf7cc519
2 changed files with 103 additions and 2 deletions

View file

@ -3,6 +3,7 @@ param(
[int]$RefreshMs = 250,
[double]$HoldSeconds = 0,
[switch]$TurnOffOnExit,
[switch]$KeepExisting,
[switch]$DryRun
)
@ -19,8 +20,16 @@ if (-not (Test-Path $probe)) {
dotnet build (Join-Path $repo "src\Mimir.PsMoveProbe\Mimir.PsMoveProbe.csproj") -c Release -p:UseSharedCompilation=false
}
if (-not $KeepExisting) {
Get-Process -Name "Mimir.PsMoveProbe" -ErrorAction SilentlyContinue |
ForEach-Object {
Stop-Process -Id $_.Id -Force
}
}
$args = @(
"--rgb", $Rgb,
"--breathe-led",
"--hold-seconds", "$HoldSeconds",
"--refresh-ms", "$RefreshMs",
"--event-log", $eventLog