generated from thinkode/modelRepository
fixed saved peripherals for a new project
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package hardware
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
@@ -20,31 +22,31 @@ func NewOS2LPeripheral(name string, serialNumber string) *OS2LPeripheral {
|
||||
}
|
||||
|
||||
// Connect connects the MIDI peripheral
|
||||
func (p *OS2LPeripheral) Connect() error {
|
||||
func (p *OS2LPeripheral) Connect(ctx context.Context) error {
|
||||
log.Info().Str("file", "OS2LPeripheral").Msg("OS2L peripheral connected")
|
||||
return nil
|
||||
}
|
||||
|
||||
// Disconnect disconnects the MIDI peripheral
|
||||
func (p *OS2LPeripheral) Disconnect() error {
|
||||
func (p *OS2LPeripheral) Disconnect(ctx context.Context) error {
|
||||
log.Info().Str("file", "OS2LPeripheral").Msg("OS2L peripheral disconnected")
|
||||
return nil
|
||||
}
|
||||
|
||||
// Activate activates the MIDI peripheral
|
||||
func (p *OS2LPeripheral) Activate() error {
|
||||
func (p *OS2LPeripheral) Activate(ctx context.Context) error {
|
||||
log.Info().Str("file", "OS2LPeripheral").Msg("OS2L peripheral activated")
|
||||
return nil
|
||||
}
|
||||
|
||||
// Deactivate deactivates the MIDI peripheral
|
||||
func (p *OS2LPeripheral) Deactivate() error {
|
||||
func (p *OS2LPeripheral) Deactivate(ctx context.Context) error {
|
||||
log.Info().Str("file", "OS2LPeripheral").Msg("OS2L peripheral deactivated")
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetDeviceProperty - not implemented for this kind of peripheral
|
||||
func (p *OS2LPeripheral) SetDeviceProperty(uint32, uint32, byte) error {
|
||||
func (p *OS2LPeripheral) SetDeviceProperty(context.Context, uint32, uint32, byte) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user