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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user