feat: SPE amp ON/OFF buttons and Low/Mid/High power-level control (keystroke codes best-guess from APG, pending hw verification)

This commit is contained in:
2026-07-21 01:25:55 +02:00
parent be1ae76eb3
commit 7d7d175ede
5 changed files with 92 additions and 2 deletions
+19
View File
@@ -12261,6 +12261,25 @@ func (a *App) SPESetOperate(on bool) error {
return a.spe.Operate(on)
}
// SPESetPower turns the SPE amp on (true, POWER key) or off (false, OFF key).
func (a *App) SPESetPower(on bool) error {
if a.spe == nil {
return fmt.Errorf("SPE amplifier not connected — enable it in Settings → Amplifier")
}
if on {
return a.spe.PowerOn()
}
return a.spe.PowerOff()
}
// SPESetPowerLevel selects the SPE output power level ("L"/"M"/"H").
func (a *App) SPESetPowerLevel(level string) error {
if a.spe == nil {
return fmt.Errorf("SPE amplifier not connected — enable it in Settings → Amplifier")
}
return a.spe.SetPowerLevel(level)
}
// GetPGXLStatus returns the amp's fan/connection state for the UI poll.
func (a *App) GetPGXLStatus() powergenius.Status {
if a.pgxl == nil {