generated from thinkode/modelRepository
23-os2l #32
@@ -133,7 +133,6 @@
|
||||
<style>
|
||||
main {
|
||||
text-align: left;
|
||||
padding: 1em;
|
||||
max-width: 240px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
@@ -166,7 +166,10 @@ func (f *FTDIFinder) GetPeripheralSettings(peripheralID string) (map[string]inte
|
||||
// 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")
|
||||
// FTDI not detected, return the last settings saved
|
||||
if savedPeripheral, isFound := f.saved[peripheralID]; isFound {
|
||||
return savedPeripheral.Settings, nil
|
||||
}
|
||||
return nil, fmt.Errorf("unable to found the peripheral")
|
||||
}
|
||||
log.Debug().Str("file", "FTDIFinder").Str("peripheralID", peripheralID).Msg("peripheral found by the FTDI finder")
|
||||
|
||||
Reference in New Issue
Block a user