registered the OS2L finder

This commit is contained in:
2025-01-04 12:10:25 +01:00
parent e4392c8902
commit ea325e23c5
7 changed files with 128 additions and 148 deletions

View File

@@ -35,7 +35,7 @@ func (a *App) RemovePeripheral(protocolName string, peripheralID string) error {
// AddOS2LPeripheral adds a new OS2L peripheral
func (a *App) AddOS2LPeripheral() (hardware.PeripheralInfo, error) {
// Get the OS2L driver
os2lDriver, err := a.hardwareManager.GetDriver("OS2L")
os2lDriver, err := a.hardwareManager.GetFinder("OS2L")
if err != nil {
log.Err(err).Str("file", "peripheral").Msg("unable to found the OS2L driver")
return hardware.PeripheralInfo{}, err
@@ -59,7 +59,7 @@ func (a *App) AddOS2LPeripheral() (hardware.PeripheralInfo, error) {
func (a *App) ConnectFTDI() error {
// Connect the FTDI
driver, err := a.hardwareManager.GetDriver("FTDI")
driver, err := a.hardwareManager.GetFinder("FTDI")
if err != nil {
return err
}
@@ -72,7 +72,7 @@ func (a *App) ConnectFTDI() error {
func (a *App) ActivateFTDI() error {
// Connect the FTDI
driver, err := a.hardwareManager.GetDriver("FTDI")
driver, err := a.hardwareManager.GetFinder("FTDI")
if err != nil {
return err
}
@@ -85,7 +85,7 @@ func (a *App) ActivateFTDI() error {
func (a *App) SetDeviceFTDI(channelValue byte) error {
// Connect the FTDI
driver, err := a.hardwareManager.GetDriver("FTDI")
driver, err := a.hardwareManager.GetFinder("FTDI")
if err != nil {
return err
}
@@ -98,7 +98,7 @@ func (a *App) SetDeviceFTDI(channelValue byte) error {
func (a *App) DeactivateFTDI() error {
// Connect the FTDI
driver, err := a.hardwareManager.GetDriver("FTDI")
driver, err := a.hardwareManager.GetFinder("FTDI")
if err != nil {
return err
}
@@ -111,7 +111,7 @@ func (a *App) DeactivateFTDI() error {
func (a *App) DisconnectFTDI() error {
// Connect the FTDI
driver, err := a.hardwareManager.GetDriver("FTDI")
driver, err := a.hardwareManager.GetFinder("FTDI")
if err != nil {
return err
}