add MIDI discovery, connection and events

This commit is contained in:
2025-11-14 20:19:44 +01:00
parent 932c288a9c
commit 19ec0bec74
7 changed files with 331 additions and 101 deletions

View File

@@ -172,7 +172,6 @@ func (f *FTDIFinder) GetPeripheralSettings(peripheralID string) (map[string]inte
}
return nil, fmt.Errorf("unable to found the peripheral")
}
log.Debug().Str("file", "FTDIFinder").Str("peripheralID", peripheralID).Msg("peripheral found by the FTDI finder")
return peripheral.GetSettings(), nil
}
@@ -181,8 +180,7 @@ func (f *FTDIFinder) SetPeripheralSettings(ctx context.Context, peripheralID str
// Return the specified peripheral
peripheral, found := f.detected[peripheralID]
if !found {
log.Error().Str("file", "FTDIFinder").Str("peripheralID", peripheralID).Msg("unable to get this peripheral from the FTDI finder")
return fmt.Errorf("unable to found the peripheral")
return fmt.Errorf("unable to found the FTDI peripheral")
}
log.Debug().Str("file", "FTDIFinder").Str("peripheralID", peripheralID).Msg("peripheral found by the FTDI finder")
return peripheral.SetSettings(settings)